Parallel Programming in Chess Simulations Part 2 Tyler Patton.

Slides:



Advertisements
Similar presentations
Traveling Salesperson Problem
Advertisements

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.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
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.
Application of Artificial intelligence to Chess Playing Capstone Design Project 2004 Jason Cook Bitboards  Bitboards are 64 bit unsigned integers, with.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Search Strategies.  Tries – for word searchers, spell checking, spelling corrections  Digital Search Trees – for searching for frequent keys (in text,
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.
This time: Outline Game playing The minimax algorithm
Game Playing CSC361 AI CSC361: Game Playing.
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.
Game Tree Search based on Russ Greiner and Jean-Claude Latombe’s notes.
1 Solving Ponnuki-Go on Small Board Paper: Solving Ponnuki-Go on small board Authors: Erik van der Werf, Jos Uiterwijk, Jaap van den Herik Presented by:
double AlphaBeta(state, depth, alpha, beta) begin if depth
ICS-270a:Notes 5: 1 Notes 5: Game-Playing ICS 270a Winter 2003.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
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 Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Mark Dunlop, Computer and Information Sciences, Strathclyde University 1 Algorithms & Complexity 5 Games Mark D Dunlop.
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.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
Jack Chen TJHSST Computer Systems Lab Abstract The purpose of this project is to explore Artificial Intelligence techniques in the board game.
Lecture 3: Uninformed Search
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 Playing Revision Mini-Max search Alpha-Beta pruning General concerns on games.
Ricochet Robots Mitch Powell Daniel Tilgner. Abstract Ricochet robots is a board game created in Germany in A player is given 30 seconds to find.
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.
Parallel Programming in Chess Simulations Tyler Patton.
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.
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
CMSC 421: Intro to Artificial Intelligence October 6, 2003 Lecture 7: Games Professor: Bonnie J. Dorr TA: Nate Waisbrot.
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.
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
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.
Search: Games & Adversarial Search Artificial Intelligence CMSC January 28, 2003.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
Adversarial Search and Game-Playing
Announcements Homework 1 Full assignment posted..
Iterative Deepening A*
CS 460 Spring 2011 Lecture 4.
Distance Computation “Efficient Distance Computation Between Non-Convex Objects” Sean Quinlan Stanford, 1994 Presentation by Julie Letchner.
Dakota Ewigman Jacob Zimmermann
Game playing.
Announcements Homework 3 due today (grace period through Friday)
Alpha-Beta Search.
Kevin Mason Michael Suggs
NIM - a two person game n objects are in one pile
Alpha-Beta Search.
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Search and Game Playing
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Alpha-Beta Search.
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Parallel Programming in Chess Simulations Part 2 Tyler Patton

Discussion: Chess Engine Basics Everything Parallel What Next?

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

Basics : StockFish implementation Minimax Alpha-Beta pruning Bitboards Late Move Reductions Large transposition table

Basics : Minimax search Concept Maximize the evaluation of your move while minimizing opponents move evaluation Reviews each possible move sequence In chess, Minimax has a high time cost since every move sequence is evaluated regardless of the move

Basics : Alpha-Beta Pruning Allows for eliminations of branches Alpha: Our best move so far in the current path Beta: Our Opponent’s best move so far in the current path If the current node has a better beta value we prune the branch (the best beta value is minimum)

Basics : Time complexity Minimax Search: O(b m ) Where b is branch factor and m is move depth For chess, b ≈ 35 and m ≈ 100 Alpha Beta Pruning: O(b m/2 ) Doubles search depth from minimax

Basics : Late Move Reduction (LMR) Alpha-Beta produces an ordered list of effective moves to search Moves toward the end of the list are unlikely to produce values that increase alpha LMR does a reduced depth search on the late move and checks for an increase versus alpha If the score is greater than or equal to alpha we know nothing and complete a full depth search If the score is less than alpha we prune this node

Basics : 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 : Parallelizing Alpha-Beta pruning Goal: Use multiple processors to simultaneously search different branches of the game tree Drawback: Dependency on the alpha value Parallel algorithms tend to be less efficient since the alpha value is not as strong If the best alpha value is the first branch searched then the parallel algorithm has equal iterations to the sequential algorithm Processors are dependent on each other for updated alpha values which cause communication locks

Parallelization : Principal Variation Splitting (PVS) 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 Processors work under the same node

Parallelization : Enhanced Principal Variation Splitting (EPVS) Simple improvement of PVS When a processor runs out of work: Stop all processors at ply P Evaluate the branches 2 ply Split the processors among the tree like PVS Interacts with transposition table further calculations are not redundant Increased communication overhead

Parallelization : Dynamic Tree Splitting (DTS) Assumptions: Shared memory Communication cost = 0 (Cray C916/1024 computer) Steps: One processor searches from ply = 1 to N Each other processer begins processing nodes as in PVS If a processor has no work to do it broadcasts to help and joins another processor with work to share A split position is chosen and the processors divide the node Evaluations and splitting are looped until the node is complete

Parallelization : Speedup Comparisons PVS: EPVS: DTS:

What Next? Some things we didn’t have time for Bitboards Data structure for storing chess positions Younger Brother Wait Concept Master-slave approach; similar to DTS GPU implementations i.e. CPU generates the tree then GPU evaluates Neural Networks Simulation technique which may allow more processors

What Next? Looking to the future The best algorithm for large numbers of processors and indefinite tree size is unknown 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 Explore new algorithms that don’t rely on communication pitfalls or tree structure

Questions?

Sources: