SlideShare uma empresa Scribd logo
1 de 13
Android application
TIC TAC TOE USING MINIMAX ALGORITHM
What is Android?
Android is a mobile operating system developed by Google.
The Android operating system (OS) is based on the Linux kernel.
Android is open source, meaning developers can modify and customize the OS
for each phone.
 Developers can create programs for Android using the free Android software
developer kit (SDK).
History of Android
Introduction of AI?
AI is a human made system that is capable of performing works concisely like human.
Basically, AI is an intelligent code or algorithm.
Forms: ML, NLP, Speech Recognization, Computer Vision, Robotics, Expert system etc.
The theory and development of computer systems able to perform tasks normally
requiring human intelligence, such as visual perception, speech recognition, decision-
making, and translation between languages.
The goals of AI research include reasoning, learning natural language processing and
ability to move and manipulate object.
There are a large number of tools used in AI, including versions of search and
mathematical optimization ,logic ,method based on probability and economics and many
others.
History of AI
The intellectual roots of AI and concepts of intelligent machines may be found in
Greek mythology.
But, the modern age of AI is said to be begun from 1956 when John McCarthy
coined the term “Artificial Intelligence” as the topic of Dartmouth Conference.
In mid 80’s, NN became widely used with backpropagation algorithm.
In 1990’s, data mining, machine vision, NLP, virtual reality et cetera were born.
Autonomous robotics system, SoJourner, developed in the surface of mars by
NASA in 1997.
Recently in 2015, AlphaGo(Monte Carlo Tree Search Algorithm) became first
computer program to beat a professional Go player.
Fields in which AI is used
AI can be seen everywhere nowadays. From a mobile phone in your hand to super
computers used by high tech companies.
Medical diagnosis
Speech recognition
Stock trading
Robot control law
Remote sensing
Scientific discovery
Games like tic tac toe and chess
-
Tic Tac Toe Board
It is two players, X and O, game who take turns marking the spaces in a 3*3 grid.
The player who succeeds in placing three respective marks in a horizontal, vertical,
or diagonal wins the game.
There are 9 position in board. 1 2 3
4 5 6
7 8 9
Purpose
Tic Tac Toe is a great way to pass your free time. 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.
The main 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.
Aims and Objective
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 of project 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).
Minimax Algorithm in Game Theory
Minimax is a kind of backtracking algorithm that is used in decision making and
game theory to find the optimal move for a player, assuming that your opponent
also plays optimally. It is widely used in two player turn based games such as
Tic-Tac-Toe, Chess, etc.
Minimax is based on the assumption that your opponent will make the move that
will maximize his/her potential score, thus minimizing your potential score and
you want to do same to your opponent.
In case of Minimax algorithm first we assign worst case that is MAX=-
INFINITY and MIN=+INFINITY. After that new value is assigned to MAX or
MIN by comparison.
Minimax search is also Depth First Search.
Algorithm for our project
In case of AI move we use MINIMAX ALGORITHM
A pseudocode for minimax is described below:
Minimax(node n, depth d, player p)
1. If depth=0 then
return value (node)
2. If player = “MAX” // for a maximizing player
set a= - INFINITY
for every child of node
value = minimax(child , depth +1 , “MIN”)
a = max(a , value)
return (a)
else // for minimizing player
set a = + INFINITY
for every child of node
value = minimax (child , depth+1 , “MAX”)
a= min(a , value)
return (a)
Making our AI more smart
In case of first move for AI we use
Random ran=new Random()
int n=ran.nextInt(9)
For AI move ,we have to select that move
which lead us for fast victory and slow defeat.
Technologies Used
Platform : Android OS
Server Side : Java(jdk 1.8)
Project Build Target : Android 5.0.1(API 27)
THANK YOU

Mais conteúdo relacionado

Mais procurados

Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 

Mais procurados (20)

Tic tac toe
Tic tac toeTic tac toe
Tic tac toe
 
tic-tac-toe: Game playing
 tic-tac-toe: Game playing tic-tac-toe: Game playing
tic-tac-toe: Game playing
 
