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

DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
Gayathri Gaayu
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 

La actualidad más candente (20)

NP completeness
NP completenessNP completeness
NP completeness
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Alpha beta pruning
Alpha beta pruningAlpha beta pruning
Alpha beta pruning
 
data structures- back tracking
data structures- back trackingdata structures- back tracking
data structures- back tracking
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
A greedy algorithms
A greedy algorithmsA greedy algorithms
A greedy algorithms
 
Backtracking
BacktrackingBacktracking
Backtracking
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
All pair shortest path
All pair shortest pathAll pair shortest path
All pair shortest path
 
AI Lecture 5 (game playing)
AI Lecture 5 (game playing)AI Lecture 5 (game playing)
AI Lecture 5 (game playing)
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
OPTIMAL BINARY SEARCH
OPTIMAL BINARY SEARCHOPTIMAL BINARY SEARCH
OPTIMAL BINARY SEARCH
 
04 brute force
04 brute force04 brute force
04 brute force
 
Chess Engine Programming
Chess Engine ProgrammingChess Engine Programming
Chess Engine Programming
 
Greedy method
Greedy methodGreedy method
Greedy method
 
Quick Sort
Quick SortQuick Sort
Quick Sort
 
Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithm
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
AI 6 | Adversarial Search
AI 6 | Adversarial SearchAI 6 | Adversarial Search
AI 6 | Adversarial Search
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 

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ı )

Gameplaying in artificial intelligence
Gameplaying in artificial intelligenceGameplaying in artificial intelligence
Gameplaying in artificial intelligence
oceanparkk
 

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.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
 
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
 
Tic tac toe on c++ project
Tic tac toe on c++ projectTic tac toe on c++ project
Tic tac toe on c++ project
 
Gameplaying in artificial intelligence
Gameplaying in artificial intelligenceGameplaying in artificial intelligence
Gameplaying in artificial intelligence
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

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...