SlideShare a Scribd company logo
A
MINOR PROJECT PROPOSAL
ON
MINIMAX ALGORITHM
BASED
TIC-TAC-TOE
SUBMITTED BY:
SAMEER BHATTARAI (BCT/071/38)
SAROJ RAJ SHARMA (BCT/071/41)
SHEETAL BARAL (BCT/071/43)
UJJAWAL POUDEL (BCT/071/48)
DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING
DHARAN, NEPAL
TRIBHUVAN UNIVERSITY
INSTITUTE OF ENGINEERING
PURWANCHAL CAMPUS
NOVEMBER, 2017
2 | P a g e
TABLE OF CONTENTS
1 INTRODUCTION......................................................................................3
1.1 General Introduction.............................................................................3
1.2 Purpose.................................................................................................3
2 AIMS AND OBJECTIVES........................................................................4
3 METHODOLOGY.....................................................................................5
3.1 Flowchart..............................................................................................5
3.2 Use Case Diagram................................................................................7
4 ALGORITHM............................................................................................9
5 REFERENCES.........................................................................................11
LIST OF FIGURES
Figure 1.1 Flow chart of Tic Tac Toe………..................................................6
Figure 1.2.a Use case diagram of Player VS Player........................................7
Figure 1.2.b Use case diagram of User VS Computer.....................................8
3 | P a g e
1. INTRODUCTION
1.1 General Introduction
TodayAIis one ofthe most promising field ofcomputerscience. From solving
complex problems to doing certain things better than most humans, it has
many applications. Such capability of AI and its wide use has led us into
working on this project which will be based on “MINIMAX ALGORITHM”,
a popular algorithm basically used in game playing. The project will try to
demonstrate the implementation of an AI algorithm and it effectiveness
against a human opponent in game playing.
Tic Tac Toe (also known as noughts and crosses orXs and Os) is
a paper-and-pencil game for two players, X and O, who take turns marking
the spaces in a 3×3 grid. The player who succeeds in placing three of their
marks in a horizontal, vertical, or diagonal row wins the game.
The following example game is won by the first player, X:
fig (1.a) Winning condition of Player X
Tic Tac Toe is played by young children and adults alike. It is a great way to
pass your free time whether you’re standing in a line, waiting for a bus,
spending time with your friends or in the middle of a boring lecture. The
friendliness of Tic Tac Toe makes it ideal as a pedagogical tool for teaching
and learning the concepts of good sportsmanship and the branch of artificial
intelligence that deals with the searching of game trees.
1.2 Purpose
The purpose of developing a Tic Tac Toe application is to computerize the
traditional way of playing Tic Tac Toe and give it a modern technological
touch. Another purpose for developing this app is to make this traditional
game famous among today’s exclusively tech loving kids.
4 | P a g e
2. AIMS AND OBJECTIVES
Following are the objectives of this project:
 To be familiar with Object Oriented Programming (OOP).
 To learn about android device and android app development.
 To learn process ofproject development.
 To implement AI based MINIMAX ALGORITHM in digital device.
 To eliminate the use of paper for playing TIC-TAC-TOE.
The aim of this project is to develop a Tic-Tac-Toe game for mobile device.
The game is supposed to consist of two parts, one a single player game (a
player against a system), and the other a multi-player game (two players on
their mobile devices, playing against each other).
5 | P a g e
3. METHODOLOGY
3.1 FLOW CHART
Start
Game
Mode
Single
Or
Multi?
A
Enter
name
P1 &P2
Move
Player2
wins
Game
is Tie
Player1
wins
Game
is Tie
End
Check
whose
Turn?
Move
Check
Win?
Check
Win?
Check
Tie?
Check
Tie?
Multi
Single
P1P2
F F
T T
TT
Play
Again?
F
F F
T
This symbol is
connecting symbol for
process and sub
process
6 | P a g e
A
Enter
name
?
Move
Comp
wins
Game
is Tie
Player1
wins
Game
is Tie
End
Check
whose
Turn?
Move
Check
Win?
Check
Win?
Check
Tie?
Check
Tie?
Single
P1Comp
F F
T T
TT
Play
Again?
F
F F
T
This symbol is
connecting symbol for
process and sub
process
Fig 1.1: Flow chart of Tic Tac Toe
7 | P a g e
3.2 USE CASE DIAGRAM
<<include>>
Select Game type
Enter Name
Start
Take Move
Check Game Over
Result
Play Again
Player 1 Player 2
<<include>>
<<include>>
Fig 1.2.a: Use case diagram of Player VS Player
8 | P a g e
<<include>>
Select Game type
Enter Name
Start
Take Move
Check Game Over
Result
Play Again
User
Computer
<<include>>
<<include>>
Fig 1.2.b: Use case diagram for User VS Computer
9 | P a g e
4. ALGORITHM
In case of AI move
 Finding the Best Move :
