Programming an Othello AI Michael An (man4), Evan Liang (liange)
|
|
- Amy Henderson
- 6 years ago
- Views:
Transcription
1 Programming an Othello AI Michael An (man4), Evan Liang (liange) 1 Introduction Othello is a two player board game played on an 8 8 grid. Players take turns placing stones with their assigned color (black or white) on the grid. After a player moves, all opponent pieces bounded in a straight line between two of the player s stones are all flipped. Each move must flip at least one opponent stone. If a player has no legal moves, they must pass. The game ends when both players pass consecutively, and the winner is the player with the most stones on the board at the end. If both players have the same number of stones, the game ends in a draw. We created an Othello engine, a program that takes an input position and tries to return the best move possible in that position. To do this, we modelled Othello as a zero-sum state-based game. We define the following: Figure 1: Othello as a state-based game. We then evaluated the success of our engine by playing a series of games against other Othello engines. We score each win as 1 point, each draw as 0.5 points, and each loss as 0 points. The exact number of stones won by each player has no impact on the scoring. 2 Engine Implementation We programmed the Othello engine from scratch in Python. The main parts of the implementation were the user interface, state representation, and game rules. Othello engines are usually command-line interfaces that follow a certain protocol. Keeping the engine implementation separate from the GUI allows other programmers to make a GUI that communicates between two different engines through the protocol. We used the same protocol for entering moves as Edax, a strong open-source engine. For example, play e3 places a stone on the square E3, pass is the command to manually pass, and go lets the engine play a move. The interface is essentially an infinite loop that reads user input and takes actions based on the input. An external GUI can pipe input into our interface, as well as read the output from our program, which goes to stdout. 1
2 We represented the board as a two-dimensional list of dimensions 8 8 in Python. We created constants WHITE = 1, EMPTY = 0, and BLACK = -1 to denote occupancy of stones on the board. We also stored the player as a single variable, which can take on either BLACK or WHITE. To implement the game rules, we added several helper functions, such as one that checks for opponent pieces in each direction, and one that returns a list of valid moves. We also needed string-to-move and move-to-string functions that converted a move tuple, i.e. (4, 2), to the corresponding square, i.e. E3, or vice versa. For user-friendliness, a printboard function prints the board, player to move, and current score (number of stones of each color) after each turn. Figure 2: The screenshots above show a sample move played through the command line in our program (left) and Edax (right). 2.1 Baseline and Oracle We implemented a simple greedy search algorithm as our baseline. This algorithm simply picks the move that flips the most stones at each turn, breaking ties randomly. 2
3 Our oracles are two of the strongest Othello engines, Cassio and Edax. Since Othello is an unsolved game with an unknown optimal play style, it is important to test our AI against different engines to avoid falling into the trap of optimizing our AI for one particular style of play. Our baseline implementation will never take a game off of any of the oracles, yet may still be capable of beating human players. However, even the best human players will lose handily to either Cassio or Edax. We tested our baseline against Edax, and we lost In other words, we ended the game with no stones remaining on the board! This gives an idea of the wide gap in strength between the strongest engines and a naive implementation. Top engines like Edax and Cassio use a variety of techniques to improve their playing strength. These include the following: Large number of features, all carefully tuned to maximize score against other engines Several move ordering rules, which make alpha-beta pruning more efficient Opening book and endgame solver Aggressive pruning rules that allow searches of over 20 plies Bitboards for board representation, which allows the use of bit tricks to speed up computations Hash table that caches scores and best moves of board positions encountered in search We explored the first two techniques in detail in our engine. In particular, we used TD learning to tune a table of square values, and we implemented a move ordering rule that is also based on this table. 3 Search and Evaluation 3.1 Negamax with Alpha-Beta Pruning Since it would be computationally impossible for our algorithm to exhaustively search and reach the end state for every state of the game, we needed to define a value function to score intermediate board configurations. We implemented a negamax search algorithm with the simple evaluation function Number of stones of player s color Number of stones of opponent s color. Negamax is a special case of minimax that takes advantage of the zero-sum property of Othello. In particular, the score is symmetric with respect to the current player. Positive scores in the evaluation function mean that the current player is winning, negative means the current player is losing, and zero indicates a tie. Therefore, negamax is functionally equivalent to minimax but slightly simpler to implement. As a matter of naming convention, the depth reached by an Othello engine is the number of turns (by either player) that the engine looks ahead, i.e. depth is always reported in plies, so for instance, a depth 5 search indicates 5 plies. 3
4 The negamax algorithm was immediate on searches of depth 3. However, for a depth 4 search, the algorithm was quick in the opening and endgame phases (when the board is nearly empty or nearly full), but took about a second per move in the middlegame. This can be explained as follows: 1. In the opening, there are few legal moves (although branch factor is generally increasing), and making each move is quick because we have to iterate over very few opponent stones when checking whether to flip them or not. 2. In the endgame, making a move may be slow, but the branch factor is bounded by the number of empty squares remaining, which decreases drastically. 3. In the middlegame, the branch factor is quite high, and making a move is quite slow, so negamax will usually take a long time. The general trend of search being quicker in the opening and endgame extends to other search depths, and we can use this to our advantage. In particular, since moves are quick in the opening and endgame, we can afford to search more plies without spending too much time. We therefore implemented our program with a time-restricted search instead of a depth-restricted one. Endgame solvers in strong engines use a similar concept, searching over 20 plies deep at around move 40, all the way to end states and thus generating a perfect solve. While engines can also search deeper in the opening than the middlegame, top engines create opening books by analyzing all possible positions after, say, 10 plies. This preprocessing works since the start position is always the same, and caching the evaluations of opening positions saves the engine time. The next logical step for us was to implement alpha-beta pruning. Again, because of the zero-sum property, negamax-based alpha-beta pruning is simpler than the original algorithm. With random move ordering, alpha-beta is expected to allow us to search about 50% deeper, and this held up in practice: depth 6 searches in the middlegame take our engine up to about two seconds. 3.2 TD Learning an Improved Evaluation Besides speed optimizations that allow us to search to a deeper ply, another way to improve upon our AI is to come up with a better evaluation function. One idea we tried was essentially a piecesquare table. Typically in Othello, it is advantageous to have pieces on the edges and the corners of the board, because these pieces are harder to flip over by the opponent (or impossible, in the case of corner pieces). Therefore, we can assign a higher evaluation score if our pieces are distributed more around the edges than our opponents. To do this, we create a 4 4 array of the value of a piece in each square in the upper-left quadrant. Because of symmetry, this 4 4 array is sufficient. We then add the corresponding value for each of the player s pieces to our evaluation and subtract for each of the opponent s pieces. 4
5 Figure 3: Types of squares: Corner, buffer, and edge. To start off, we tried hand tuning the square values based on Edax s values. Edax heavily prioritizes the corners, as we would expect, while placing little value on the corner buffers, which also makes sense since placing a stone on a buffer might allow the opponent to play a stone in the corner. However, using Edax s values blindly leads our AI to over-prioritize corners and edges. This is because Edax s evaluation function contains several other factors, which subsequently affect the square values. However, hand-tuning these values already resulted in an visual improvement of our AI (where it no longer haphazardly gave away important corner squares). Figure 4: Our AI playing as black against an online engine, prior to (left) and after (right) adding a hand-tuned piece square table. To improve on the hand-tuned square values, we implemented TD learning. We used Monte Carlo to generate over 10,000 games by playing our engine against older versions of itself, using a depth of 3 so that the games finish reasonably quickly. To provide some variety and exploration, we generate a random move instead of the engine s move with high probability in the opening and lower probability (ε = 0.04) for the rest of the game. Then, for each board position encountered in these games, we upweight squares that lead to wins and downweight those that lead to losses. Here, we take into account the final score difference, which can be thought of as a gradient, so a 64-0 win would cause a larger change in weights than a win. We tried a variety of step sizes η ranging from to
6 Figure 5: Tuned weights for the piece square table after TD learning. Note that the corner has the highest value, the edges also have high values, the buffers have negative value, and the other squares have almost no value, as expected. Our tuned weights were tested against our naive evaluation function, which is equivalent to assigning a weight of 1 to each square. We used the same fixed depth of 2-4 in our testing, and the tuned version consistently won around 70% against the original version. We started TD learning with uniform weights and thus no prior knowledge of square values, but TD learning was able to realize on its own that corners were important and that buffers were to be avoided. 3.3 Optimizing Move Ordering in Alpha-Beta Pruning With the worst possible move ordering, alpha-beta pruning takes similar time as minimax to achieve a given depth. However, in the best case, alpha-beta pruning can achieve about twice the depth of minimax. Therefore, we implemented a move ordering heuristic to increase the efficiency of alphabeta search. Intuitively, for example, if a player can take a corner, usually the best move is indeed to play in the corner. We decided that a simple move ordering scheme could be to use the square values table tuned with TD learning, because placing a stone on the most valuable square possible is likely the best move in a given position. We did this by sorting the list of legal moves based on the value of (score, random number), which allows us to sort the moves by score and break ties randomly. We then tested the time required for our engine to reach certain depths with and without the optimized move ordering. We generated games at a constant depth of 3 or 4, with the first 8 moves randomized and stopping after move 48 to ensure each game has the same length, and we measured the average time elapsed. We also measured the time required to search to depth 10 from the start position, to see the effects of better move ordering at larger depths. Figure 6: Time to depth comparisons before and after optimizing move ordering. 6
7 4 Discussion and Future Work Through TD learning, we were able to learn a set of square values that could beat the naive evaluation function 70% of the time at a given depth, and by improving our move ordering, our engine could achieve a given depth approximately 50% faster. In the future, we could implement many of the strategies described in Section 2.1 that top engines use. Here are some more specific things that we could consider adding: Number of legal moves in the evaluation. Being forced to pass is usually very disadvantageous, and in general, the more legal moves we have, the better chance there is of having a good move. Stone patterns in the evaluation. For example, if we have two stones on an edge separated by an empty square, we are never able to fill in the empty space, which could spell trouble if the opponent manages to sneak a piece in. Completely prune out moves that are obviously bad, such as placing a stone in a buffer square if there are much better alternatives. 5 References The Cassio engine can be found at cassio.free.fr. The Edax engine can be found at abulmo.perso.neuf.fr (link has become inactive since the start of the project). 7
CS 229 Final Project: Using Reinforcement Learning to Play Othello
CS 229 Final Project: Using Reinforcement Learning to Play Othello Kevin Fry Frank Zheng Xianming Li ID: kfry ID: fzheng ID: xmli 16 December 2016 Abstract We built an AI that learned to play Othello.
More informationLearning to Play like an Othello Master CS 229 Project Report. Shir Aharon, Amanda Chang, Kent Koyanagi
Learning to Play like an Othello Master CS 229 Project Report December 13, 213 1 Abstract This project aims to train a machine to strategically play the game of Othello using machine learning. Prior to
More informationAI Approaches to Ultimate Tic-Tac-Toe
AI Approaches to Ultimate Tic-Tac-Toe Eytan Lifshitz CS Department Hebrew University of Jerusalem, Israel David Tsurel CS Department Hebrew University of Jerusalem, Israel I. INTRODUCTION This report is
More informationgame tree complete all possible moves
Game Trees Game Tree A game tree is a tree the nodes of which are positions in a game and edges are moves. The complete game tree for a game is the game tree starting at the initial position and containing
More informationCS221 Project Final Report Gomoku Game Agent
CS221 Project Final Report Gomoku Game Agent Qiao Tan qtan@stanford.edu Xiaoti Hu xiaotihu@stanford.edu 1 Introduction Gomoku, also know as five-in-a-row, is a strategy board game which is traditionally
More informationSet 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask
Set 4: Game-Playing ICS 271 Fall 2017 Kalev Kask Overview Computer programs that play 2-player games game-playing as search with the complication of an opponent General principles of game-playing and search
More informationIntroduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am
Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am The purpose of this assignment is to program some of the search algorithms
More informationComputing Science (CMPUT) 496
Computing Science (CMPUT) 496 Search, Knowledge, and Simulations Martin Müller Department of Computing Science University of Alberta mmueller@ualberta.ca Winter 2017 Part IV Knowledge 496 Today - Mar 9
More informationCMPUT 396 Tic-Tac-Toe Game
CMPUT 396 Tic-Tac-Toe Game Recall minimax: - For a game tree, we find the root minimax from leaf values - With minimax we can always determine the score and can use a bottom-up approach Why use minimax?
More informationIntuition Mini-Max 2
Games Today Saying Deep Blue doesn t really think about chess is like saying an airplane doesn t really fly because it doesn t flap its wings. Drew McDermott I could feel I could smell a new kind of intelligence
More informationOptimal Yahtzee performance in multi-player games
Optimal Yahtzee performance in multi-player games Andreas Serra aserra@kth.se Kai Widell Niigata kaiwn@kth.se April 12, 2013 Abstract Yahtzee is a game with a moderately large search space, dependent on
More informationCOMP3211 Project. Artificial Intelligence for Tron game. Group 7. Chiu Ka Wa ( ) Chun Wai Wong ( ) Ku Chun Kit ( )
COMP3211 Project Artificial Intelligence for Tron game Group 7 Chiu Ka Wa (20369737) Chun Wai Wong (20265022) Ku Chun Kit (20123470) Abstract Tron is an old and popular game based on a movie of the same
More informationApplications of Artificial Intelligence and Machine Learning in Othello TJHSST Computer Systems Lab
Applications of Artificial Intelligence and Machine Learning in Othello TJHSST Computer Systems Lab 2009-2010 Jack Chen January 22, 2010 Abstract The purpose of this project is to explore Artificial Intelligence
More informationDocumentation and Discussion
1 of 9 11/7/2007 1:21 AM ASSIGNMENT 2 SUBJECT CODE: CS 6300 SUBJECT: ARTIFICIAL INTELLIGENCE LEENA KORA EMAIL:leenak@cs.utah.edu Unid: u0527667 TEEKO GAME IMPLEMENTATION Documentation and Discussion 1.
More informationFor slightly more detailed instructions on how to play, visit:
Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! The purpose of this assignment is to program some of the search algorithms and game playing strategies that we have learned
More informationMore on games (Ch )
More on games (Ch. 5.4-5.6) Announcements Midterm next Tuesday: covers weeks 1-4 (Chapters 1-4) Take the full class period Open book/notes (can use ebook) ^^ No programing/code, internet searches or friends
More informationPlaying Othello Using Monte Carlo
June 22, 2007 Abstract This paper deals with the construction of an AI player to play the game Othello. A lot of techniques are already known to let AI players play the game Othello. Some of these techniques
More informationGame Playing for a Variant of Mancala Board Game (Pallanguzhi)
Game Playing for a Variant of Mancala Board Game (Pallanguzhi) Varsha Sankar (SUNet ID: svarsha) 1. INTRODUCTION Game playing is a very interesting area in the field of Artificial Intelligence presently.
More information2048: An Autonomous Solver
2048: An Autonomous Solver Final Project in Introduction to Artificial Intelligence ABSTRACT. Our goal in this project was to create an automatic solver for the wellknown game 2048 and to analyze how different
More informationUsing Artificial intelligent to solve the game of 2048
Using Artificial intelligent to solve the game of 2048 Ho Shing Hin (20343288) WONG, Ngo Yin (20355097) Lam Ka Wing (20280151) Abstract The report presents the solver of the game 2048 base on artificial
More informationMore on games (Ch )
More on games (Ch. 5.4-5.6) Alpha-beta pruning Previously on CSci 4511... We talked about how to modify the minimax algorithm to prune only bad searches (i.e. alpha-beta pruning) This rule of checking
More informationCSC 380 Final Presentation. Connect 4 David Alligood, Scott Swiger, Jo Van Voorhis
CSC 380 Final Presentation Connect 4 David Alligood, Scott Swiger, Jo Van Voorhis Intro Connect 4 is a zero-sum game, which means one party wins everything or both parties win nothing; there is no mutual
More informationGame-playing: DeepBlue and AlphaGo
Game-playing: DeepBlue and AlphaGo Brief history of gameplaying frontiers 1990s: Othello world champions refuse to play computers 1994: Chinook defeats Checkers world champion 1997: DeepBlue defeats world
More informationCS221 Othello Project Report. Lap Fung the Tortoise
CS221 Othello Project Report Lap Fung the Tortoise Alvin Cheung akcheung@stanford.edu Alwin Chi achi@stanford.edu November 28 2001 Jimmy Pang hcpang@stanford.edu 1 Overview The construction of Lap Fung
More informationBoard Game AIs. With a Focus on Othello. Julian Panetta March 3, 2010
Board Game AIs With a Focus on Othello Julian Panetta March 3, 2010 1 Practical Issues Bug fix for TimeoutException at player init Not an issue for everyone Download updated project files from CS2 course
More informationARTIFICIAL INTELLIGENCE (CS 370D)
Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) (CHAPTER-5) ADVERSARIAL SEARCH ADVERSARIAL SEARCH Optimal decisions Min algorithm α-β pruning Imperfect,
More informationGames CSE 473. Kasparov Vs. Deep Junior August 2, 2003 Match ends in a 3 / 3 tie!
Games CSE 473 Kasparov Vs. Deep Junior August 2, 2003 Match ends in a 3 / 3 tie! Games in AI In AI, games usually refers to deteristic, turntaking, two-player, zero-sum games of perfect information Deteristic:
More informationFive-In-Row with Local Evaluation and Beam Search
Five-In-Row with Local Evaluation and Beam Search Jiun-Hung Chen and Adrienne X. Wang jhchen@cs axwang@cs Abstract This report provides a brief overview of the game of five-in-row, also known as Go-Moku,
More informationToday. Types of Game. Games and Search 1/18/2010. COMP210: Artificial Intelligence. Lecture 10. Game playing
COMP10: Artificial Intelligence Lecture 10. Game playing Trevor Bench-Capon Room 15, Ashton Building Today We will look at how search can be applied to playing games Types of Games Perfect play minimax
More informationCS 188: Artificial Intelligence
CS 188: Artificial Intelligence Adversarial Search Instructor: Stuart Russell University of California, Berkeley Game Playing State-of-the-Art Checkers: 1950: First computer player. 1959: Samuel s self-taught
More information1 Modified Othello. Assignment 2. Total marks: 100. Out: February 10 Due: March 5 at 14:30
CSE 3402 3.0 Intro. to Concepts of AI Winter 2012 Dept. of Computer Science & Engineering York University Assignment 2 Total marks: 100. Out: February 10 Due: March 5 at 14:30 Note 1: To hand in your report
More informationArtificial Intelligence
Artificial Intelligence Jeff Clune Assistant Professor Evolving Artificial Intelligence Laboratory AI Challenge One 140 Challenge 1 grades 120 100 80 60 AI Challenge One Transform to graph Explore the
More informationAdversary Search. Ref: Chapter 5
Adversary Search Ref: Chapter 5 1 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans is possible. Many games can be modeled very easily, although
More informationCOMP219: COMP219: Artificial Intelligence Artificial Intelligence Dr. Annabel Latham Lecture 12: Game Playing Overview Games and Search
COMP19: Artificial Intelligence COMP19: Artificial Intelligence Dr. Annabel Latham Room.05 Ashton Building Department of Computer Science University of Liverpool Lecture 1: Game Playing 1 Overview Last
More informationOthello/Reversi using Game Theory techniques Parth Parekh Urjit Singh Bhatia Kushal Sukthankar
Othello/Reversi using Game Theory techniques Parth Parekh Urjit Singh Bhatia Kushal Sukthankar Othello Rules Two Players (Black and White) 8x8 board Black plays first Every move should Flip over at least
More informationArtificial Intelligence. Minimax and alpha-beta pruning
Artificial Intelligence Minimax and alpha-beta pruning In which we examine the problems that arise when we try to plan ahead to get the best result in a world that includes a hostile agent (other agent
More informationComputer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville
Computer Science and Software Engineering University of Wisconsin - Platteville 4. Game Play CS 3030 Lecture Notes Yan Shi UW-Platteville Read: Textbook Chapter 6 What kind of games? 2-player games Zero-sum
More informationGame Playing: Adversarial Search. Chapter 5
Game Playing: Adversarial Search Chapter 5 Outline Games Perfect play minimax search α β pruning Resource limits and approximate evaluation Games of chance Games of imperfect information Games vs. Search
More informationPay attention to how flipping of pieces is determined with each move.
CSCE 625 Programing Assignment #5 due: Friday, Mar 13 (by start of class) Minimax Search for Othello The goal of this assignment is to implement a program for playing Othello using Minimax search. Othello,
More informationProgramming Project 1: Pacman (Due )
Programming Project 1: Pacman (Due 8.2.18) Registration to the exams 521495A: Artificial Intelligence Adversarial Search (Min-Max) Lectured by Abdenour Hadid Adjunct Professor, CMVS, University of Oulu
More informationCS 4700: Foundations of Artificial Intelligence
CS 4700: Foundations of Artificial Intelligence selman@cs.cornell.edu Module: Adversarial Search R&N: Chapter 5 1 Outline Adversarial Search Optimal decisions Minimax α-β pruning Case study: Deep Blue
More informationCS 771 Artificial Intelligence. Adversarial Search
CS 771 Artificial Intelligence Adversarial Search Typical assumptions Two agents whose actions alternate Utility values for each agent are the opposite of the other This creates the adversarial situation
More informationAnnouncements. Homework 1. Project 1. Due tonight at 11:59pm. Due Friday 2/8 at 4:00pm. Electronic HW1 Written HW1
Announcements Homework 1 Due tonight at 11:59pm Project 1 Electronic HW1 Written HW1 Due Friday 2/8 at 4:00pm CS 188: Artificial Intelligence Adversarial Search and Game Trees Instructors: Sergey Levine
More informationCS151 - Assignment 2 Mancala Due: Tuesday March 5 at the beginning of class
CS151 - Assignment 2 Mancala Due: Tuesday March 5 at the beginning of class http://www.clubpenguinsaraapril.com/2009/07/mancala-game-in-club-penguin.html The purpose of this assignment is to program some
More informationCS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA
CS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA Game playing was one of the first tasks undertaken in AI as soon as computers became programmable. (e.g., Turing, Shannon, and
More informationCS 4700: Artificial Intelligence
CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 10 Today Adversarial search (R&N Ch 5) Tuesday, March 7 Knowledge Representation and Reasoning (R&N Ch 7)
More informationGame Playing State-of-the-Art
Adversarial Search [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at http://ai.berkeley.edu.] Game Playing State-of-the-Art
More informationCS221 Project Final: DominAI
CS221 Project Final: DominAI Guillermo Angeris and Lucy Li I. INTRODUCTION From chess to Go to 2048, AI solvers have exceeded humans in game playing. However, much of the progress in game playing algorithms
More informationGame Engineering CS F-24 Board / Strategy Games
Game Engineering CS420-2014F-24 Board / Strategy Games David Galles Department of Computer Science University of San Francisco 24-0: Overview Example games (board splitting, chess, Othello) /Max trees
More informationADVERSARIAL SEARCH. Chapter 5
ADVERSARIAL SEARCH Chapter 5... every game of skill is susceptible of being played by an automaton. from Charles Babbage, The Life of a Philosopher, 1832. Outline Games Perfect play minimax decisions α
More informationGame-playing AIs: Games and Adversarial Search I AIMA
Game-playing AIs: Games and Adversarial Search I AIMA 5.1-5.2 Games: Outline of Unit Part I: Games as Search Motivation Game-playing AI successes Game Trees Evaluation Functions Part II: Adversarial Search
More informationGame-Playing & Adversarial Search
Game-Playing & Adversarial Search This lecture topic: Game-Playing & Adversarial Search (two lectures) Chapter 5.1-5.5 Next lecture topic: Constraint Satisfaction Problems (two lectures) Chapter 6.1-6.4,
More informationMonte Carlo Tree Search
Monte Carlo Tree Search 1 By the end, you will know Why we use Monte Carlo Search Trees The pros and cons of MCTS How it is applied to Super Mario Brothers and Alpha Go 2 Outline I. Pre-MCTS Algorithms
More informationArtificial Intelligence Adversarial Search
Artificial Intelligence Adversarial Search Adversarial Search Adversarial search problems games They occur in multiagent competitive environments There is an opponent we can t control planning again us!
More informationCS 5522: Artificial Intelligence II
CS 5522: Artificial Intelligence II Adversarial Search Instructor: Alan Ritter Ohio State University [These slides were adapted from CS188 Intro to AI at UC Berkeley. All materials available at http://ai.berkeley.edu.]
More informationAdversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here:
Adversarial Search 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse471/lectures/adversarial.pdf Slides are largely based
More informationChess Algorithms Theory and Practice. Rune Djurhuus Chess Grandmaster / September 23, 2013
Chess Algorithms Theory and Practice Rune Djurhuus Chess Grandmaster runed@ifi.uio.no / runedj@microsoft.com September 23, 2013 1 Content Complexity of a chess game History of computer chess Search trees
More informationCS 188: Artificial Intelligence Spring Announcements
CS 188: Artificial Intelligence Spring 2011 Lecture 7: Minimax and Alpha-Beta Search 2/9/2011 Pieter Abbeel UC Berkeley Many slides adapted from Dan Klein 1 Announcements W1 out and due Monday 4:59pm P2
More informationCMSC 671 Project Report- Google AI Challenge: Planet Wars
1. Introduction Purpose The purpose of the project is to apply relevant AI techniques learned during the course with a view to develop an intelligent game playing bot for the game of Planet Wars. Planet
More informationCS188 Spring 2014 Section 3: Games
CS188 Spring 2014 Section 3: Games 1 Nearly Zero Sum Games The standard Minimax algorithm calculates worst-case values in a zero-sum two player game, i.e. a game in which for all terminal states s, the
More informationAdversarial Search. CS 486/686: Introduction to Artificial Intelligence
Adversarial Search CS 486/686: Introduction to Artificial Intelligence 1 Introduction So far we have only been concerned with a single agent Today, we introduce an adversary! 2 Outline Games Minimax search
More information2 person perfect information
Why Study Games? Games offer: Intellectual Engagement Abstraction Representability Performance Measure Not all games are suitable for AI research. We will restrict ourselves to 2 person perfect information
More informationCS 188: Artificial Intelligence. Overview
CS 188: Artificial Intelligence Lecture 6 and 7: Search for Games Pieter Abbeel UC Berkeley Many slides adapted from Dan Klein 1 Overview Deterministic zero-sum games Minimax Limited depth and evaluation
More informationCS 221 Othello Project Professor Koller 1. Perversi
CS 221 Othello Project Professor Koller 1 Perversi 1 Abstract Philip Wang Louis Eisenberg Kabir Vadera pxwang@stanford.edu tarheel@stanford.edu kvadera@stanford.edu In this programming project we designed
More informationAdversarial Search and Game- Playing C H A P T E R 6 C M P T : S P R I N G H A S S A N K H O S R A V I
Adversarial Search and Game- Playing C H A P T E R 6 C M P T 3 1 0 : S P R I N G 2 0 1 1 H A S S A N K H O S R A V I Adversarial Search Examine the problems that arise when we try to plan ahead in a world
More informationGame playing. Chapter 6. Chapter 6 1
Game playing Chapter 6 Chapter 6 1 Outline Games Perfect play minimax decisions α β pruning Resource limits and approximate evaluation Games of chance Games of imperfect information Chapter 6 2 Games vs.
More informationGame playing. Chapter 5. Chapter 5 1
Game playing Chapter 5 Chapter 5 1 Outline Games Perfect play minimax decisions α β pruning Resource limits and approximate evaluation Games of chance Games of imperfect information Chapter 5 2 Types of
More informationTheory and Practice of Artificial Intelligence
Theory and Practice of Artificial Intelligence Games Daniel Polani School of Computer Science University of Hertfordshire March 9, 2017 All rights reserved. Permission is granted to copy and distribute
More informationCS 380: ARTIFICIAL INTELLIGENCE ADVERSARIAL SEARCH. Santiago Ontañón
CS 380: ARTIFICIAL INTELLIGENCE ADVERSARIAL SEARCH Santiago Ontañón so367@drexel.edu Recall: Problem Solving Idea: represent the problem we want to solve as: State space Actions Goal check Cost function
More informationGames and Adversarial Search II
Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.3) Some slides adapted from Richard Lathrop, USC/ISI, CS 271 Review: The Minimax Rule Idea: Make the best move for MAX assuming that MIN always
More informationAI Plays Yun Nie (yunn), Wenqi Hou (wenqihou), Yicheng An (yicheng)
AI Plays 2048 Yun Nie (yunn), Wenqi Hou (wenqihou), Yicheng An (yicheng) Abstract The strategy game 2048 gained great popularity quickly. Although it is easy to play, people cannot win the game easily,
More information5.4 Imperfect, Real-Time Decisions
5.4 Imperfect, Real-Time Decisions Searching through the whole (pruned) game tree is too inefficient for any realistic game Moves must be made in a reasonable amount of time One has to cut off the generation
More informationArtificial Intelligence Search III
Artificial Intelligence Search III Lecture 5 Content: Search III Quick Review on Lecture 4 Why Study Games? Game Playing as Search Special Characteristics of Game Playing Search Ingredients of 2-Person
More informationInstability of Scoring Heuristic In games with value exchange, the heuristics are very bumpy Make smoothing assumptions search for "quiesence"
More on games Gaming Complications Instability of Scoring Heuristic In games with value exchange, the heuristics are very bumpy Make smoothing assumptions search for "quiesence" The Horizon Effect No matter
More informationCS 331: Artificial Intelligence Adversarial Search II. Outline
CS 331: Artificial Intelligence Adversarial Search II 1 Outline 1. Evaluation Functions 2. State-of-the-art game playing programs 3. 2 player zero-sum finite stochastic games of perfect information 2 1
More informationCS 380: ARTIFICIAL INTELLIGENCE MONTE CARLO SEARCH. Santiago Ontañón
CS 380: ARTIFICIAL INTELLIGENCE MONTE CARLO SEARCH Santiago Ontañón so367@drexel.edu Recall: Adversarial Search Idea: When there is only one agent in the world, we can solve problems using DFS, BFS, ID,
More information6. Games. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Mechanical Turk. Origins. origins. motivation. minimax search
COMP9414/9814/3411 16s1 Games 1 COMP9414/ 9814/ 3411: Artificial Intelligence 6. Games Outline origins motivation Russell & Norvig, Chapter 5. minimax search resource limits and heuristic evaluation α-β
More information5.4 Imperfect, Real-Time Decisions
116 5.4 Imperfect, Real-Time Decisions Searching through the whole (pruned) game tree is too inefficient for any realistic game Moves must be made in a reasonable amount of time One has to cut off the
More informationAnnouncements. Homework 1 solutions posted. Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search)
Minimax (Ch. 5-5.3) Announcements Homework 1 solutions posted Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search) Single-agent So far we have look at how a single agent can search
More informationAdversarial Search. Read AIMA Chapter CIS 421/521 - Intro to AI 1
Adversarial Search Read AIMA Chapter 5.2-5.5 CIS 421/521 - Intro to AI 1 Adversarial Search Instructors: Dan Klein and Pieter Abbeel University of California, Berkeley [These slides were created by Dan
More informationGame-playing AIs: Games and Adversarial Search FINAL SET (w/ pruning study examples) AIMA
Game-playing AIs: Games and Adversarial Search FINAL SET (w/ pruning study examples) AIMA 5.1-5.2 Games: Outline of Unit Part I: Games as Search Motivation Game-playing AI successes Game Trees Evaluation
More informationData Structures and Algorithms
Data Structures and Algorithms CS245-2015S-P4 Two Player Games David Galles Department of Computer Science University of San Francisco P4-0: Overview Example games (board splitting, chess, Network) /Max
More informationa b c d e f g h 1 a b c d e f g h C A B B A C C X X C C X X C C A B B A C Diagram 1-2 Square names
Chapter Rules and notation Diagram - shows the standard notation for Othello. The columns are labeled a through h from left to right, and the rows are labeled through from top to bottom. In this book,
More informationUniversity of Amsterdam. Encyclopedia of AI project. Tic-Tac-Toe. Authors: Andreas van Cranenburgh Ricus Smid. Supervisor: Maarten van Someren
University of Amsterdam Encyclopedia of AI project Tic-Tac-Toe Authors: Andreas van Cranenburgh Ricus Smid Supervisor: Maarten van Someren January 27, 2007 Encyclopedia of AI, assignment 5 Tic-tac-toe
More informationAdversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5
Adversarial Search CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2017 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5 Outline Game
More informationDeep Green. System for real-time tracking and playing the board game Reversi. Final Project Submitted by: Nadav Erell
Deep Green System for real-time tracking and playing the board game Reversi Final Project Submitted by: Nadav Erell Introduction to Computational and Biological Vision Department of Computer Science, Ben-Gurion
More informationAdversarial Search. CS 486/686: Introduction to Artificial Intelligence
Adversarial Search CS 486/686: Introduction to Artificial Intelligence 1 AccessAbility Services Volunteer Notetaker Required Interested? Complete an online application using your WATIAM: https://york.accessiblelearning.com/uwaterloo/
More informationModule 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur
Module 3 Problem Solving using Search- (Two agent) 3.1 Instructional Objective The students should understand the formulation of multi-agent search and in detail two-agent search. Students should b familiar
More informationThe game of Reversi was invented around 1880 by two. Englishmen, Lewis Waterman and John W. Mollett. It later became
Reversi Meng Tran tranm@seas.upenn.edu Faculty Advisor: Dr. Barry Silverman Abstract: The game of Reversi was invented around 1880 by two Englishmen, Lewis Waterman and John W. Mollett. It later became
More informationCS440/ECE448 Lecture 11: Stochastic Games, Stochastic Search, and Learned Evaluation Functions
CS440/ECE448 Lecture 11: Stochastic Games, Stochastic Search, and Learned Evaluation Functions Slides by Svetlana Lazebnik, 9/2016 Modified by Mark Hasegawa Johnson, 9/2017 Types of game environments Perfect
More informationCS-E4800 Artificial Intelligence
CS-E4800 Artificial Intelligence Jussi Rintanen Department of Computer Science Aalto University March 9, 2017 Difficulties in Rational Collective Behavior Individual utility in conflict with collective
More informationGame playing. Chapter 6. Chapter 6 1
Game playing Chapter 6 Chapter 6 1 Outline Games Perfect play minimax decisions α β pruning Resource limits and approximate evaluation Games of chance Games of imperfect information Chapter 6 2 Games vs.
More informationFinal Project: Reversi
Final Project: Reversi Reversi is a classic 2-player game played on an 8 by 8 grid of squares. Players take turns placing pieces of their color on the board so that they sandwich and change the color of
More informationGame Playing Part 1 Minimax Search
Game Playing Part 1 Minimax Search Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [based on slides from A. Moore http://www.cs.cmu.edu/~awm/tutorials, C.
More informationCSC321 Lecture 23: Go
CSC321 Lecture 23: Go Roger Grosse Roger Grosse CSC321 Lecture 23: Go 1 / 21 Final Exam Friday, April 20, 9am-noon Last names A Y: Clara Benson Building (BN) 2N Last names Z: Clara Benson Building (BN)
More informationMyPawns OppPawns MyKings OppKings MyThreatened OppThreatened MyWins OppWins Draws
The Role of Opponent Skill Level in Automated Game Learning Ying Ge and Michael Hash Advisor: Dr. Mark Burge Armstrong Atlantic State University Savannah, Geogia USA 31419-1997 geying@drake.armstrong.edu
More informationProject 1. Out of 20 points. Only 30% of final grade 5-6 projects in total. Extra day: 10%
Project 1 Out of 20 points Only 30% of final grade 5-6 projects in total Extra day: 10% 1. DFS (2) 2. BFS (1) 3. UCS (2) 4. A* (3) 5. Corners (2) 6. Corners Heuristic (3) 7. foodheuristic (5) 8. Suboptimal
More informationAn Intelligent Agent for Connect-6
An Intelligent Agent for Connect-6 Sagar Vare, Sherrie Wang, Andrea Zanette {svare, sherwang, zanette}@stanford.edu Institute for Computational and Mathematical Engineering Huang Building 475 Via Ortega
More informationCS 380: ARTIFICIAL INTELLIGENCE
CS 380: ARTIFICIAL INTELLIGENCE ADVERSARIAL SEARCH 10/23/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Recall: Problem Solving Idea: represent
More informationGame playing. Outline
Game playing Chapter 6, Sections 1 8 CS 480 Outline Perfect play Resource limits α β pruning Games of chance Games of imperfect information Games vs. search problems Unpredictable opponent solution is
More information