Monte Carlo based battleship agent

Size: px
Start display at page:

Download "Monte Carlo based battleship agent"

Transcription

1 Monte Carlo based battleship agent Written by: Omer Haber, ; Dror Sharf, Introduction The game of battleship is a guessing game for two players which has been around for almost a century. In this paper we document our various attempts (and eventual success) to create an agent that can beat most humans. The rules of the game The game is played on four grids, two for each player. The grids are typically square usually and the individual squares in the grid are identified by letter and number. On one grid the player arranges ships and records the shots by the opponent. On the other grid the player records their own shots. Before playing commences, each player secretly arranges their ships on their primary grid. Each ship occupies a number of consecutive squares on the grid, arranged either horizontally or vertically. The number of squares for each ship is determined by the type of the ship. The ships cannot overlap (i.e., only one ship can occupy any given square in the grid). The types and numbers of ships allowed are the same for each player. These may vary depending on the rules. Specifically, in our attempts, we have used various numbers and types of ships to see with which rules our agent performs better. After the ships have been positioned, the game proceeds in a series of rounds. In each round, each player takes a turn to announce a target square in the opponent's grid which is to be shot at. The opponent announces whether or not the square is occupied by a ship, and if it is a "miss", the player marks their primary grid with a white peg; if a "hit" they mark this on their own primary grid with a red peg. The attacking player notes the hit or miss on their own "tracking" grid with the appropriate color peg (red for "hit", white for "miss"), in order to build up a picture of the opponent's fleet. Figure 1: example of a standard battleship game. 1