We shall be introducing a new function called findBestMove() . This function
evaluates all the available moves using minimax() and then returns the best
move the maximizer can make.
function findBestMove (Board):
bestMove = NULL
for each move is board :
if current move is better than bestMove
bestMove = current Move
return bestMove
 To check whether or not the current move is better than the best move we
take the help of minimax() function which will consider all the possible
ways the game can go and returns the best value for that move, assuming
the opponent also plays optimally.
function minimax (board , depth ,isMaximizingPlayer):
if current board state is a terminal state:
return value of the board
if isMaximizingPlayer :
bestVal = -INFINITY
for each move in board:
value =minimax(board , depth+1 ,false)
bestVal = max(bestVal ,value)
return bestVal
else :
bestVal =+INFINITY
10 | P a g e
for each move in board :
value = minimax(board , depth+1 ,true)
bestVal = min (bestVal ,value)
return bestVal
 To check whether the game is over and to make sure there are no moves
left we use isMovesLeft() function.
function isMovesLeft (board):
for each cell in board:
if current cell is empty:
return ture
return false
11 | P a g e
5. REFERENCES
 J. Horton, “Android Programming for Beginners”, Packt Publishing Ltd,
2015.
Y. D. Liang, “Introduction to Java Programming, Pearson Education, 2015.
I. Sommerville, “Software Engineering”, Pearson Education, 2016.
“Android Tutorial”, http://www.tutorialspoint.com/, N.P., n.d. Web, 15
May 2016.
Ad

More Related Content

What's hot (20)

Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Saikrishna Tanguturu
 
Tic tac toe
Tic tac toeTic tac toe
Tic tac toe
Niloy Biswas
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ project
Utkarsh Aggarwal
 
Tic tac toe simple ai game
Tic tac toe simple ai gameTic tac toe simple ai game
Tic tac toe simple ai game
Seevaratnam Kajandan
 
Tic Tac Toe using Mini Max Algorithm
Tic Tac Toe using Mini Max AlgorithmTic Tac Toe using Mini Max Algorithm
Tic Tac Toe using Mini Max Algorithm
Ujjawal Poudel
 
Push down automata
Push down automataPush down automata
Push down automata
Somya Bagai
 
Ludo game using c++ with documentation
Ludo game using c++ with documentation Ludo game using c++ with documentation
Ludo game using c++ with documentation
Mauryasuraj98
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cpp
Alamgir Hossain
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
manika kumari
 
Python sqlite3
Python sqlite3Python sqlite3
Python sqlite3
Alexey Bovanenko
 
FPGA Hardware Accelerator for Machine Learning
FPGA Hardware Accelerator for Machine Learning FPGA Hardware Accelerator for Machine Learning
FPGA Hardware Accelerator for Machine Learning
Dr. Swaminathan Kathirvel
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
vikas dhakane
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
SHUBHAM KUMAR GUPTA
 
Flat
FlatFlat
Flat
lavishka_anuj
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
Rajendran
 
Introduction to Python - Training for Kids
Introduction to Python - Training for KidsIntroduction to Python - Training for Kids
Introduction to Python - Training for Kids
Aimee Maree Forsstrom
 
Assignment 3 push down automata final
Assignment 3 push down automata finalAssignment 3 push down automata final
Assignment 3 push down automata final
Pawan Goel
 
09
0909
09
Rohit Chowdhary
 
Tic Tac Toe Java Development
Tic Tac Toe Java DevelopmentTic Tac Toe Java Development
Tic Tac Toe Java Development
pengqia chen
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
Rajendran
 
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Saikrishna Tanguturu
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ project
Utkarsh Aggarwal
 
