SlideShare una empresa de Scribd logo
1 de 37
Unbeatable TicTacToe (xox) Alp Çoker www.alpcoker.com [email_address] Game Tree
[object Object]
Game Systems Rely On ,[object Object],[object Object],[object Object],[object Object]
Board Games Tic Tac Toe,Chess,Go....
Why Board Games? ,[object Object],[object Object],[object Object],[object Object]
Minimax Method ,[object Object],[object Object],[object Object],[object Object]
Minimax Method ,[object Object],[object Object],[object Object],[object Object]
Minimax Method ,[object Object],[object Object],[object Object]
Minimax Search Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Evaluation Function ,[object Object],[object Object],[object Object],[object Object]
Minimax ( Generate Tree )
Minimax ( Decide Whose Turn ) MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 12 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 12 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 12 4 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 4 12 4 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 4 3 12 7 6 3 4 18 6 15 7 24 15 12 5 18 6 7 11 7 24 1 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 7 4 3 12 7 6 3 4 18 6 15 7 24 15 12 5 18 6 7 11 7 24 1 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
Minimax ( Evaluate Funcions ) 4 3 12 6 3 4 18 6 15 24 15 12 5 18 6 11 7 24 1 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN 7 7 7 7
α-β Pruning ,[object Object],[object Object]
α-β Pruning ,[object Object]
α-β Pruning 11 7 5 1 8 10 16 14 2 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
α-β Pruning 7 11 7 5 1 8 10 16 14 2 <7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
α-β Pruning 7 11 7 5 1 8 10 16 14 2 <7 >7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
α-β Pruning 7 11 7 5 1 8 10 16 14 2 <7 >7 <5 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
α-β Pruning 7 11 5 7 5 8 10 16 2 <7 >7 <5 In 7<x and 5>x interval  there can be no  x , so we don’t  Need to traverse in nodes 14 and 1 1 14 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
α-β Pruning 7 11 7 5 8 MAX ( Artificial Intelligence ) MIN ( Player ) MAX 10 16 2 <7 >7 <5 1 14 <10 In 7<x and 10>x interval  there can be x then continue in nodes 2 and 8
α-β Pruning 7 11 7 5 8 MAX ( Artificial Intelligence ) MIN ( Player ) MAX 10 16 2 <7 >7 <5 1 14 <2 In 7<x and 2>x interval  there can be no  x , so we don’t  Need to traverse in node 8.
α-β Pruning 7 7 11 7 5 8 MAX ( Artificial Intelligence ) MIN ( Player ) MAX 10 16 2 <7 >7 <5 1 14 <2
Tic Tac Toe
Tic Tac Toe  Game Search
Applying Minimax &  α-β Pruning   ,[object Object],[object Object],[object Object],[object Object],[object Object]
Applying Minimax &  α-β Pruning   I assume the game state is like above form.  Next move will be X and that will be  determined by computer using Minimax Method with  α-β Pruning  step by step.
-1 0 0 -1 +1 +1 0 0 MAX  ( AI ) MAX  ( AI ) MIN  ( Opponent ) +1 +1 MIN  ( Opponent ) -1 -1 0 0 α-β Pruning Computer Choses That Move
¿  Questions ?
Alp Çoker www.alpcoker.com [email_address] Thanks...

Más contenido relacionado

La actualidad más candente

Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
Nuruzzaman Milon
 

La actualidad más candente (20)

Min-Max algorithm
Min-Max algorithmMin-Max algorithm
Min-Max algorithm
 
Recursive algorithms
Recursive algorithmsRecursive algorithms
Recursive algorithms
 
Alpha beta
Alpha betaAlpha beta
Alpha beta
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
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
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
Introduction to Prolog
Introduction to PrologIntroduction to Prolog
Introduction to Prolog
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack Problem
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptx
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
1.9. minimization of dfa
1.9. minimization of dfa1.9. minimization of dfa
1.9. minimization of dfa
 
PROLOG: Introduction To Prolog
PROLOG: Introduction To PrologPROLOG: Introduction To Prolog
PROLOG: Introduction To Prolog
 
Three address code In Compiler Design
Three address code In Compiler DesignThree address code In Compiler Design
Three address code In Compiler Design
 
AI_Session 13 Adversarial Search .pptx
AI_Session 13 Adversarial Search .pptxAI_Session 13 Adversarial Search .pptx
AI_Session 13 Adversarial Search .pptx
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
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
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 

