180 likes | 192 Views
CSC 110 – Fluency in Information Technology Chess. Dr. Curry Guinn. Today’s Class. A Look Ahead Computer Chess Lab. What’s Next?. November 21 Fri Natural Language Processing November 24 Mon Futuristic Stuff November 26 Wed No Class November 28 Fri No Class
E N D
CSC 110 – Fluency in Information TechnologyChess Dr. Curry Guinn
Today’s Class • A Look Ahead • Computer Chess • Lab
What’s Next? November 21 Fri Natural Language Processing November 24 Mon Futuristic Stuff November 26 Wed No Class November 28 Fri No Class December 1 Mon Review December 3 Wed Exam #2 December 10 Wed Final Exam Due
Computer Chess • Chess playing machines have been around longer than computers • The Turk
The Turk • 1769 • Complicated gear works • Could beat very, very good players • It was a hoax. • The Turk: The Life and Times of the Famous Eighteenth-Century Chess-Playing Machine
Computer Chess • Programs first developed in 1958 • In 1997, Gary Kasparov lost a six game match to Deep Blue (3.5-2.5). • The primary algorithm used is called MINIMAX. • How does it work?
Minimax relies on an Evaluation function • The Evaluation function rates how good a particular configuration is • In chess, the evaluation of a board position might include: • Number and type of pieces remaining on the board • How mobile are your pieces? • Do you control the center of the board? • Is the king in a safe position?
Minimax Algorithm • See what moves are possible for you • Then for each of those moves, see what your opponent can do • Then for each of those moves, see what you can do … • Then see what your opponent can do … • And so on. • When you stop looking at possible moves, evaluate those final board positions. • Determine which sequence of moves will guarantee you the highest score. • You will always choose the move that results in a higher score; • Your opponent will always choose the move that results in a lower score
1 -3 C B D E F G 4 1 2 -3 4 -5 -5 1 -7 2 -3 -8 MAX 1 A MIN MAX = terminal position = agent = opponent
Problems with Minimax • How far can you search in the tree? • In chess, between 25-40 moves possible on average. • So at each level of the tree, you could have 25 branches. • After 1 move, 25 possible boards. • After 2 moves, 252 = 625 • After 3 moves, 253 = 15, 625
Depth of Minimax • After 4 moves, 254 = 390, 625 • After 5 moves, 255 = 9,765,625 • … • After 10 moves, 2510 = 95, 367, 431, 640, 625 • Searching to depth = 40, at one game per microsecond it would take 1090 years to make its first move • Age of universe = 1010
Depth of Minimax (Deep Blue) • 480 specialty chess chips • Parallel computing: 30 workstations • Searches 12 plies (turns) • 25^12 = 59 quadrillion • Extends promising lines as must as 40 plies • PLUS opening database • PLUS end-game algorithms
Games where MiniMax doesn’t work too well • Go • Branching factor of 200 • Games can go on for 250+ moves • Very difficult to evaluate board positions • This is the HOT game to study in AI • Card games • Too much variability due to chance
Lab: Part 1 • Here’s another art program. It’s pretty good. • http://www.kurzweilcyberart.com/
Lab: Play Chinook • Chinook is the best checkers player in the world • Try it: http://games.cs.ualberta.ca/~chinook/cgi-bin/player.cgi?nodemo
Some great AI demos and movies • Demos: http://pages.cs.wisc.edu/~dyer/cs540/demos.html • A page with some of the best computer game players: http://www.cs.ualberta.ca/%7Egames/
Wrap-up • Why is Natural Language Processing so hard? • Read this paper: • http://people.uncw.edu/guinnc/papers/ittsec_nlp.97.pdf