Tic Tac Toe using Mini Max Algorithm
Tic Tac Toe using Mini Max AlgorithmTic Tac Toe using Mini Max Algorithm
Tic Tac Toe using Mini Max Algorithm
Ujjawal Poudel
 
Push down automata
Push down automataPush down automata
Push down automata
Somya Bagai
 
Ludo game using c++ with documentation
Ludo game using c++ with documentation Ludo game using c++ with documentation
Ludo game using c++ with documentation
Mauryasuraj98
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cpp
Alamgir Hossain
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
manika kumari
 
FPGA Hardware Accelerator for Machine Learning
FPGA Hardware Accelerator for Machine Learning FPGA Hardware Accelerator for Machine Learning
FPGA Hardware Accelerator for Machine Learning
Dr. Swaminathan Kathirvel
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
vikas dhakane
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
SHUBHAM KUMAR GUPTA
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
Rajendran
 
Introduction to Python - Training for Kids
Introduction to Python - Training for KidsIntroduction to Python - Training for Kids
Introduction to Python - Training for Kids
Aimee Maree Forsstrom
 
Assignment 3 push down automata final
Assignment 3 push down automata finalAssignment 3 push down automata final
Assignment 3 push down automata final
Pawan Goel
 
Tic Tac Toe Java Development
Tic Tac Toe Java DevelopmentTic Tac Toe Java Development
Tic Tac Toe Java Development
pengqia chen
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
Rajendran
 

Similar to Mini Max Algorithm Proposal Document (20)

Squid Game and Music Synchronization
Squid Game and Music SynchronizationSquid Game and Music Synchronization
Squid Game and Music Synchronization
IRJET Journal
 
Developing a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDeveloping a Humanoid Robot Platform
Developing a Humanoid Robot Platform
Dr. Amarjeet Singh
 
A STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYER
A STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYERA STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYER
A STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYER
ijcseit
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - Abhijeet
Abhijeet Kalsi
 
Computer graphics
Computer graphics Computer graphics
Computer graphics
shafiq sangi
 
Introduction
IntroductionIntroduction
Introduction
鍾誠 陳鍾誠
 
Ijipm jong hyounkim_ijipm1-070061ip
Ijipm jong hyounkim_ijipm1-070061ipIjipm jong hyounkim_ijipm1-070061ip
Ijipm jong hyounkim_ijipm1-070061ip
JongHyoun
 
Road attack
Road attackRoad attack
Road attack
Samba Siva
 
ChatGPT in Education
ChatGPT in EducationChatGPT in Education
ChatGPT in Education
Victor del Rosal
 
Prim algorithm for the implementation of random mazes in videogames
Prim algorithm for the  implementation of random mazes  in videogamesPrim algorithm for the  implementation of random mazes  in videogames
Prim algorithm for the implementation of random mazes in videogames
Félix Santos
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
Upendra Sengar
 
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth ThomasHoly smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
AMD Developer Central
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
Dileep Maurya
 
IRJET- Technical Graphic Showcase
IRJET- Technical Graphic ShowcaseIRJET- Technical Graphic Showcase
IRJET- Technical Graphic Showcase
IRJET Journal
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in c
Upendra Sengar
 
A realtime classic chess game [proposal]
A realtime classic chess game [proposal]A realtime classic chess game [proposal]
A realtime classic chess game [proposal]
Nischal Lal Shrestha
 
Biological organism simulation using procedural growth "Organimo 1.0"
Biological organism simulation using procedural growth "Organimo 1.0"Biological organism simulation using procedural growth "Organimo 1.0"
Biological organism simulation using procedural growth "Organimo 1.0"
Devyani Singh
 
50120130406037
5012013040603750120130406037
50120130406037
IAEME Publication
 
tic_tac_toe.pptx
tic_tac_toe.pptxtic_tac_toe.pptx
tic_tac_toe.pptx
Kunaljit2
 
bhargav_flowing-fountain
bhargav_flowing-fountainbhargav_flowing-fountain
bhargav_flowing-fountain
Bhargav K. Naidu
 