Min-Max algorithm
Min-Max algorithmMin-Max algorithm
Min-Max algorithm
 
Problems problem spaces and search
Problems problem spaces and searchProblems problem spaces and search
Problems problem spaces and search
 
Tic Tac Toe ppt
Tic Tac Toe pptTic Tac Toe ppt
Tic Tac Toe ppt
 
Tic tac toe game with graphics presentation
Tic  tac  toe game with graphics presentationTic  tac  toe game with graphics presentation
Tic tac toe game with graphics presentation
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ project
 
15 puzzle problem using branch and bound
15 puzzle problem using branch and bound15 puzzle problem using branch and bound
15 puzzle problem using branch and bound
 
Tic tac toe
Tic tac toeTic tac toe
Tic tac toe
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Minimax
MinimaxMinimax
Minimax
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
AI_Session 15 Alpha–Beta Pruning.pptx
AI_Session 15 Alpha–Beta Pruning.pptxAI_Session 15 Alpha–Beta Pruning.pptx
AI_Session 15 Alpha–Beta Pruning.pptx
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 

Semelhante a Tic Tac Toe using Mini Max Algorithm

Mahakal institute of technology
Mahakal institute of technologyMahakal institute of technology
Mahakal institute of technology
Oman Jangir
 
INTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
INTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNINGINTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
INTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
sowmyamPSGRKCW
 
Artificial intelligence in practice- part-1
Artificial intelligence in practice- part-1Artificial intelligence in practice- part-1
Artificial intelligence in practice- part-1
GMR Group
 

Semelhante a Tic Tac Toe using Mini Max Algorithm (20)

Artificial Intelligence in Gaming
Artificial Intelligence in GamingArtificial Intelligence in Gaming
Artificial Intelligence in Gaming
 
ARTIFICIAL INTELLLLIGENCEE modul11_AI.pptx
ARTIFICIAL INTELLLLIGENCEE modul11_AI.pptxARTIFICIAL INTELLLLIGENCEE modul11_AI.pptx
ARTIFICIAL INTELLLLIGENCEE modul11_AI.pptx
 
AI3391 ARTIFICIAL INTELLIGENCE Unit I notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE Unit I notes.pdfAI3391 ARTIFICIAL INTELLIGENCE Unit I notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE Unit I notes.pdf
 
Artificial Intelligence - An Introduction
Artificial Intelligence - An IntroductionArtificial Intelligence - An Introduction
Artificial Intelligence - An Introduction
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptx
 
Artificial intelligence ppt
Artificial intelligence pptArtificial intelligence ppt
Artificial intelligence ppt
 
Mahakal institute of technology
Mahakal institute of technologyMahakal institute of technology
Mahakal institute of technology
 
Game playing in artificial intelligent technique
Game playing in artificial intelligent technique Game playing in artificial intelligent technique
Game playing in artificial intelligent technique
 
Excite artificial intelligence Class 9
Excite artificial intelligence Class 9Excite artificial intelligence Class 9
Excite artificial intelligence Class 9
 
Deep learning vs ML vs AI vs DS .pdf
Deep learning vs ML vs AI vs DS .pdfDeep learning vs ML vs AI vs DS .pdf
Deep learning vs ML vs AI vs DS .pdf
 
Artifitial intelligence (ai) all in one
Artifitial intelligence (ai) all in oneArtifitial intelligence (ai) all in one
Artifitial intelligence (ai) all in one
 
AI.pptx
AI.pptxAI.pptx
AI.pptx
 
aman presentation 2.pptx
aman presentation 2.pptxaman presentation 2.pptx
aman presentation 2.pptx
 
Introduction to AI
Introduction to AIIntroduction to AI
Introduction to AI
 
AN INTRODUCTION TO EMERGING TECHNOLOGY
AN INTRODUCTION TO EMERGING TECHNOLOGYAN INTRODUCTION TO EMERGING TECHNOLOGY
AN INTRODUCTION TO EMERGING TECHNOLOGY
 
INTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
INTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNINGINTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
INTRODUCTION TO ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Artificial intelligence in practice- part-1
Artificial intelligence in practice- part-1Artificial intelligence in practice- part-1
Artificial intelligence in practice- part-1
 
Artificial intelligence LAB 1 overview & intelligent systems
Artificial intelligence LAB 1   overview & intelligent systemsArtificial intelligence LAB 1   overview & intelligent systems
Artificial intelligence LAB 1 overview & intelligent systems
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 

Último

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Último (20)

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
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
 
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
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(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
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
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 ...
 
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
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 

Tic Tac Toe using Mini Max Algorithm

  • 1. Android application TIC TAC TOE USING MINIMAX ALGORITHM
  • 2. What is Android? Android is a mobile operating system developed by Google. The Android operating system (OS) is based on the Linux kernel. Android is open source, meaning developers can modify and customize the OS for each phone.  Developers can create programs for Android using the free Android software developer kit (SDK). History of Android
  • 3. Introduction of AI? AI is a human made system that is capable of performing works concisely like human. Basically, AI is an intelligent code or algorithm. Forms: ML, NLP, Speech Recognization, Computer Vision, Robotics, Expert system etc. The theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual perception, speech recognition, decision- making, and translation between languages. The goals of AI research include reasoning, learning natural language processing and ability to move and manipulate object. There are a large number of tools used in AI, including versions of search and mathematical optimization ,logic ,method based on probability and economics and many others.
  • 4. History of AI The intellectual roots of AI and concepts of intelligent machines may be found in Greek mythology. But, the modern age of AI is said to be begun from 1956 when John McCarthy coined the term “Artificial Intelligence” as the topic of Dartmouth Conference. In mid 80’s, NN became widely used with backpropagation algorithm. In 1990’s, data mining, machine vision, NLP, virtual reality et cetera were born. Autonomous robotics system, SoJourner, developed in the surface of mars by NASA in 1997. Recently in 2015, AlphaGo(Monte Carlo Tree Search Algorithm) became first computer program to beat a professional Go player.
  • 5. Fields in which AI is used AI can be seen everywhere nowadays. From a mobile phone in your hand to super computers used by high tech companies. Medical diagnosis Speech recognition Stock trading Robot control law Remote sensing Scientific discovery Games like tic tac toe and chess -
  • 6. Tic Tac Toe Board It is two players, X and O, game who take turns marking the spaces in a 3*3 grid. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal wins the game. There are 9 position in board. 1 2 3 4 5 6 7 8 9
  • 7. Purpose Tic Tac Toe is a great way to pass your free time. 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. The main 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.
  • 8. Aims and Objective 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 of project 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).
  • 9. Minimax Algorithm in Game Theory Minimax is a kind of backtracking algorithm that is used in decision making and game theory to find the optimal move for a player, assuming that your opponent also plays optimally. It is widely used in two player turn based games such as Tic-Tac-Toe, Chess, etc. Minimax is based on the assumption that your opponent will make the move that will maximize his/her potential score, thus minimizing your potential score and you want to do same to your opponent. In case of Minimax algorithm first we assign worst case that is MAX=- INFINITY and MIN=+INFINITY. After that new value is assigned to MAX or MIN by comparison. Minimax search is also Depth First Search.
  • 10. Algorithm for our project In case of AI move we use MINIMAX ALGORITHM A pseudocode for minimax is described below: Minimax(node n, depth d, player p) 1. If depth=0 then return value (node) 2. If player = “MAX” // for a maximizing player set a= - INFINITY for every child of node value = minimax(child , depth +1 , “MIN”) a = max(a , value) return (a) else // for minimizing player set a = + INFINITY for every child of node value = minimax (child , depth+1 , “MAX”) a= min(a , value) return (a)
  • 11. Making our AI more smart In case of first move for AI we use Random ran=new Random() int n=ran.nextInt(9) For AI move ,we have to select that move which lead us for fast victory and slow defeat.
  • 12. Technologies Used Platform : Android OS Server Side : Java(jdk 1.8) Project Build Target : Android 5.0.1(API 27)