Algorithms & Data Structures for Games

Slides:



Advertisements
Similar presentations
Anthony Cozzie. Quite possibly the nerdiest activity in the world But actually more fun than human chess Zappa o alpha-beta searcher, with a lot of tricks.
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.
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.
Games & Adversarial Search
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
CS 484 – Artificial Intelligence
CHAPTER 10 FUN AND GAMES Group 1: Xiangling Liu.
Prepare for 4x4x4 tic-tac-toe
Pruned Search Strategies CS344 : AI - Seminar 20 th January 2011 TL Nishant Totla, RM Pritish Kamath M1 Garvit Juniwal, M2 Vivek Madan guided by Prof.
Search in AI.
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
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.
1 Algorithms & Data Structures for games Lecture 2B Minor Games Programming.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
CPSC 335 Assignment 5 Leina Leung TUT 01 (Russel Apu) & Katy Lin TUT 02 (Jagoda Walny)
Intelligence for Games and Puzzles1 Transposition Tables, Zobrist Hashing, GHI problem The commonest,
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
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:
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
A Solution to the GHI Problem for Best-First Search D. M. Breuker, H. J. van den Herik, J. W. H. M. Uiterwijk, and L. V. Allis Surveyed by Akihiro Kishimoto.
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.
CISC 235: Topic 6 Game Trees.
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.
Games as Game Theory Systems (Ch. 19). Game Theory It is not a theoretical approach to games Game theory is the mathematical study of decision making.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Instructor: Vincent Conitzer
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
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.
Chess and AI Group Members Abhishek Sugandhi Sanjeet Khaitan Gautam Solanki
CSCI 4310 Lecture 6: Adversarial Tree Search. Book Winston Chapter 6.
For Friday Finish chapter 6 Program 1, Milestone 1 due.
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.
Today’s Topics Playing Deterministic (no Dice, etc) Games –Mini-max –  -  pruning –ML and games? 1997: Computer Chess Player (IBM’s Deep Blue) Beat Human.
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.
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.
Adversarial Search 2 (Game Playing)
Parallel Programming in Chess Simulations Part 2 Tyler Patton.
CS-424 Gregory Dudek Lecture 10 Annealing (final comments) Adversary Search Genetic Algorithms (genetic search)
February 25, 2016Introduction to Artificial Intelligence Lecture 10: Two-Player Games II 1 The Alpha-Beta Procedure Can we estimate the efficiency benefit.
Luca Weibel Honors Track: Competitive Programming & Problem Solving Partisan game theory.
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.
Adversarial Search and Game-Playing
Instructor: Vincent Conitzer
Iterative Deepening A*
CS Fall 2016 (Shavlik©), Lecture 11, Week 6
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Dakota Ewigman Jacob Zimmermann
Instructor: Vincent Conitzer
The Alpha-Beta Procedure
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Pruned Search Strategies
Instructor: Vincent Conitzer
Mini-Max search Alpha-Beta pruning General concerns on games
Games & Adversarial Search
PN, PN2 and PN* in Lines of Action
Games & Adversarial Search
Presentation transcript:

Algorithms & Data Structures for Games Minor Games Programming Algorithms & Data Structures for Games Lecture 5

Algorithms and Data Structures Feedback previous lectures Theory: Boards Game Algorithms Jan Verhoeven j.verhoeven@windesheim.nl

Theory: Some Board Game Algorithms Static Evaluation function Alpha-beta pruning Move ordering Iterative deepening Killer heuristic Transposition table Zobrist hashing

Static Evaluation function http://en.wikipedia.org/wiki/Evaluation_function Not done at leave nodes! But what is a stable situation? Horizon effect?

Alpha-beta pruning http://en.wikipedia.org/wiki/Alpha-beta_pruning Greatest effect when the moves are ordered! Best move first ….  Move ordering

Move ordering Best moves first (more pruning!): Defend against direct winning opponent’s moves (“mate”-moves) Capture moves Killer moves (see later)

Iterative deepening -1- Iterative deepening means repeatedly calling a fixed depth search routine with increasing depth until a time limit is exceeded or maximum search depth has been reached. http://www.xs4all.nl/~verhelst/chess/search .html

Iterative deepening -2- The advantage of doing this is that you do not have to choose a search depth in advance; you can always use the result of the last completed search.

Iterative deepening -3- Also because many position evaluations and best moves are stored in the transposition table, the deeper search trees can have a much better move ordering than when starting immediately searching at a deep level.

Killer heuristic The killer heuristic is used to improve the move ordering. The idea is that a good move in one branch of the tree is also good at another branch at the same depth. For this purpose at each ply we maintain one or two killer moves that are searched before other moves are searched. A successful cutoff by a non-killer move overwrites one of the killer moves for that ply.

Transposition table The transposition table is a hashing scheme to detect positions in different branches of the search tree that are identical. http://en.wikipedia.org/wiki/Transposition_table

Zobrist hashing http://en.wikipedia.org/wiki/Zobrist_hashing A smart way to construct hash keys for a transposition table, depending on the board position.

Transposition Tables Presentation See and study blackboard: Transposition Tables.ppt And if you are really interested: http://chessprogramming.wikispaces.com/Albert+Zobrist

Exercise: -give the transposition table (size=8) - randoms are in octal 1 0123 0456 2 0172 0263 3 0314 0557 4 0662 0527 5 0116 0374 6 0252 0153 7 0771 0722 8 0742 0275 9 0337 0142 Situation 1: Situation 2:

Extra Presentation, please read and don’t study … On blackboard: Game programming workshop Japan By prof.dr. Jaap van den Herik

Homework This Chapter 10.5.2 Articles, Presentations and the Internet Homework, study/read: This Chapter 10.5.2 Articles, Presentations and the Internet

Practice (next THURSDAY !!!) Practice, be prepared for: Implement a Transposition Table class using Zobrist hashing for a given board game. Make a test program to demonstrate this class.