Computers Playing Games Arif Zaman CS 101. Acknowledgements Portions of this are taken from MIT’s open-courseware

Slides:



Advertisements
Similar presentations
Adversarial Search Chapter 6 Sections 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Advertisements

Game Playing CS 63 Chapter 6
Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
Games and adversarial search
For Monday Read chapter 7, sections 1-4 Homework: –Chapter 4, exercise 1 –Chapter 5, exercise 9.
CMSC 671 Fall 2001 Class #8 – Thursday, September 27.
CS 484 – Artificial Intelligence
Adversarial Search Chapter 6 Section 1 – 4.
University College Cork (Ireland) Department of Civil and Environmental Engineering Course: Engineering Artificial Intelligence Dr. Radu Marinescu Lecture.
Adversarial Search Chapter 5.
COMP-4640: Intelligent & Interactive Systems Game Playing A game can be formally defined as a search problem with: -An initial state -a set of operators.
Adversarial Search: Game Playing Reading: Chapter next time.
Adversarial Search CSE 473 University of Washington.
The Implementation of Artificial Intelligence and Temporal Difference Learning Algorithms in a Computerized Chess Programme By James Mannion Computer Systems.
Artificial Intelligence for Games Game playing Patrick Olivier
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
1 Adversarial Search Chapter 6 Section 1 – 4 The Master vs Machine: A Video.
10/19/2004TCSS435A Isabelle Bichindaritz1 Game and Tree Searching.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CMSC 463 Chapter 5: Game Playing Prof. Adam Anthony.
Game Playing CSC361 AI CSC361: Game Playing.
Games and adversarial search
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
Computers Playing Games Arif Zaman CS 101. Acknowledgements Portions of this are taken from MIT’s open-courseware
How computers play games with you CS161, Spring ‘03 Nathan Sturtevant.
Game Tree Search based on Russ Greiner and Jean-Claude Latombe’s notes.
Adversarial Search: Game Playing Reading: Chess paper.
Othello Sean Farrell June 29, Othello Two-player game played on 8x8 board All pieces have one white side and one black side Initial board setup.
double AlphaBeta(state, depth, alpha, beta) begin if depth
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Game Playing.
Othello Artificial Intelligence With Machine Learning
1 Computer Group Engineering Department University of Science and Culture S. H. Davarpanah
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.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 6 –Adversarial Search Thursday –AIMA, Ch. 6 –More Adversarial Search The “Luke.
Instructor: Vincent Conitzer
Othello Playing AI Matt Smith. Othello 8x8 Board game 8x8 Board game Try to outflank opponents pieces Try to outflank opponents pieces Winner ends up.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
Adversarial Search Chapter 6 Section 1 – 4. Search in an Adversarial Environment Iterative deepening and A* useful for single-agent search problems What.
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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 9 of 42 Wednesday, 14.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
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.
Paula Matuszek, CSC 8520, Fall Based in part on aima.eecs.berkeley.edu/slides-ppt 1 CS 8520: Artificial Intelligence Adversarial Search Paula Matuszek.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Othello Artificial Intelligence With Machine Learning Computer Systems TJHSST Nick Sidawy.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Adversarial Search Chapter 5 Sections 1 – 4. AI & Expert Systems© Dr. Khalid Kaabneh, AAU Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Adversarial Search CMPT 463. When: Tuesday, April 5 3:30PM Where: RLC 105 Team based: one, two or three people per team Languages: Python, C++ and Java.
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.
Artificial Intelligence AIMA §5: Adversarial Search
Othello Artificial Intelligence With Machine Learning
Adversarial Search Chapter 5.
Adversarial Search.
Artificial Intelligence
Artificial Intelligence
Instructor: Vincent Conitzer
Adversarial Search CMPT 420 / CMPG 720.
Artificial Intelligence and Searching
Adversarial Search Chapter 6 Section 1 – 4.
Presentation transcript:

Computers Playing Games Arif Zaman CS 101

Acknowledgements Portions of this are taken from MIT’s open-courseware Some items are adapted from Chapter 5 on Games by some professor who adapted it from notes by Charles R. Dyer, University of Wisconsin-Madison

Why Play? Humans play for enjoyment, but computers…? Games of strategy and skill require “intelligence”. We may learn about thinking by learning how to teach computers. Hard but well defined problems, unlike other AI problems like speech, ethics etc. Competition, knowledge-representation, … To provide entertainment, competition and training to humans (that play or program).

Game Theory Von Neumann and Morgenstern analyzed two person zero-sum games, where each person takes a decision simultaneously, and then gets paid according to a payoff matrix. Economic games, can be multi-person, multi- stage. Enemy Strategy AB My Stra tegy X10-10 Y-240

Board Games Two Person Alternating moves Zero Sum Deterministic(not Backgammon or Ludo) Perfect Information (not Bridge, Hearts) Examples Tic-Tac-Toe Checkers Chess Go Reversi (Othello)

History 1949 Claude Shannon paper on Chess 1951 Alan Turing simulation on Checkers 1955 Chess Program using α-β MacHack 1990 Belle (harware assist) 2000 Deep Blue (serious hardware)

Top-down Program Repeat Until Done DrawBoard GetPlayerMove CheckLegalMove‘also check if game over MakePlayerMove DrawBoard FindLegalMoves‘also check if game over EvaluateLegalMoves MakeBestMove

Static Position Evaluator Given a position, come up with a “value”. Values are 0…1 or 0…infinity or – infinity…infinity can represent “probability” of my lose/win In chess can count my pieces – enemy pieces. my total piece value – enemy total piece value. Add points for Mobility Add points for Center Control Negative points for exposed king, etc. This is where humans experts excel.

Game Tree Mini-Max

Crude Evaluator You can start off with a crude static evaluator, and a high ply minimax. Russians believed that better would be an excellent but slow static evaluator with lower plies. The extreme strategies are of course a perfect evaluator with 1-ply Or the complete game-tree search with trivial evaluator.

Deep Blue 32 node supercomputer, each with eight special chess processors. 50 – 100 billion moves in 3 mins with a ply search

Other Tricks α-β pruning: We do not need to look at every possible move, especially if we have a good candidate. Quiessence: Static evaluate at peaceful situations. Go deeper into fights. Lookup Tables: for opening moves. Special program: for endgames.

Other Games Go is much harder. The best computer is far worse than the best human, even though the rules are very simple Checkers computers are far better than the best humans Tic-Tac-Toe is still a great mystry Othello has a very interesting story.

Rules of the game Start with four squares filled. Move next to opposite colored square. Change color of all opposite colored squared surrounded by moved piece and another piece of the same color. Must capture.

Reversi (Othello) D E Moriarty and R Miikkulainen, “Discovering Complex Othello Strategies Through Evolutionary Neural Networks” Created a strong player without any initial knowledge, by breeding a program! Evolutionary Start with a “population” of 100 “random” programs. Have a competition, and kill the 90 losers. Breed the 10 winners by “mixing” their “genes” with a bit of “mutation.” Do the same for many generations (1000’s).

Positional Strategy Programs quickly learned the basic positional strategy: Take corners. Avoid neighbors of corners Take neighbors of neighbors of corners. Mobility Strategy Keep low piece count Restrict opponents moves Discovered only once in Japan, and then everyone learnt it from them.

Mobility vs Positional The mobility strategy (learned by the ENN) looks like it is loosing, but converts it to a win in the last 3-4 moves!

But… Specially designed programs to play Othello still do even better eg. Bill or Logistello.