2 When all of the squares of a ship have been hit, the ship is sunk, and the ship's owner announces this (e.g. "You sank my battleship!"). If all of a player's ships have been sunk, the game is over and their opponent wins. In our version of the game we have disregarded this property of the game (the agent doesn't know whether it sunk a ship or not) Approach and Method First of all, we state several properties of the game which we based our solution on: Our 2 player game is not really for 2 players The rules of the game state that each player makes a move in their own turn. However we can see that every pair of grids in the game is dedicated solely for the purpose of searching and destroying a player's fleet, and is not affected by the events on the other pair of grids (other than, of course, if the other player loses the game). With this we can understand that all that really matters is the amount of moves taken for a player to bring down the other player's fleet. Therefore we have decided to focus our efforts on building the best agent for bringing down the enemy as fast as possible. Our scoring system is designed to measure how fast our agent finishes destroying the enemy's fleet. The agent starts with n 2 points, and for each shot taken by our agent we reduce 1 point from the final score, meaning that if our agent tries to shoot at every square on the board before finishing the game it will get precisely 0 points. Not all squares were created equal One can see that we our game can be looked at as a partially observable Markov decision process (POMDP). Obviously our agent receives only a partial observation of the system at each stage (whether it's a hit or a miss on a certain square it previously chose to bombard) and each action has a statistical result. However, some squares have a higher probability of holding a ship. For example, let us take a look at a simple 3x3 board with a single 1x2 ship. We would like to calculate the precise chance of our ship being in a particular square, given a random distribution of placements. Figure 2: all the possible positions of a ship of length 2 on a 3x3 board. 2

3 As one can see, the total number of ships that are positioned in the center square across all boards is double the total number of ships that are positioned in any particular corner. Therefore, if we assume that a player will likely lay his ships in a random manner, our first move should probably be shooting down the center. We could theoretically try to do this calculation for every observation we have on the board: take all the possible boards, find the most likely square and fire at it. Yet, then we are faced with a computation problem that becomes intractable on even medium-sized boards: on a 10x10 board with 5 ships there are approximately 70 billion different layouts. Obviously, going through all of them and eliminating those which do not satisfy the constraints that stem from the history of observations is an impossible task with standard computational power, and we needed something more feasible. The Monte Carlo method The name "Monte Carlo methods" refers to a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results, usually to solve problems in which it is difficult or impossible to use precise mathematical methods. In our case, understanding the infeasibility of a full solution to our problem, we came to a conclusion that randomizing a large number of boards that agree with our observation of the world would usually give us a close approximation of the boat distribution on each square of the board. Put more precisely, our algorithm randomizes a certain number of boards at the beginning of the game, and for each turn eliminates the boards that do not agree with the observations of the real board, randomizing possible boards again until a suitable one is found. For each step, after this is done, we sum the amount of boards that have a boat in each particular square. After the scores for each of the squares are calculated, we pick the most probable one. Figure 3: On the left the board we play on. Legend: Red Square discovered square with a ship (hit). Green Square discovered square without a ship (miss). Teal Square undiscovered square with a ship. Blue Square undiscovered square without a ship. 3

4 On the right A heat map showing the distribution of probabilities where red is most probable and black is least. Satisfying the constraints An issue that arises is the need to randomize a board in such a way that would satisfy the constraints stemming from the observations. One could think that just trying to randomize boards until we find one that agrees with the observation is generally a good idea, but this is not the case. For example let's say that we have almost completed hitting all the squares on the board in such a manner that there is only one viable way to actually place the boats on the board. In that case our algorithm is going to try randomizing a single board out of 70 billion different options. Again, we needed something more feasible. Although this seems like just a question of feasibility, the running time was actually a major factor. The longer it took us to randomize a valid board, the less of them we could use in every single iteration. This in turn made our Monte Carlo estimation less accurate and, therefore, less reliable. In order to reduce the number of different options, we first decided to not allow our randomization algorithm to place boats on squares that we've already missed. That alone doesn t work so well, so we tried giving priority to placing boats on squares that we knew that we've hit. In order to make sure we don't always try to place the same boat at the same spot, we also randomize the order of the boats we try to place. Results Time Matters backtracking vs. fresh random boards As we've already discussed, the running time of our algorithm was a real issue, and since most of our running time was concentrated on randomizing boards that agree with our observations, we tried several approaches to this problem. The two approaches found to be most effective were: 1. When randomizing the board and hitting a dead end, try to randomize another board again and start the whole process over 2. Backtrack and try to take out the last ship that didn't fit, and change its location so it fits the constraint. After several unsuccessful tries, backtrack once more and repeat this process recursively. In order to check the effectiveness of each method, we let both of them try to completely fill out different sizes of boards with different ships, and compared the results. 4

5 Average Ratio between Time Taken to Fill Boards of Different Sizes recursive random Figure 4: Average ratio (Y axis) between the time taken to fill boards of different sizes (X axis) (the red columns are there to give a sense of magnitude to the blue columns) As we can see, the randomization algorithm tends to fare between 1.15 and 9.5 times better at every single situation it faced (aside from one case), as well as faring better as the board size grows. This results probably stems from the fact that when we try to backtrack an already badly-positioned ship we are going to spend a lot of time trying to solve an unsolvable problem before we decide to take out the first ship. Effects of sample size Another thing we wanted to test out was the effectiveness of our algorithm as a function of the number of boards evaluated at each step of the way. The following results have been attained on a board with the following properties: Size of 10x10 or 20x20 respectively One ship of size 5 One ship of size 4 Two ships of size 3 One ship of size 2 The agents had played the same 100 boards in each test. 5

6 Figure 5: Average score (Y axis) as a function of the number of evaluated boards at each step(x axis) As we can see from the graph, there is about a 13% increase in the effectiveness of the algorithm (6 shots faster) on a 10x10 board, capping around 47 shots. This bound stems from the fact that not much information can be extracted regarding small ships. For example, in the following scenario the ship of size 2 can fit pretty much anywhere on the board, leading to the algorithm spending much time "shooting" to find out where it is: Figure 6: example of an extreme case the algorithm has difficulties finding the smallest ship. On the 20x20 board we can see a much larger increase in the score (which is the important statistic for us): there is about a 15% increase in the effectiveness of the algorithm (32 shots faster). These results probably stem from the fact that larger samples are required for the Monte Carlo analysis in order to get reliable results on a 20 x 20 board. Have we surpassed the humans? Our initial goal was to create an algorithm that could beat most humans in the game; however it turns out playing thousands of games against a computer is quite a tiresome task, therefore we have decided to build a heuristic that plays quite similarly to how most humans work and let it fare against our algorithm. 6

7 So we sat down with several people and asked them how they would play the game. Simply put, our heuristic tries to find ships randomly while keeping a margin of one square between fires since the smallest size of a ship is 2. When our heuristic finds a ship it tries it's best to destroy it, aiming for nearby squares. Figure 7: example of how the heuristic works, checkers pattern as seen near (5,8) turns out to work quite effectively. The following results have been attained on a board with the following properties: Size of 10x10 or 20x20 respectively One ship of size 5 One ship of size 4 Two ships of size 3 One ship of size 2 Each agent (completely random, heuristic, human and POMDP) had to play the same 100 boards (including the poor human ) mean score 10 by 10 mean score 20 by awesome AI human heuristic random 0 awesome AI human heuristic random 0 Figure 8: comprehension of mean scores of different agents. 7

8 As we can see from the graph for the 10x10 board, our algorithm fares about 20% better than the human (around 9 steps faster on the board) and about 30% better than our heuristic (around 12 steps faster on the board), which means it's pretty effective and really not fun to play against. On the 20x20 board our algorithm fares about 8% better than the human agent (around 19 shots faster on the board) and about 13% than our heuristic (around 29 steps faster on the board). Conclusions We started out our journey to destroy yet another wonderful game humans tend to delve into for hours on end. We feel we have succeeded in our quest, using the power of statistical analysis. We have seen that some algorithms tend to do better than others when it comes to satisfying constraints in our problem, and that as one could've expected, using a larger sample for our statistical analysis tends to fare better results. We've seen, however, that there exists a cap which is quite hard to beat no matter what kind of algorithm you are using assuming that the board you're trying to discover is completely random. Further research could concentrate on seeing results for a similar algorithm using a significantly higher number of randomized boards, finding an upper bound on the amount of average shots needed to be taken in order to win the game or finding layouts which are likely to maximize a player's chance of survival. References "Monte-Carlo Planning in Large POMDPs" by David Silver and Joel Veness. 8

More on games (Ch )

More 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 information

2048: An Autonomous Solver

2048: 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 information

More on games (Ch )

More 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 information

Game Playing for a Variant of Mancala Board Game (Pallanguzhi)

Game 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 information

COMP3211 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 ( ) 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 information

Programming an Othello AI Michael An (man4), Evan Liang (liange)

Programming an Othello AI Michael An (man4), Evan Liang (liange) 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

More information

Adversary Search. Ref: Chapter 5

Adversary 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 information

CS-E4800 Artificial Intelligence

CS-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 information

Monte Carlo tree search techniques in the game of Kriegspiel

Monte Carlo tree search techniques in the game of Kriegspiel Monte Carlo tree search techniques in the game of Kriegspiel Paolo Ciancarini and Gian Piero Favini University of Bologna, Italy 22 IJCAI, Pasadena, July 2009 Agenda Kriegspiel as a partial information

More information

CMSC 671 Project Report- Google AI Challenge: Planet Wars

CMSC 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 information

Chapter 3 Learning in Two-Player Matrix Games

Chapter 3 Learning in Two-Player Matrix Games Chapter 3 Learning in Two-Player Matrix Games 3.1 Matrix Games In this chapter, we will examine the two-player stage game or the matrix game problem. Now, we have two players each learning how to play

More information

YourTurnMyTurn.com: Go-moku rules. Sjoerd Hemminga (sjoerdje) Copyright 2019 YourTurnMyTurn.com

YourTurnMyTurn.com: Go-moku rules. Sjoerd Hemminga (sjoerdje) Copyright 2019 YourTurnMyTurn.com YourTurnMyTurn.com: Go-moku rules Sjoerd Hemminga (sjoerdje) Copyright 2019 YourTurnMyTurn.com Inhoud Go-moku rules...1 Introduction and object of the board game...1 Tactics...1 Strategy...2 i Go-moku

More information

The game of Reversi was invented around 1880 by two. Englishmen, Lewis Waterman and John W. Mollett. It later became

The 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 information

Optimal Yahtzee performance in multi-player games

Optimal 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 information

CS221 Project Final Report Gomoku Game Agent

CS221 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 information

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game.

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game. CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25 Homework #1 ( Due: Oct 10 ) Figure 1: The laser game. Task 1. [ 60 Points ] Laser Game Consider the following game played on an n n board,

More information

AI Learning Agent for the Game of Battleship

AI Learning Agent for the Game of Battleship CS 221 Fall 2016 AI Learning Agent for the Game of Battleship Jordan Ebel (jebel) Kai Yee Wan (kaiw) Abstract This project implements a Battleship-playing agent that uses reinforcement learning to become

More information

CS 188: Artificial Intelligence Spring 2007

CS 188: Artificial Intelligence Spring 2007 CS 188: Artificial Intelligence Spring 2007 Lecture 7: CSP-II and Adversarial Search 2/6/2007 Srini Narayanan ICSI and UC Berkeley Many slides over the course adapted from Dan Klein, Stuart Russell or

More information

AI Plays Yun Nie (yunn), Wenqi Hou (wenqihou), Yicheng An (yicheng)

AI 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 information

Assignment 6 Play A Game: Minesweeper or Battleship!!! Due: Sunday, December 3rd, :59pm

Assignment 6 Play A Game: Minesweeper or Battleship!!! Due: Sunday, December 3rd, :59pm Assignment 6 Play A Game: Minesweeper or Battleship!!! Due: Sunday, December 3rd, 2017 11:59pm This will be our last assignment in the class, boohoo Grading: For this assignment, you will be graded traditionally,

More information

CS221 Project: Final Report Raiden AI Agent

CS221 Project: Final Report Raiden AI Agent CS221 Project: Final Report Raiden AI Agent Lu Bian lbian@stanford.edu Yiran Deng yrdeng@stanford.edu Xuandong Lei xuandong@stanford.edu 1 Introduction Raiden is a classic shooting game where the player

More information

CS440/ECE448 Lecture 11: Stochastic Games, Stochastic Search, and Learned Evaluation Functions

CS440/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 information

Real-Time Connect 4 Game Using Artificial Intelligence

Real-Time Connect 4 Game Using Artificial Intelligence Journal of Computer Science 5 (4): 283-289, 2009 ISSN 1549-3636 2009 Science Publications Real-Time Connect 4 Game Using Artificial Intelligence 1 Ahmad M. Sarhan, 2 Adnan Shaout and 2 Michele Shock 1

More information

How to Beat Kindergartners at Battleship

How to Beat Kindergartners at Battleship This article was downloaded by: [Van Pelt and Opie Library] On: 17 April 2013, At: 12:42 Publisher: Taylor & Francis Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office:

More information

CS 229 Final Project: Using Reinforcement Learning to Play Othello

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 information

Artificial Intelligence. Cameron Jett, William Kentris, Arthur Mo, Juan Roman

Artificial Intelligence. Cameron Jett, William Kentris, Arthur Mo, Juan Roman Artificial Intelligence Cameron Jett, William Kentris, Arthur Mo, Juan Roman AI Outline Handicap for AI Machine Learning Monte Carlo Methods Group Intelligence Incorporating stupidity into game AI overview

More information

YEDITEPE UNIVERSITY CSE331 OPERATING SYSTEMS DESIGN FALL2012 ASSIGNMENT III

YEDITEPE UNIVERSITY CSE331 OPERATING SYSTEMS DESIGN FALL2012 ASSIGNMENT III YEDITEPE UNIVERSITY CSE331 OPERATING SYSTEMS DESIGN FALL2012 ASSIGNMENT III Last Submission Date: 11 November 2012, 23:59 UNIX TCP/IP SOCKETS In the third assignment, a simplified version of the game Battleship,

More information

Battleship Advance Rules

Battleship Advance Rules Battleship Advance Rules Soren Bjornstad July 27, 2012 Contents 1 About This Game 2 1.1 Cheating................................ 2 2 Rules 2 2.1 Setup................................. 2 2.2 About Items.............................

More information

OCTAGON 5 IN 1 GAME SET

OCTAGON 5 IN 1 GAME SET OCTAGON 5 IN 1 GAME SET CHESS, CHECKERS, BACKGAMMON, DOMINOES AND POKER DICE Replacement Parts Order direct at or call our Customer Service department at (800) 225-7593 8 am to 4:30 pm Central Standard

More information

CS510 \ Lecture Ariel Stolerman

CS510 \ Lecture Ariel Stolerman CS510 \ Lecture04 2012-10-15 1 Ariel Stolerman Administration Assignment 2: just a programming assignment. Midterm: posted by next week (5), will cover: o Lectures o Readings A midterm review sheet will

More information

Techniques for Generating Sudoku Instances

Techniques for Generating Sudoku Instances Chapter Techniques for Generating Sudoku Instances Overview Sudoku puzzles become worldwide popular among many players in different intellectual levels. In this chapter, we are going to discuss different

More information

B1 Problem Statement Unit Pricing

B1 Problem Statement Unit Pricing B1 Problem Statement Unit Pricing Determine the best buy (the lowest per unit cost) between two items. The inputs will be the weight in ounces and the cost in dollars. Display whether the first or the

More information

Artificial Intelligence

Artificial 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 information

Playing Othello Using Monte Carlo

Playing 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 information

Experiments on Alternatives to Minimax

Experiments on Alternatives to Minimax Experiments on Alternatives to Minimax Dana Nau University of Maryland Paul Purdom Indiana University April 23, 1993 Chun-Hung Tzeng Ball State University Abstract In the field of Artificial Intelligence,

More information

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Adversarial 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 information

Reinforcement Learning in Games Autonomous Learning Systems Seminar

Reinforcement Learning in Games Autonomous Learning Systems Seminar Reinforcement Learning in Games Autonomous Learning Systems Seminar Matthias Zöllner Intelligent Autonomous Systems TU-Darmstadt zoellner@rbg.informatik.tu-darmstadt.de Betreuer: Gerhard Neumann Abstract

More information

Set 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask

Set 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 information

Announcements. Homework 1 solutions posted. Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search)

Announcements. 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 information

Using Artificial intelligent to solve the game of 2048

Using 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 information

HUJI AI Course 2012/2013. Bomberman. Eli Karasik, Arthur Hemed

HUJI AI Course 2012/2013. Bomberman. Eli Karasik, Arthur Hemed HUJI AI Course 2012/2013 Bomberman Eli Karasik, Arthur Hemed Table of Contents Game Description...3 The Original Game...3 Our version of Bomberman...5 Game Settings screen...5 The Game Screen...6 The Progress

More information

Once this function is called, it repeatedly does several things over and over, several times per second:

Once this function is called, it repeatedly does several things over and over, several times per second: Alien Invasion Oh no! Alien pixel spaceships are descending on the Minecraft world! You'll have to pilot a pixel spaceship of your own and fire pixel bullets to stop them! In this project, you will recreate

More information

Comp 3211 Final Project - Poker AI

Comp 3211 Final Project - Poker AI Comp 3211 Final Project - Poker AI Introduction Poker is a game played with a standard 52 card deck, usually with 4 to 8 players per game. During each hand of poker, players are dealt two cards and must

More information

An Empirical Evaluation of Policy Rollout for Clue

An Empirical Evaluation of Policy Rollout for Clue An Empirical Evaluation of Policy Rollout for Clue Eric Marshall Oregon State University M.S. Final Project marshaer@oregonstate.edu Adviser: Professor Alan Fern Abstract We model the popular board game

More information

Game Playing: Adversarial Search. Chapter 5

Game 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 information

Reinforcement Learning Agent for Scrolling Shooter Game

Reinforcement Learning Agent for Scrolling Shooter Game Reinforcement Learning Agent for Scrolling Shooter Game Peng Yuan (pengy@stanford.edu) Yangxin Zhong (yangxin@stanford.edu) Zibo Gong (zibo@stanford.edu) 1 Introduction and Task Definition 1.1 Game Agent

More information

Monte Carlo Tree Search

Monte 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 information

AI Approaches to Ultimate Tic-Tac-Toe

AI 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 information

Moneybags. by Will Chavis. Combinatorial Games. Instructor: Dr. Harold Reiter

Moneybags. by Will Chavis. Combinatorial Games. Instructor: Dr. Harold Reiter Moneybags by Will Chavis Combinatorial Games Instructor: Dr Harold Reiter Section 1 Introuction The world of math explores many realms of analytical diversity One of the most distinguished analytical forms

More information

CSC 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 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 information

Artificial Intelligence. Minimax and alpha-beta pruning

Artificial 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 information

Sokoban: Reversed Solving

Sokoban: Reversed Solving Sokoban: Reversed Solving Frank Takes (ftakes@liacs.nl) Leiden Institute of Advanced Computer Science (LIACS), Leiden University June 20, 2008 Abstract This article describes a new method for attempting

More information

Unofficial Bolt Action Scenario Book. Leopard, aka Dale Needham

Unofficial Bolt Action Scenario Book. Leopard, aka Dale Needham Unofficial Bolt Action Scenario Book Leopard, aka Dale Needham Issue 0.1, August 2013 2 Chapter 1 Introduction Warlord Game s Bolt Action system includes a number of scenarios on pages 107 120 of the main

More information

Nested Monte-Carlo Search

Nested Monte-Carlo Search Nested Monte-Carlo Search Tristan Cazenave LAMSADE Université Paris-Dauphine Paris, France cazenave@lamsade.dauphine.fr Abstract Many problems have a huge state space and no good heuristic to order moves

More information

AI Agent for Ants vs. SomeBees: Final Report

AI Agent for Ants vs. SomeBees: Final Report CS 221: ARTIFICIAL INTELLIGENCE: PRINCIPLES AND TECHNIQUES 1 AI Agent for Ants vs. SomeBees: Final Report Wanyi Qian, Yundong Zhang, Xiaotong Duan Abstract This project aims to build a real-time game playing

More information

Practice Session 2. HW 1 Review

Practice Session 2. HW 1 Review Practice Session 2 HW 1 Review Chapter 1 1.4 Suppose we extend Evans s Analogy program so that it can score 200 on a standard IQ test. Would we then have a program more intelligent than a human? Explain.

More information

Unit-III Chap-II Adversarial Search. Created by: Ashish Shah 1

Unit-III Chap-II Adversarial Search. Created by: Ashish Shah 1 Unit-III Chap-II Adversarial Search Created by: Ashish Shah 1 Alpha beta Pruning In case of standard ALPHA BETA PRUNING minimax tree, it returns the same move as minimax would, but prunes away branches

More information

Lu 1. Game Theory of 2048

Lu 1. Game Theory of 2048 Lu 1 Game Theory of 2048 Kevin Lu Professor Bray Math 89s: Game Theory and Democracy 24 November 2014 Lu 2 I: Introduction and Background The game 2048 is a strategic block sliding game designed by Italian

More information

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Adversarial 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 information

Jamie Mulholland, Simon Fraser University

Jamie Mulholland, Simon Fraser University Games, Puzzles, and Mathematics (Part 1) Changing the Culture SFU Harbour Centre May 19, 2017 Richard Hoshino, Quest University richard.hoshino@questu.ca Jamie Mulholland, Simon Fraser University j mulholland@sfu.ca

More information

Grade 7/8 Math Circles Game Theory October 27/28, 2015

Grade 7/8 Math Circles Game Theory October 27/28, 2015 Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Game Theory October 27/28, 2015 Chomp Chomp is a simple 2-player game. There is

More information

CONTENTS TABLE OF BOX CONTENT SECTION SECTION SECTION SECTION SECTION SECTION SECTION

CONTENTS TABLE OF BOX CONTENT SECTION SECTION SECTION SECTION SECTION SECTION SECTION BOX CONTENT 300 CARDS *20 Starter Cards [Grey Border] 4 Evasive Maneuvers 4 Tricorder 4 Phasers 4 Diagnostic Check 4 Starfleet Academy *54 Basic Characters [Yellow Border] 24 Ensign 16 Lieutenant 14 Commander

More information

Game Theory. Vincent Kubala

Game Theory. Vincent Kubala Game Theory Vincent Kubala Goals Define game Link games to AI Introduce basic terminology of game theory Overall: give you a new way to think about some problems What Is Game Theory? Field of work involving

More information

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game 37 Game Theory Game theory is one of the most interesting topics of discrete mathematics. The principal theorem of game theory is sublime and wonderful. We will merely assume this theorem and use it to

More information

SCRABBLE ARTIFICIAL INTELLIGENCE GAME. CS 297 Report. Presented to. Dr. Chris Pollett. Department of Computer Science. San Jose State University

SCRABBLE ARTIFICIAL INTELLIGENCE GAME. CS 297 Report. Presented to. Dr. Chris Pollett. Department of Computer Science. San Jose State University SCRABBLE AI GAME 1 SCRABBLE ARTIFICIAL INTELLIGENCE GAME CS 297 Report Presented to Dr. Chris Pollett Department of Computer Science San Jose State University In Partial Fulfillment Of the Requirements

More information

Tetris: A Heuristic Study

Tetris: A Heuristic Study Tetris: A Heuristic Study Using height-based weighing functions and breadth-first search heuristics for playing Tetris Max Bergmark May 2015 Bachelor s Thesis at CSC, KTH Supervisor: Örjan Ekeberg maxbergm@kth.se

More information

Lecture 20: Combinatorial Search (1997) Steven Skiena. skiena

Lecture 20: Combinatorial Search (1997) Steven Skiena.   skiena Lecture 20: Combinatorial Search (1997) Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Give an O(n lg k)-time algorithm

More information

Documentation and Discussion

Documentation 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 information

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5 CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Topics Game playing Game trees

More information

Game Mechanics Minesweeper is a game in which the player must correctly deduce the positions of

Game Mechanics Minesweeper is a game in which the player must correctly deduce the positions of Table of Contents Game Mechanics...2 Game Play...3 Game Strategy...4 Truth...4 Contrapositive... 5 Exhaustion...6 Burnout...8 Game Difficulty... 10 Experiment One... 12 Experiment Two...14 Experiment Three...16

More information

Kenken For Teachers. Tom Davis January 8, Abstract

Kenken For Teachers. Tom Davis   January 8, Abstract Kenken For Teachers Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles January 8, 00 Abstract Kenken is a puzzle whose solution requires a combination of logic and simple arithmetic

More information

Determine the Expected value for each die: Red, Blue and Green. Based on your calculations from Question 1, do you think the game is fair?

Determine the Expected value for each die: Red, Blue and Green. Based on your calculations from Question 1, do you think the game is fair? Answers 7 8 9 10 11 12 TI-Nspire Investigation Student 120 min Introduction Sometimes things just don t live up to their expectations. In this activity you will explore three special dice and determine

More information

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties:

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties: Playing Games Henry Z. Lo June 23, 2014 1 Games We consider writing AI to play games with the following properties: Two players. Determinism: no chance is involved; game state based purely on decisions

More information

Learning 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. 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 information

Ar#ficial)Intelligence!!

Ar#ficial)Intelligence!! Introduc*on! Ar#ficial)Intelligence!! Roman Barták Department of Theoretical Computer Science and Mathematical Logic So far we assumed a single-agent environment, but what if there are more agents and

More information

Game Theory. Vincent Kubala

Game Theory. Vincent Kubala Game Theory Vincent Kubala vkubala@cs.brown.edu Goals efine game Link games to AI Introduce basic terminology of game theory Overall: give you a new way to think about some problems What Is Game Theory?

More information

Fleet Engagement. Mission Objective. Winning. Mission Special Rules. Set Up. Game Length

Fleet Engagement. Mission Objective. Winning. Mission Special Rules. Set Up. Game Length Fleet Engagement Mission Objective Your forces have found the enemy and they are yours! Man battle stations, clear for action!!! Mission Special Rules None Set Up velocity up to three times their thrust

More information

Heuristics, and what to do if you don t know what to do. Carl Hultquist

Heuristics, and what to do if you don t know what to do. Carl Hultquist Heuristics, and what to do if you don t know what to do Carl Hultquist What is a heuristic? Relating to or using a problem-solving technique in which the most appropriate solution of several found by alternative

More information

Aggression. Mary Jane O Neill, Stephanie Fan. August 6, 2013

Aggression. Mary Jane O Neill, Stephanie Fan. August 6, 2013 Aggression Mary Jane O Neill, Stephanie Fan August 6, 2013 Abstract Aggression is an unsolved game in which no previous research has been conducted. We have analyzed the game to find the optimal strategy.

More information

Artificial Intelligence Adversarial Search

Artificial 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 information

Analyzing Games: Solutions

Analyzing Games: Solutions Writing Proofs Misha Lavrov Analyzing Games: olutions Western PA ARML Practice March 13, 2016 Here are some key ideas that show up in these problems. You may gain some understanding of them by reading

More information

A Quoridor-playing Agent

A Quoridor-playing Agent A Quoridor-playing Agent P.J.C. Mertens June 21, 2006 Abstract This paper deals with the construction of a Quoridor-playing software agent. Because Quoridor is a rather new game, research about the game

More information

Announcements. CS 188: Artificial Intelligence Fall Today. Tree-Structured CSPs. Nearly Tree-Structured CSPs. Tree Decompositions*

Announcements. CS 188: Artificial Intelligence Fall Today. Tree-Structured CSPs. Nearly Tree-Structured CSPs. Tree Decompositions* CS 188: Artificial Intelligence Fall 2010 Lecture 6: Adversarial Search 9/1/2010 Announcements Project 1: Due date pushed to 9/15 because of newsgroup / server outages Written 1: up soon, delayed a bit

More information

Buck Rogers Battle For The 25 th Century 1. 4 Turn Phases Complete each phase in order Definitions

Buck Rogers Battle For The 25 th Century 1. 4 Turn Phases Complete each phase in order Definitions Buck Rogers Battle For The 25 th Century 1 OBJECT 1) Control 15 Territorial Zones at the end of any turn 2) Control the last Leader on the board at any time 3) Convince everyone else to surrender 4) Control

More information

Overview. Algorithms: Simon Weber CSC173 Scheme Week 3-4 N-Queens Problem in Scheme

Overview. Algorithms: Simon Weber CSC173 Scheme Week 3-4 N-Queens Problem in Scheme Simon Weber CSC173 Scheme Week 3-4 N-Queens Problem in Scheme Overview The purpose of this assignment was to implement and analyze various algorithms for solving the N-Queens problem. The N-Queens problem

More information

Lecture 19 November 6, 2014

Lecture 19 November 6, 2014 6.890: Algorithmic Lower Bounds: Fun With Hardness Proofs Fall 2014 Prof. Erik Demaine Lecture 19 November 6, 2014 Scribes: Jeffrey Shen, Kevin Wu 1 Overview Today, we ll cover a few more 2 player games

More information

Dragon Canyon. Solo / 2-player Variant with AI Revision

Dragon Canyon. Solo / 2-player Variant with AI Revision Dragon Canyon Solo / 2-player Variant with AI Revision 1.10.4 Setup For solo: Set up as if for a 2-player game. For 2-players: Set up as if for a 3-player game. For the AI: Give the AI a deck of Force

More information

MATHEMATICAL RELATIONAL SKILLS AND COUNTING

MATHEMATICAL RELATIONAL SKILLS AND COUNTING MATHEMATICAL RELATIONAL SKILLS AND COUNTING 0 1000 Mathematical relational skills and counting 0-1000 ThinkMath 2017 MATHEMATICAL RELATIONAL SKILLS AND COUNTING 0 1000 The Mathematical relational skills

