"Programming a Computer to Play Chess" A presentation of C. Shannon's 1950 paper by Andrew Oldag April 23 2009.

Slides:



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

Artificial Intelligence 5. Game Playing
Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
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.
UIL Chess Puzzle Practice Material
Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Apostles Chess Club Lesson #4. Algebraic Chess Notation System The board is set up from white’s position. Black must look at the board from the white.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Games & Adversarial Search
CS 484 – Artificial Intelligence
Adversarial Search Chapter 5.
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.
CHESS FOR KIDS Lesson 1.
L.O. Today you will learn how to play chess. How to Play Chess.
Chess: Shootmenow Edition By: Sean Sprigg and Tom Samaras.
Adversarial Search CSE 473 University of Washington.
Hoe schaakt een computer? Arnold Meijster. Why study games? Fun Historically major subject in AI Interesting subject of study because they are hard Games.
Adversarial Search Chapter 6.
Artificial Intelligence for Games Game playing Patrick Olivier
Artificial Intelligence in Game Design Heuristics and Other Ideas in Board Games.
Games as a Test Bed for Developing AI Applications (in Physics) Brains vs Computers Symposium of the “van der Waals” study association December 10, 2013.
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.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Chess!!. Pawn How many pieces? 8 Value: Lowest What can it do? Move forward only one space at a time. Attack: Only Diagonally.
Mastering Chess An overview of common chess AI Adam Veres.
By Joseph Tanti FIDE Instructor. Some completely different ways to play chess.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.6: Adversarial Search Fall 2008 Marco Valtorta.
MAE 552 – Heuristic Optimization Lecture 28 April 5, 2002 Topic:Chess Programs Utilizing Tree Searches.
Computer Chess. Humble beginnings The Turk Ajeeb Mephisto El Ajedrecista.
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.
CSC 412: AI Adversarial Search
Chess Merit Badge Chess Basics: Set Up the Board & Basic Rules by Joseph L. Bell © 2011.
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Aayush Garg Pecha-Kucha Design Games 10. Games I like Strategy games Mathematical games Paper and Pencil games Street games.
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.
Artificial Intelligence in Game Design Lecture 22: Heuristics and Other Ideas in Board Games.
Prepared by : Walaa Maqdasawi Razan Jararah Supervised by: Dr. Aladdin Masri.
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.
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.
Instructor: Vincent Conitzer
Games 1 Alpha-Beta Example [-∞, +∞] Range of possible values Do DF-search until first leaf.
Chess and AI Group Members Abhishek Sugandhi Sanjeet Khaitan Gautam Solanki
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.
How to Play Chess. Name of Each Piece The relative values of the chess pieces 9 points 5 points 3+ points 3 points 1 point.
Lesson 1 History of Chess Why We Teach Chess Goal of Chess.
Chess By Kyle Fischer. What is chess? Chess is a game that you try to get the other person’s king in a checkmate.
A game based off of the esteemed classic By: Tadziu Kosiara.
Each piece is represented by a symbol. The pieces all stand in the same position at the start of the game the pieces are the Rook, the Knight, the Bishop,
The Basics Of Chess Student Name: Jovannie Charles Date: 3/25/11.
Every chess master was once a beginner. Irving Chernev
Chess Strategies Component Skills Strategies Prototype Josh Waters, Ty Fenn, Tianyu Chen.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
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.
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.
Game Playing Why do AI researchers study game playing?
EA C461 – Artificial Intelligence Adversarial Search
Instructor: Vincent Conitzer
Influence of Search Depth on Position Evaluation
Ab & Team Presents CHESS “It’s not just a game”.
CSC 110 – Fluency in Information Technology Chess
Adversarial Search Chapter 5.
Dakota Ewigman Jacob Zimmermann
Adversarial Search.
Instructor: Vincent Conitzer
Presentation transcript:

"Programming a Computer to Play Chess" A presentation of C. Shannon's 1950 paper by Andrew Oldag April

History of Chess Derived from Chaturanga, began ~6th century. Modern rules developed around Wilhelm Steinitz first world chess champion Deep Blue defeats the world champion, Kasparov Two players, black and white 64 squares on 8 by 8 board, 32 pieces King Queen Rook x2 Bishop x2 Knight x2 Pawn x8 Checkmate, draw, or resign Deep Blue 2 million positions per second Kasparov 3 positions per second

"The Turk" The First Chess Playing Machine Built in 1770 for exhibition. Performed the "Knight's Tour". Mated Napoleon Bonaparte and Benjamin Franklin. (not at the same time) Would have been recognized as the original chess computer had it not been for one flaw... The Turk in a middle game.

Programming a Computer for Playing Chess Overview Develop evaluation function Brute Force Type A Program with Horizon Type B - a quiescent search Dictionaries and endtables Randomness Shannon and his AI mouse learning to run a maze Copyright Bell Labs

Develop an Evaluation Function The most simple for is based only on pieces in play. Better to include positions of pawns. Also include mobility of pieces. Can also consider valuable squares held or defended. Look at all possible positions one move ahead of current and choose based on highest value of f(P). f(P) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N') + (P-P') - 0.5(D-D'+S-S'+I-I') + 0.1(M-M')

B1 B2 B3 A1 +3 −2 +2 A2 − A3 −4 −3 +1 Look farther ahead using f(P) Use brute force to look ahead at the opponents next move. Use f(P) to evaluate the new position and repeat. Continue iterating until an end is found. Look at every possible move combination. Minimax - minimize your maximum possible loss. In a physical game like chess, what better than brute force? Best choice for A to move. Best choice for B to move.

Create an Artificial Horizon The problem? On average legal moves on each turn, so to look forward 3 turns for each player is to evaluate about 1 billion positions. So cut off the search and create a 'horizon'. In 1950, the computer would require only about 16 minutes to search ahead 6 ply. (Ply = A player's move) But, three moves ahead is short sighted. So what to do? Stop searching here to create a 2 ply horizon.

Quiescent Search - Type B Ignore moves which are obviously 'quiet'. For moves that are not quiet, look past to when the exchanges have ended. Use f(P) to determine the best move. How humans play; focus on important moves or exchanges (De Groot) and be a little aggressive (general chess advice). Determining a quiet move is not always easy. Why waste time considering all the moves that follow pawn to a3?

When is this used? Dictionaries of chess openings can be used to increase the speed at the beginning. (since this is what chess players do anyway, it's not cheating) Use this optimized brute force method during the middle game when there are several pieces on the board and many possible moves. Utilize endgame tablebase when the end game is found. Though not as computationally intensive* as the middle game, important not the muddle around. * see El Ajedrecista -The Chess Player

Variations in Play All of that is fine, but boring. The computer will always play the same response to a given position Randomizing (wisely) the selected evaluation function makes game play more... well, random. The level of randomization can be used to mimic players of different skill. Near zero randomization = chess master, totally random = monkey.

"El Ajedrecista" - The Chess Player Public debut 1914 Electromechanical device Played out an end game of king vs. king and rook Honest attempt to make a machine capable of playing chess

References 'Programming a Computer for Playing Chess' C. Shannon. Philosophical Magazine, Ser. 7, Vol. 41, No March 'Computer Chess and Search' T. A. Marsland. Encyclopedia of Artificial Intelligence 2nd Edition. John Wiley 'Digital Computers Applied to Games' A. Turing 'Het Denken van den Schaker' A. DeGroot. 1946a. Wikipedia - for information regarding The Turk, El Ajedrecista, Deep Blue, History of Chess Google images - as a source for many chess position diagrams