Destacado

Priority Lands September 25 2008
Priority Lands September 25 2008Priority Lands September 25 2008
Priority Lands September 25 2008
ecopatriot80
 
TRIES_data_structure
TRIES_data_structureTRIES_data_structure
TRIES_data_structure
ddewithaman10
 
brand building and service marketing at banyan tree hotels and resorts
brand building and service marketing at banyan tree hotels and resortsbrand building and service marketing at banyan tree hotels and resorts
brand building and service marketing at banyan tree hotels and resorts
saurabh
 

Destacado (20)

Tic tac toe with IBM DevOps
Tic tac toe with IBM DevOpsTic tac toe with IBM DevOps
Tic tac toe with IBM DevOps
 
Priority Lands September 25 2008
Priority Lands September 25 2008Priority Lands September 25 2008
Priority Lands September 25 2008
 
K d tree_cpp
K d tree_cppK d tree_cpp
K d tree_cpp
 
Dynamic DFS in Undirected Graph using Segment Tree
Dynamic DFS in Undirected Graph using Segment TreeDynamic DFS in Undirected Graph using Segment Tree
Dynamic DFS in Undirected Graph using Segment Tree
 
TripleTree eDiscovery
TripleTree  eDiscoveryTripleTree  eDiscovery
TripleTree eDiscovery
 
Chapter 15
Chapter 15Chapter 15
Chapter 15
 
Ch15 Heap
Ch15 HeapCh15 Heap
Ch15 Heap
 
Segment tree
Segment treeSegment tree
Segment tree
 
Segment tree
Segment treeSegment tree
Segment tree
 
A Parallel Data Distribution Management Algorithm
A Parallel Data Distribution Management AlgorithmA Parallel Data Distribution Management Algorithm
A Parallel Data Distribution Management Algorithm
 
IGDA日本 2017年 新年会ライトニングトーク
IGDA日本 2017年 新年会ライトニングトークIGDA日本 2017年 新年会ライトニングトーク
IGDA日本 2017年 新年会ライトニングトーク
 
Segment tree
Segment treeSegment tree
Segment tree
 
STP
STPSTP
STP
 
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
MEIS 2015 : A Multilayered Model for Artificial Intelligence of Game Characte...
 
数据结构回顾
数据结构回顾数据结构回顾
数据结构回顾
 
TRIES_data_structure
TRIES_data_structureTRIES_data_structure
TRIES_data_structure
 
23 priority queue
23 priority queue23 priority queue
23 priority queue
 
Spanning Tree Bridge Root Priority value & Extended System ID
Spanning Tree Bridge Root Priority value & Extended System IDSpanning Tree Bridge Root Priority value & Extended System ID
Spanning Tree Bridge Root Priority value & Extended System ID
 
Artificial Intelligence
Artificial Intelligence Artificial Intelligence
Artificial Intelligence
 
brand building and service marketing at banyan tree hotels and resorts
brand building and service marketing at banyan tree hotels and resortsbrand building and service marketing at banyan tree hotels and resorts
brand building and service marketing at banyan tree hotels and resorts
 

Similar a Game Tree ( Oyun Ağaçları )

Similar a Game Tree ( Oyun Ağaçları ) (20)

Minimax
MinimaxMinimax
Minimax
 
1.game
1.game1.game
1.game
 
AI Strategies for Solving Poker Texas Hold'em
AI Strategies for Solving Poker Texas Hold'emAI Strategies for Solving Poker Texas Hold'em
AI Strategies for Solving Poker Texas Hold'em
 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
 
Minimax
MinimaxMinimax
Minimax
 
Minimax.pdf
Minimax.pdfMinimax.pdf
Minimax.pdf
 
AI_unit3.pptx
AI_unit3.pptxAI_unit3.pptx
AI_unit3.pptx
 
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdfAI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
 
AI Lesson 07
AI Lesson 07AI Lesson 07
AI Lesson 07
 
0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx0-miniproject sem 4 review 1(1)(2).pptx
0-miniproject sem 4 review 1(1)(2).pptx
 
MINI-MAX ALGORITHM.pptx
MINI-MAX ALGORITHM.pptxMINI-MAX ALGORITHM.pptx
MINI-MAX ALGORITHM.pptx
 
Game playing
Game playingGame playing
Game playing
 
Chess engine presentation
Chess engine presentationChess engine presentation
Chess engine presentation
 
adversial search.pptx
adversial search.pptxadversial search.pptx
adversial search.pptx
 