More information

Free Cell Solver. Copyright 2001 Kevin Atkinson Shari Holstege December 11, 2001

Free Cell Solver. Copyright 2001 Kevin Atkinson Shari Holstege December 11, 2001 Free Cell Solver Copyright 2001 Kevin Atkinson Shari Holstege December 11, 2001 Abstract We created an agent that plays the Free Cell version of Solitaire by searching through the space of possible sequences

More information

Mind Ninja The Game of Boundless Forms

Mind Ninja The Game of Boundless Forms Mind Ninja The Game of Boundless Forms Nick Bentley 2007-2008. email: nickobento@gmail.com Overview Mind Ninja is a deep board game for two players. It is 2007 winner of the prestigious international board

More information

Programming Problems 14 th Annual Computer Science Programming Contest

Programming Problems 14 th Annual Computer Science Programming Contest Programming Problems 14 th Annual Computer Science Programming Contest Department of Mathematics and Computer Science Western Carolina University April 8, 2003 Criteria for Determining Team Scores Each

More information

GEO/EVS 425/525 Unit 2 Composing a Map in Final Form

GEO/EVS 425/525 Unit 2 Composing a Map in Final Form GEO/EVS 425/525 Unit 2 Composing a Map in Final Form The Map Composer is the main mechanism by which the final drafts of images are sent to the printer. Its use requires that images be readable within