Squid Game and Music Synchronization
Squid Game and Music SynchronizationSquid Game and Music Synchronization
Squid Game and Music Synchronization
IRJET Journal
 
Developing a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDeveloping a Humanoid Robot Platform
Developing a Humanoid Robot Platform
Dr. Amarjeet Singh
 
A STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYER
A STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYERA STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYER
A STRATEGIC HYBRID TECHNIQUE TO DEVELOP A GAME PLAYER
ijcseit
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - Abhijeet
Abhijeet Kalsi
 
Computer graphics
Computer graphics Computer graphics
Computer graphics
shafiq sangi
 
Ijipm jong hyounkim_ijipm1-070061ip
Ijipm jong hyounkim_ijipm1-070061ipIjipm jong hyounkim_ijipm1-070061ip
Ijipm jong hyounkim_ijipm1-070061ip
JongHyoun
 
Prim algorithm for the implementation of random mazes in videogames
Prim algorithm for the  implementation of random mazes  in videogamesPrim algorithm for the  implementation of random mazes  in videogames
Prim algorithm for the implementation of random mazes in videogames
Félix Santos
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
Upendra Sengar
 
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth ThomasHoly smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
AMD Developer Central
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
Dileep Maurya
 
IRJET- Technical Graphic Showcase
IRJET- Technical Graphic ShowcaseIRJET- Technical Graphic Showcase
IRJET- Technical Graphic Showcase
IRJET Journal
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in c
Upendra Sengar
 
A realtime classic chess game [proposal]
A realtime classic chess game [proposal]A realtime classic chess game [proposal]
A realtime classic chess game [proposal]
Nischal Lal Shrestha
 
Biological organism simulation using procedural growth "Organimo 1.0"
Biological organism simulation using procedural growth "Organimo 1.0"Biological organism simulation using procedural growth "Organimo 1.0"
Biological organism simulation using procedural growth "Organimo 1.0"
Devyani Singh
 
tic_tac_toe.pptx
tic_tac_toe.pptxtic_tac_toe.pptx
tic_tac_toe.pptx
Kunaljit2
 
Ad

Recently uploaded (20)

"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
New Microsoft PowerPoint Presentation.pdf
New Microsoft PowerPoint Presentation.pdfNew Microsoft PowerPoint Presentation.pdf
New Microsoft PowerPoint Presentation.pdf
mohamedezzat18803
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
New Microsoft PowerPoint Presentation.pdf
New Microsoft PowerPoint Presentation.pdfNew Microsoft PowerPoint Presentation.pdf
New Microsoft PowerPoint Presentation.pdf
mohamedezzat18803
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Ad

