HPC Checkers By Andy Block Ryan Egan. Table of Contents Overview of Checkers ▫Overview of Checkers ▫Rules of the Game AI Theory The Program ▫Board ▫Sample.

Slides:



Advertisements
Similar presentations
How to Play Checkers This presentation is a tutorial on how to play one of the oldest and most popular games in history. Presented by: Joshua Cox Project.
Advertisements

Martin Boyd Christopher Hirunthanakorn
Traveling Salesperson Problem
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.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Table of Contents Why Play Chess? Setting Up the Board Get to Know the Pieces Check and Checkmate What the Chess Pieces Are Worth Opening Goals Endgame.
Application of Artificial intelligence to Chess Playing Capstone Design Project 2004 Jason Cook Bitboards  Bitboards are 64 bit unsigned integers, with.
Welcome to the basics of chess. This is a graphically designed program that will help you learn how to play chess. By Amir and Mike, 9B.
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.
Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Problem abstraction and symbolic.
Place captured red pieces here Place captured yellow pieces here To use as Kings Rules New Game Exit Left mouse click on piece – drag to desired location.
CPSC 322 Introduction to Artificial Intelligence October 25, 2004.
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)
RULES Each player begins the game with twelve normal pieces (either white or black). The pieces are automatically set in their proper positions. The object.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Othello.
Adversarial Search: Game Playing Reading: Chess paper.
THE RENJU GAME BY ABHISHEK JAIN, PRANSHU GUPTA & RHYTHM DAS PCLUB SUMMER PROJECT PRESENTATION JUNE, L7 IIT KANPUR MENTOR – SANIL JAIN.
Review of Graphs A graph is composed of edges E and vertices V that link the nodes together. A graph G is often denoted G=(V,E) where V is the set of vertices.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
Matthew Marcon Project 19 1/10/12
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.
Hex Combinatorial Search in Game Strategy by Brandon Risberg May 2006Menlo School.
CISC 235: Topic 6 Game Trees.
1 Learning Agents Laboratory Computer Science Department George Mason University Prof. Gheorghe Tecuci 3. Rote Learning.
AD FOR GAMES Lecture 4. M INIMAX AND A LPHA -B ETA R EDUCTION Borrows from Spring 2006 CS 440 Lecture Slides.
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 AIs Part 1 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part I (this set of slides)  Motivation  Game Trees  Evaluation.
Notes on Game Playing by Yun Peng of theYun Peng University of Maryland Baltimore County.
Instructor: Vincent Conitzer
How to Play Chess By: John. Dedication I dedicate this project to my family because we all love chess.
Connect Four AI Robert Burns and Brett Crawford. Connect Four  A board with at least six rows and seven columns  Two players: one with red discs and.
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.
How to Play Checkers This presentation is a tutorial on how to play on of the oldest and most popular games in history. Presented By: Cathryn Depuy Project.
Draughts. Introduction Draughts is played on the same chequered board as chess and has been played in Europe since the end of the 1100s. It is similar.
 2003, G.Tecuci, Learning Agents Laboratory 1 Learning Agents Laboratory Computer Science Department George Mason University Prof. Gheorghe Tecuci 2.
Senior Project Poster Day 2007, CIS Dept. University of Pennsylvania Reversi Meng Tran Faculty Advisor: Dr. Barry Silverman Strategies: l Corners t Corners.
Cilk Pousse James Process CS534. Overview Introduction to Pousse Searching Evaluation Function Move Ordering Conclusion.
Lecture 11 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
By: Kyle Tierney And Alec Tzanabos
Quoridor and Artificial Intelligence
Every chess master was once a beginner. Irving Chernev
Game tree search Thanks to Andrew Moore and Faheim Bacchus for slides!
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.
How To Play Checkers This Presentation on how to play one of the oldest and most popular games in history. Gage Holzhauer Checkers 1/18/12.
The Lovely Game of NIM. Version 1 - Classic NIM You will need seven objects, such as counters or blocks. It is a game for two players. Place the 7 counters.
Checkers A Matlab Project by Spenser Davison, Edward Dyakiw, Justin Pezzi, and Scott Wu.
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.
February 25, 2016Introduction to Artificial Intelligence Lecture 10: Two-Player Games II 1 The Alpha-Beta Procedure Can we estimate the efficiency benefit.
Patrick Racy Project 19 1/9/12
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
CPS 100, Spring Search, Backtracking,Heuristics l How do you find a needle in a haystack?  How does a computer play chess?  Why would you write.
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.
Adversarial Search and Game-Playing
Presented by: Jacob Thurston Project 19 – How to Play Checkers 3/8/12
CHESS.
Graph Representation (23.1/22.1)
NIM - a two person game n objects are in one pile
CSE (c) S. Tanimoto, 2001 Search-Introduction
Search.
FOUR PLAYER CHESS.
Search.
CS51A David Kauchak Spring 2019
Unit II Game Playing.
Presentation transcript:

HPC Checkers By Andy Block Ryan Egan

Table of Contents Overview of Checkers ▫Overview of Checkers ▫Rules of the Game AI Theory The Program ▫Board ▫Sample Jump ▫Future Moves ▫Parallel Processing ▫Using the Future Table Work in progress

Overview of Checkers 8x8 checkered board using only the black squares 32 positions Search space of 5x10 20 Each Player starts with 12 men

