SlideShare a Scribd company logo
1 of 11
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.

More Related Content

What's hot

Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic NotationsRishabh Soni
 
Compiler Design
Compiler DesignCompiler Design
Compiler DesignMir Majid
 
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 AlgorithmUjjawal Poudel
 
All-Reduce and Prefix-Sum Operations
All-Reduce and Prefix-Sum Operations All-Reduce and Prefix-Sum Operations
All-Reduce and Prefix-Sum Operations Syed Zaid Irshad
 
Lecture 4 asymptotic notations
Lecture 4   asymptotic notationsLecture 4   asymptotic notations
Lecture 4 asymptotic notationsjayavignesh86
 
Tic Tac Toe Java Development
Tic Tac Toe Java DevelopmentTic Tac Toe Java Development
Tic Tac Toe Java Developmentpengqia chen
 
Ch 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdfCh 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdfKrishnaMadala1
 
System call (Fork +Exec)
System call (Fork +Exec)System call (Fork +Exec)
System call (Fork +Exec)Amit Ghosh
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesSamiaAziz4
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Omkar Rane
 

What's hot (20)

Minimax
MinimaxMinimax
Minimax
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
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
 
All-Reduce and Prefix-Sum Operations
All-Reduce and Prefix-Sum Operations All-Reduce and Prefix-Sum Operations
All-Reduce and Prefix-Sum Operations
 
Python GUI
Python GUIPython GUI
Python GUI
 
asymptotic notation
asymptotic notationasymptotic notation
asymptotic notation
 
mano.ppt
mano.pptmano.ppt
mano.ppt
 
design of accumlator
design of accumlatordesign of accumlator
design of accumlator
 
Minimax
MinimaxMinimax
Minimax
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Lecture 4 asymptotic notations
Lecture 4   asymptotic notationsLecture 4   asymptotic notations
Lecture 4 asymptotic notations
 
Micro program example
Micro program exampleMicro program example
Micro program example
 
Tic Tac Toe Java Development
Tic Tac Toe Java DevelopmentTic Tac Toe Java Development
Tic Tac Toe Java Development
 
Final Exam OS fall 2012-2013 with answers
Final Exam OS fall 2012-2013 with answersFinal Exam OS fall 2012-2013 with answers
Final Exam OS fall 2012-2013 with answers
 
Ch 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdfCh 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdf
 
System call (Fork +Exec)
System call (Fork +Exec)System call (Fork +Exec)
System call (Fork +Exec)
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slides
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148
 

Similar to Mini Max Algorithm Proposal Document

Squid Game and Music Synchronization
Squid Game and Music SynchronizationSquid Game and Music Synchronization
Squid Game and Music SynchronizationIRJET Journal
 
Developing a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDeveloping a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDr. 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 PLAYERijcseit
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetAbhijeet 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-070061ipJongHyoun
 
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 videogamesFélix Santos
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in cUpendra 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 ThomasAMD 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 ShowcaseIRJET Journal
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in cUpendra 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.pptxKunaljit2
 

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
 
Developing a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDeveloping a Humanoid Robot Platform
Developing a Humanoid Robot Platform
 
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
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - Abhijeet
 
Computer graphics
Computer graphics Computer graphics
Computer graphics
 
Introduction
IntroductionIntroduction
Introduction
 
Ijipm jong hyounkim_ijipm1-070061ip
Ijipm jong hyounkim_ijipm1-070061ipIjipm jong hyounkim_ijipm1-070061ip
Ijipm jong hyounkim_ijipm1-070061ip
 
Road attack
Road attackRoad attack
Road attack
 
ChatGPT in Education
ChatGPT in EducationChatGPT in Education
ChatGPT in Education
 
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
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
 
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
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
 
IRJET- Technical Graphic Showcase
IRJET- Technical Graphic ShowcaseIRJET- Technical Graphic Showcase
IRJET- Technical Graphic Showcase
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in c
 
A realtime classic chess game [proposal]
A realtime classic chess game [proposal]A realtime classic chess game [proposal]
A realtime classic chess game [proposal]
 
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"
 
50120130406037
5012013040603750120130406037
50120130406037
 
tic_tac_toe.pptx
tic_tac_toe.pptxtic_tac_toe.pptx
tic_tac_toe.pptx
 
bhargav_flowing-fountain
bhargav_flowing-fountainbhargav_flowing-fountain
bhargav_flowing-fountain
 

Recently uploaded

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 

Recently uploaded (20)

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

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.