Mini Max Algorithm Proposal Document

  • 1. A MINOR PROJECT PROPOSAL ON MINIMAX ALGORITHM BASED TIC-TAC-TOE SUBMITTED BY: SAMEER BHATTARAI (BCT/071/38) SAROJ RAJ SHARMA (BCT/071/41) SHEETAL BARAL (BCT/071/43) UJJAWAL POUDEL (BCT/071/48) DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING DHARAN, NEPAL TRIBHUVAN UNIVERSITY INSTITUTE OF ENGINEERING PURWANCHAL CAMPUS NOVEMBER, 2017
  • 2. 2 | P a g e TABLE OF CONTENTS 1 INTRODUCTION......................................................................................3 1.1 General Introduction.............................................................................3 1.2 Purpose.................................................................................................3 2 AIMS AND OBJECTIVES........................................................................4 3 METHODOLOGY.....................................................................................5 3.1 Flowchart..............................................................................................5 3.2 Use Case Diagram................................................................................7 4 ALGORITHM............................................................................................9 5 REFERENCES.........................................................................................11 LIST OF FIGURES Figure 1.1 Flow chart of Tic Tac Toe………..................................................6 Figure 1.2.a Use case diagram of Player VS Player........................................7 Figure 1.2.b Use case diagram of User VS Computer.....................................8
  • 3. 3 | P a g e 1. INTRODUCTION 1.1 General Introduction TodayAIis one ofthe most promising field ofcomputerscience. From solving complex problems to doing certain things better than most humans, it has many applications. Such capability of AI and its wide use has led us into working on this project which will be based on “MINIMAX ALGORITHM”, a popular algorithm basically used in game playing. The project will try to demonstrate the implementation of an AI algorithm and it effectiveness against a human opponent in game playing. Tic Tac Toe (also known as noughts and crosses orXs and Os) is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game. The following example game is won by the first player, X: fig (1.a) Winning condition of Player X Tic Tac Toe is played by young children and adults alike. It is a great way to pass your free time whether you’re standing in a line, waiting for a bus, spending time with your friends or in the middle of a boring lecture. The friendliness of Tic Tac Toe makes it ideal as a pedagogical tool for teaching and learning the concepts of good sportsmanship and the branch of artificial intelligence that deals with the searching of game trees. 1.2 Purpose The purpose of developing a Tic Tac Toe application is to computerize the traditional way of playing Tic Tac Toe and give it a modern technological touch. Another purpose for developing this app is to make this traditional game famous among today’s exclusively tech loving kids.
  • 4. 4 | P a g e 2. AIMS AND OBJECTIVES Following are the objectives of this project:  To be familiar with Object Oriented Programming (OOP).  To learn about android device and android app development.  To learn process ofproject development.  To implement AI based MINIMAX ALGORITHM in digital device.  To eliminate the use of paper for playing TIC-TAC-TOE. The aim of this project is to develop a Tic-Tac-Toe game for mobile device. The game is supposed to consist of two parts, one a single player game (a player against a system), and the other a multi-player game (two players on their mobile devices, playing against each other).
  • 5. 5 | P a g e 3. METHODOLOGY 3.1 FLOW CHART Start Game Mode Single Or Multi? A Enter name P1 &P2 Move Player2 wins Game is Tie Player1 wins Game is Tie End Check whose Turn? Move Check Win? Check Win? Check Tie? Check Tie? Multi Single P1P2 F F T T TT Play Again? F F F T This symbol is connecting symbol for process and sub process
  • 6. 6 | P a g e A Enter name ? Move Comp wins Game is Tie Player1 wins Game is Tie End Check whose Turn? Move Check Win? Check Win? Check Tie? Check Tie? Single P1Comp F F T T TT Play Again? F F F T This symbol is connecting symbol for process and sub process Fig 1.1: Flow chart of Tic Tac Toe
  • 7. 7 | P a g e 3.2 USE CASE DIAGRAM <<include>> Select Game type Enter Name Start Take Move Check Game Over Result Play Again Player 1 Player 2 <<include>> <<include>> Fig 1.2.a: Use case diagram of Player VS Player
  • 8. 8 | P a g e <<include>> Select Game type Enter Name Start Take Move Check Game Over Result Play Again User Computer <<include>> <<include>> Fig 1.2.b: Use case diagram for User VS Computer
  • 9. 9 | P a g e 4. ALGORITHM In case of AI move  Finding the Best Move : We shall be introducing a new function called findBestMove() . This function evaluates all the available moves using minimax() and then returns the best move the maximizer can make. function findBestMove (Board): bestMove = NULL for each move is board : if current move is better than bestMove bestMove = current Move return bestMove  To check whether or not the current move is better than the best move we take the help of minimax() function which will consider all the possible ways the game can go and returns the best value for that move, assuming the opponent also plays optimally. function minimax (board , depth ,isMaximizingPlayer): if current board state is a terminal state: return value of the board if isMaximizingPlayer : bestVal = -INFINITY for each move in board: value =minimax(board , depth+1 ,false) bestVal = max(bestVal ,value) return bestVal else : bestVal =+INFINITY
  • 10. 10 | P a g e for each move in board : value = minimax(board , depth+1 ,true) bestVal = min (bestVal ,value) return bestVal  To check whether the game is over and to make sure there are no moves left we use isMovesLeft() function. function isMovesLeft (board): for each cell in board: if current cell is empty: return ture return false
  • 11. 11 | P a g e 5. REFERENCES  J. Horton, “Android Programming for Beginners”, Packt Publishing Ltd, 2015. Y. D. Liang, “Introduction to Java Programming, Pearson Education, 2015. I. Sommerville, “Software Engineering”, Pearson Education, 2016. “Android Tutorial”, http://www.tutorialspoint.com/, N.P., n.d. Web, 15 May 2016.