More information

CS 188: Artificial Intelligence Spring Announcements

CS 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 information

Play with good sportsmanship and have fun!

Play with good sportsmanship and have fun! Rules of the High Seas Here are some game concepts important to the Pirates Constructible Strategy Game (CSG) rules: Six-sided dice are abbreviated d6. Ability text (found on the fronts of cards) overrules

More information

a 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

a 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 information

FULL RULEBOOK GAME FLOW TABLE OF CONTENTS. Playing Scenarios... 17

FULL RULEBOOK GAME FLOW TABLE OF CONTENTS. Playing Scenarios... 17 T FULL RULEBOOK his book includes the complete rules for the game, followed by the Scenario section on page 17. This rulebook is not intended as a method for learning the game, and especially not as a

More information

Population Initialization Techniques for RHEA in GVGP

Population Initialization Techniques for RHEA in GVGP Population Initialization Techniques for RHEA in GVGP Raluca D. Gaina, Simon M. Lucas, Diego Perez-Liebana Introduction Rolling Horizon Evolutionary Algorithms (RHEA) show promise in General Video Game

More information

Go Combinatorics: The Recent Work of Dr. John Tromp and His Colleagues on the Number of Possible Go Positions, Games and their Length

Go Combinatorics: The Recent Work of Dr. John Tromp and His Colleagues on the Number of Possible Go Positions, Games and their Length Go Combinatorics: The Recent Work of Dr. John Tromp and His Colleagues on the Number of Possible Go Positions, Games and their Length By Peter Shotwell July 2010 This is a lightly edited version of one

More information

Comp th February Due: 11:59pm, 25th February 2014

Comp th February Due: 11:59pm, 25th February 2014 HomeWork Assignment 2 Comp 590.133 4th February 2014 Due: 11:59pm, 25th February 2014 Getting Started What to submit: Written parts of assignment and descriptions of the programming part of the assignment

More information

Five-In-Row with Local Evaluation and Beam Search

Five-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 information