Parallel Programming in Chess Simulations Tyler Patton.

Slides:



Advertisements
Similar presentations
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Advertisements

Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
AI for Connect-4 (or other 2-player games) Minds and Machines.
Games & Adversarial Search
Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
CS 484 – Artificial Intelligence
University College Cork (Ireland) Department of Civil and Environmental Engineering Course: Engineering Artificial Intelligence Dr. Radu Marinescu Lecture.
Adversarial Search: Game Playing Reading: Chapter next time.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search CSE 473 University of Washington.
Artificial Intelligence for Games Game playing Patrick Olivier
Adversarial Search 對抗搜尋. Outline  Optimal decisions  α-β pruning  Imperfect, real-time decisions.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Adversarial Search Board games. Games 2 player zero-sum games Utility values at end of game – equal and opposite Games that are easy to represent Chess.
Mastering Chess An overview of common chess AI Adam Veres.
This time: Outline Game playing The minimax algorithm
Game Playing CSC361 AI CSC361: Game Playing.
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
Min-Max Trees Based on slides by: Rob Powers Ian Gent Yishay Mansour.
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Alpha-Beta Search. 2 Two-player games The object of a search is to find a path from the starting position to a goal position In a puzzle-type problem,
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
Group 1 : Ashutosh Pushkar Ameya Sudhir From. Motivation  Game playing was one of the first tasks undertaken in AI  Study of games brings us closer.
ICS-270a:Notes 5: 1 Notes 5: Game-Playing ICS 270a Winter 2003.
Game Playing State-of-the-Art  Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in Used an endgame database defining.
CSC 412: AI Adversarial Search
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Chess Applications:Alpha- Beta Search Greg Parker ‘03 Senior Thesis Advisor: Andrew Appel.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Game Playing ECE457 Applied Artificial Intelligence Spring 2007 Lecture #5.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Minimax with Alpha Beta Pruning The minimax algorithm is a way of finding an optimal move in a two player game. Alpha-beta pruning is a way of finding.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material.
GAME PLAYING 1. There were two reasons that games appeared to be a good domain in which to explore machine intelligence: 1.They provide a structured task.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Game tree search Chapter 6 (6.1 to 6.3 and 6.6) cover games. 6.6 covers state of the art game players in particular. 6.5 covers games that involve uncertainty.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Game-playing AIs Part 2 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part II  The Minimax Rule  Alpha-Beta Pruning  Game-playing.
Adversarial Search 2 (Game Playing)
Adversarial Search and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Parallel Programming in Chess Simulations Part 2 Tyler Patton.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
Adversarial Search and Game-Playing
EA C461 – Artificial Intelligence Adversarial Search
Iterative Deepening A*
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Pengantar Kecerdasan Buatan
Dakota Ewigman Jacob Zimmermann
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Kevin Mason Michael Suggs
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Games & Adversarial Search
Adversarial Search CS 171/271 (Chapter 6)
Games & Adversarial Search
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Parallel Programming in Chess Simulations Tyler Patton

Discussion: Background Sequential Optimizations Parallelization of chess

Background: What is Chess? Strategic 2 player game 64 tiles 16 pieces per player Objective to capture the opponents king

Background: Chess ELO Created by Arpad Elo to improve chess ratings Players of equal ELO have an equal chance to win A difference of 400 ELO gives a win 97% of the time to the higher rated player Basic formula: Performance Rating = Opponents’ Total Ratings + 400*(wins-losses) Number of games Average Player rating: 1200 Highest player rating: 2850 (Magnus Carlson)

Background: Scope First estimate of the number of positions: 64! / 32!*(8!) 2 *(2!) 6 =10 43 (Shannon) Tight upper bound: =10 50 (Dr. Allis) Number of possible game variations: (Shannon number) Given ~10 3 starting moves and 40 move pair average

Background: History of chess engines 1950: Alan Turing develops Turbochamp. 1962: Adam Kotok of MIT develops first “credible” chess program. 1997: Deep blue defeats Gary Kasparov in 6 games Present: Stockfish 6 holds a rating of 3309

Deep blue vs Kasparov

Sequential Optimizations: StockFish StockFish implementation: Alpha-Beta pruning Bitboards Transposition table Late move reductions

Sequential Optimizations: Minimax search Minimax: Evaluate a given move, the opponents responses and your responses to your opponent’s moves… etc. Proceed to the next move and repeat. Choose the tree which yields the best ending evaluation Assume the opponent always chooses the best move

Sequential Optimizations: Alpha-Beta Pruning Alpha is the maximum score the player is guaranteed for a branch Beta is the minimum score the opponent is guaranteed for a branch Allows for eliminations of branches in the search tree Eliminates branches if the opponent would never allow the position Ordered node complexity: O(b d/2 ) Random order complexity: O(b 3d/4 )

Sequential Optimizations: Alpha-Beta Pruning

Sequential Optimizations: Transposition Table Stores the history of search evaluations Positions that been searched are likely to be reached again Before a branch is searched the transpositions table is checked and gives the result if able Implemented as a hash table

Parallelization of Chess: Parallelizing Alpha-Beta pruning Goal: Use multiple processors to simultaneously search different branches of the game tree Drawback: Dependency on the alpha value Processors are dependent on each other for updated alpha values which cause communication locks Parallel algorithms tend to be less efficient since the alpha value is not as strong Parallel implementation only has equivalent efficiency to the sequential algorithm if the first move if the best one examined

Parallelization of Chess: Principal Variation Splitting Early technique for parallelizing alpha-beta Assumptions: The game tree is well ordered The leftmost path is the best Updates alpha after a branch is searched

Parallelization of Chess: Typical Speedup Principal Variation Splitting Implemented using 4 or fewer Processors with a speedup of ~3.5 The Younger Brothers Wait Concept achieved a speedup of 140 on 256 nodes CilkChess parallel engine is shown to be scalable up to 1000 nodes with a similar speedup to The Younger Brothers Wait Concept

Parallelization of Chess: Looking to the future The best algorithm for large numbers of processors and indefinite tree size is unknown Explore new algorithms that don’t rely on communication pitfalls Optimizations to existing algorithms and techniques are still possible i.e. making the new alpha available to each processor when its found as opposed to when a processor finishes a search

Questions?