Adversarial Search
Adversarial SearchAdversarial Search
Adversarial Search
 
Intelligent Heuristics for the Game Isolation
Intelligent Heuristics  for the Game IsolationIntelligent Heuristics  for the Game Isolation
Intelligent Heuristics for the Game Isolation
 
An analysis of minimax search and endgame databases in evolving awale game pl...
An analysis of minimax search and endgame databases in evolving awale game pl...An analysis of minimax search and endgame databases in evolving awale game pl...
An analysis of minimax search and endgame databases in evolving awale game pl...
 
AN ANALYSIS OF MINIMAX SEARCH AND ENDGAME DATABASES IN EVOLVING AWALE GAME PL...
AN ANALYSIS OF MINIMAX SEARCH AND ENDGAME DATABASES IN EVOLVING AWALE GAME PL...AN ANALYSIS OF MINIMAX SEARCH AND ENDGAME DATABASES IN EVOLVING AWALE GAME PL...
AN ANALYSIS OF MINIMAX SEARCH AND ENDGAME DATABASES IN EVOLVING AWALE GAME PL...
 
9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx
 
Ddn
DdnDdn
Ddn
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Game Tree ( Oyun Ağaçları )

  • 1. Unbeatable TicTacToe (xox) Alp Çoker www.alpcoker.com [email_address] Game Tree
  • 2.
  • 3.
  • 4. Board Games Tic Tac Toe,Chess,Go....
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 12. Minimax ( Decide Whose Turn ) MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 13. Minimax ( Evaluate Funcions ) 12 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 14. Minimax ( Evaluate Funcions ) 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 15. Minimax ( Evaluate Funcions ) 12 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 16. Minimax ( Evaluate Funcions ) 12 4 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 17. Minimax ( Evaluate Funcions ) 4 12 4 12 7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 18. Minimax ( Evaluate Funcions ) 4 3 12 7 6 3 4 18 6 15 7 24 15 12 5 18 6 7 11 7 24 1 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 19. Minimax ( Evaluate Funcions ) 7 4 3 12 7 6 3 4 18 6 15 7 24 15 12 5 18 6 7 11 7 24 1 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN
  • 20. Minimax ( Evaluate Funcions ) 4 3 12 6 3 4 18 6 15 24 15 12 5 18 6 11 7 24 1 MAX ( Artificial Intelligence ) MIN ( Player ) MAX MIN 7 7 7 7
  • 21.
  • 22.
  • 23. α-β Pruning 11 7 5 1 8 10 16 14 2 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
  • 24. α-β Pruning 7 11 7 5 1 8 10 16 14 2 <7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
  • 25. α-β Pruning 7 11 7 5 1 8 10 16 14 2 <7 >7 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
  • 26. α-β Pruning 7 11 7 5 1 8 10 16 14 2 <7 >7 <5 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
  • 27. α-β Pruning 7 11 5 7 5 8 10 16 2 <7 >7 <5 In 7<x and 5>x interval there can be no x , so we don’t Need to traverse in nodes 14 and 1 1 14 MAX ( Artificial Intelligence ) MIN ( Player ) MAX
  • 28. α-β Pruning 7 11 7 5 8 MAX ( Artificial Intelligence ) MIN ( Player ) MAX 10 16 2 <7 >7 <5 1 14 <10 In 7<x and 10>x interval there can be x then continue in nodes 2 and 8
  • 29. α-β Pruning 7 11 7 5 8 MAX ( Artificial Intelligence ) MIN ( Player ) MAX 10 16 2 <7 >7 <5 1 14 <2 In 7<x and 2>x interval there can be no x , so we don’t Need to traverse in node 8.
  • 30. α-β Pruning 7 7 11 7 5 8 MAX ( Artificial Intelligence ) MIN ( Player ) MAX 10 16 2 <7 >7 <5 1 14 <2
  • 32. Tic Tac Toe Game Search
  • 33.
  • 34. Applying Minimax & α-β Pruning I assume the game state is like above form. Next move will be X and that will be determined by computer using Minimax Method with α-β Pruning step by step.
  • 35. -1 0 0 -1 +1 +1 0 0 MAX ( AI ) MAX ( AI ) MIN ( Opponent ) +1 +1 MIN ( Opponent ) -1 -1 0 0 α-β Pruning Computer Choses That Move
  • 37. Alp Çoker www.alpcoker.com [email_address] Thanks...