Rules of Checkers Pieces ▫Men can only move forwarded diagonally 1 space ▫Kings can move forwarded and backward diagonally 1 space ▫Upon reaching the opposite back row men become kings ▫Each player starts with 12 men Jumping ▫Men and kings are required to jump when possible ▫Multiple jumps are allowed and required when possible ▫When a man or king is jumped it is removed from the board ▫If a man jumps into the back row and becomes a king the turn is ended.

Rules of Checkers cont. Start Game ▫Red always moves first End Game ▫The game ends when one player can no longer move ▫Game can end it a draw

AI Theory Heuristics ▫Not perusing paths that appear to not be as beneficial as other paths ▫Alpha-beta pruning Planning ▫Future moves are calculated to generate a plan of attack that maximizes benefit and minimizes loss.

The Program The Board ▫Stored as 33 value integer array ▫Starting board  {1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3, 3,3,3,3,5} ▫Adjacency matrix used to navigate board. ▫The 33 rd value in the board array is used for locations that are off the board in the Adjacency matrix.

The Program cont. Jumps ▫For men jumps form a directed and acyclic graph (DAG) ▫A breadth first search is used to build a list of adjacent jumpable locations ▫Starting from the last found location the adjacency list is traversed in reverse to find the longest path. ▫This will return the greatest number of possible jumps.  Issue: This may miss jumps that would have better outcomes later on.

Sample Jump Enqueue Root (2) 2 {2

Sample Jump Look Left (9) 2 {2

Sample Jump Enqueue (9) 2 9 {2

Sample Jump Look Right 2 9 {2

Sample Jump Look Left (16) 2 9 {2,9},

Sample Jump Enqueue (16) {2,9},

Sample Jump Look Right (18) {2,9},

Sample Jump Enqueue (18) {2,9},

Sample Jump Look Left {2,9},{9,16},

Sample Jump Look Right (25) {2,9},{9,16},

Sample Jump Enqueue (18) {2,9},{9,16},

Sample Jump Look left {2,9},{9,16},{9,18},

Sample Jump Look Right {2,9},{9,16},{9,18},

Sample Jump Look Left {2,9},{9,16},{9,18},{16,25}

Sample Jump Look Right {2,9},{9,16},{9,18},{16,25}

Sample Jump Back to Root {2,9},{9,16},{9,18},{16,25}

Sample Jump Back to Root {2,9},{9,16},{9,18},{16,25}

Sample Jump Back to Root {2,9},{9,16},{9,18},{16,25}

Sample Jump Back to Root {2,9},{9,16},{9,18},{16,25}

Sample Jump Back to Root {2,9},{9,16},{9,18},{16,25}

Future Moves For each move of player 1 each possible move of player 2 is calculated For each move of player 2 each possible move of player 1 is calculated This is repeated until a given search depth is reached. Very quickly this can result in very large search area.

Future Moves To improve the play of the AI the benefit of possible moves is calculated. For each move of player 1 each possible move of player 2 is calculated For each move of player 2 each possible move of player 1 is calculated This is repeated until a given search depth is reached. When a given depth is reached the value of that path is calculated. Very quickly this can result in very large search area.

Future Moves For all Red

Future Moves 812 For all Red {8,12}

Future Moves 812 For all Red {8,12},{9,12} 912

Future Moves 812 For all Red {8,12},{9,12},{9,13}

Future Moves 812 For all Red {8,12},{9,12},{9,13},{10,13},

Future Moves 812 For all Red {8,12},{9,12},{9,13},{10,13}, {10,14}

Future Moves 812 For all Red {8,12},{9,12},{9,13},{10,13}, {10,14},{11,14}

Future Moves 812 For all Red {8,12},{9,12},{9,13},{10,13}, {10,14},{11,14}

Future Moves 812 White’s counter move {8,12},{9,12},{9,13},{10,13}, {10,14},{11,14},{11,15} REDWHITE

Future Moves 812 White’s counter move {8,12},{9,12},{9,13},{10,13}, {10,14},{11,14},{11,15} REDWHITE

Future Moves 812 White’s counter move {8,12},{9,12},{9,13},{10,13}, {10,14},{11,14},{11,15} REDWHITE

Future Moves 812 White’s counter move {8,12},{9,12},{9,13},{10,13}, {10,14},{11,14},{11,15} REDWHITE

Parallel Processing Can‘t have player 2 waiting for player 1’s move to be completed. Search must be conducted in a timely manner. To improve performance multiple branches of the future move table are computed at the same time.

Parallel Processing Player 1 Player 2 Each set of responses are run as a separate threads Each set can be computed independently of other sets of the same or greater depth as well as steps that did not directly precede it.

P7P6P5P4P3 Parallel Processing Player 1 Player 2 This allows the task of searching for the best move to be split among multiple processors as well as multiple threads. This makes it well suited to being run on the cluster P1P2

Using the Future Table When a move made by player 1 or player 2 make a path in the table no longer possible they are removed. The path that yields the highest possible point value is taken. The point value of a path is determined by multiple factors. Jumping a man gets points Taking a king gets more points than taking a man Points are deducted for being jumped and losing pieces Point values for each move are determined by the total value of the possible paths that result.

Work in Progress Finish Threading Migrate to Cluster King jump logic ▫Requires a modification to the man jump logic End game detection ▫Draw  If nothing changes in the future lookup within 40 moves call it a draw. Finalize point strategy