Ricochet Robots Mitch Powell Daniel Tilgner. Abstract Ricochet robots is a board game created in Germany in 1999. A player is given 30 seconds to find.

Slides:



Advertisements
Similar presentations
AI Pathfinding Representing the Search Space
Advertisements

Traveling Salesperson Problem
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Analysis of Algorithms Depth First Search. Graph A representation of set of objects Pairs of objects are connected Interconnected objects are called “vertices.
CSCE 580 ANDREW SMITH JOHNNY FLOWERS IDA* and Memory-Bounded Search Algorithms.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Part2 AI as Representation and Search
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Search Techniques MSc AI module. Search In order to build a system to solve a problem we need to: Define and analyse the problem Acquire the knowledge.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
Chapter 4 Search Methodologies.
CSE 380 – Computer Game Programming Pathfinding AI
1 Graphs: Traversal Searching/Traversing a graph = visiting the vertices of a graph by following the edges in a systematic way Example: Given a highway.
Graph Search Methods Spring 2007 CSE, POSTECH. Graph Search Methods A vertex u is reachable from vertex v iff there is a path from v to u. A search method.
CS 206 Introduction to Computer Science II 11 / 07 / 2008 Instructor: Michael Eckmann.
CSC 423 ARTIFICIAL INTELLIGENCE
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
September 26, 2012Introduction to Artificial Intelligence Lecture 7: Search in State Spaces I 1 After our “Haskell in a Nutshell” excursion, let us move.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Search in AI.
Search Strategies.  Tries – for word searchers, spell checking, spelling corrections  Digital Search Trees – for searching for frequent keys (in text,
CS 61B Data Structures and Programming Methodology July 31, 2008 David Sun.
Mahgul Gulzai Moomal Umer Rabail Hafeez
LaValle Chapter 2 (Sections ) [2.1] Discrete feasible planning formulation [2.2] Basic search techniques – To find discrete feasible plans – But.
Branch and Bound Searching Strategies
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
1 Branch and Bound Searching Strategies 2 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so.
Backtracking.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Informed Search Idea: be smart about what paths to try.
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
Search.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
Representing and Using Graphs
How are things going? Core AI Problem Mobile robot path planning: identifying a trajectory that, when executed, will enable the robot to reach the goal.
BackTracking CS335. N-Queens The object is to place queens on a chess board in such as way as no queen can capture another one in a single move –Recall.
P ROBLEM Write an algorithm that calculates the most efficient route between two points as quickly as possible.
Exact methods for ALB ALB problem can be considered as a shortest path problem The complete graph need not be developed since one can stop as soon as in.
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Lecture 3: Uninformed Search
1 Solving problems by searching 171, Class 2 Chapter 3.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
Advanced Algorithm Design and Analysis (Lecture 14) SW5 fall 2004 Simonas Šaltenis E1-215b
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
COSC 2007 Data Structures II
CS 312: Algorithm Analysis Lecture #33: Branch and Bound, Job Assignment This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
Ch22.Branch and Bound.
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
February 11, 2016Introduction to Artificial Intelligence Lecture 6: Search in State Spaces II 1 State-Space Graphs There are various methods for searching.
Branch and Bound Searching Strategies
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
Parallel Programming in Chess Simulations Part 2 Tyler Patton.
Optimization Problems The previous examples simply find a single solution What if we have a cost associated with each solution and we want to find the.
Artificial Intelligence Solving problems by searching.
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Kevin Mason Michael Suggs
Haskell Tips You can turn any function that takes two inputs into an infix operator: mod 7 3 is the same as 7 `mod` 3 takeWhile returns all initial.
Backtracking and Branch-and-Bound
The N-Queens Problem Search The N-Queens Problem Most slides from Milos Hauskrecht.
Presentation transcript:

Ricochet Robots Mitch Powell Daniel Tilgner

Abstract Ricochet robots is a board game created in Germany in A player is given 30 seconds to find a best solution to the presented board. Our goal is to develop an algorithm that finds a minimal solution as quickly as possible.

So what exactly is ricochet robots? A board game in which the object is to move a specific robot to an end location in as few steps as possible using the following restrictions: ▫A robot can only move in the four cardinal directions, not diagonally. ▫When moved, the robot will continue moving until it reaches a wall or another robot at which time it will stop. This constitutes one step.

The Problem Given an directed graph G=(V, E) let V be the set of all vertices contained in the graph, each representing a square on the board and E be the set of all edges connecting V where each vertex w contained in V can be defined as w = (Occ., Targ.) where Occ. is a temporal variable describing the occupation of the square and can be either a 1 describing an occupied square or a 0 describing an unoccupied square and Targ. can be either a 0 representing that the square is not the target of the objective robot or a 1 representing that the square is the target of the objective robot. Given a target robot on a square v in V such that v = (1,0) and a target square t in V such that t = (0,1) let a function P(i,j) describes a number of edge traversals on a path between two squares i and j in V. Find a P’(v, t) such that P’(v, t) ≤ P (v, w) for all P. A stipulation on the problem is that there may exist more than one occupied square w in V such that w = (1,0). The robots occupying each square w where w ≠ v may traverse their own paths under the condition that the traversal of such a robot from its original square w to another square t means that w = (0,0) and t = (1,0). This change makes t unreachable.

Wait what.

Informally, please. For a given board configuration, find the path for the specified robot to reach the target space in as few steps as possible. As each robot can be moved at any time, available paths are updated after each movement. The movement of any robot counts as one step.

Contributions Michael Fogleman ▫Wrote a solver using iterative deepening. ▫We used this solver as a benchmark for checking solutions. Randy Coulman ▫Using pre-computing to create estimates for an A* algorithm.

Statement and implementation Breadth-First Search ▫Generate a state tree where any state of the board was given by moving a robot in any available direction. ▫Breadth-first traversal of state tree until a solution is found. ▫As soon as a solution is found it is guaranteed to be a minimal path (at which point the algorithm stops).

BFS cont. Optimization: ▫No-memoization ▫Visited states with linear search ▫Visited states with binary search ▫Visited states with hash set Board states were condensed to 8-byte strings where non-object robots were indistinct from one another.

Branch and Bound Generating a state tree of all possible candidate solutions. Initial “best” path found by attempting to move objective robot towards the goal without moving the other robots. While the step count for each branch is less than the current best solution, the branch is traversed depth- first. If the goal is reached, that new path becomes the best solution and the next branch is explored until all branches have been checked. Guaranteed to find the shortest path by exhaustion.

A* and Iterative Deepening Many alternative solutions exist. Michael Fogleman used iterative deepening to create a fast solver while Randy Coulman used an A* algorithm. Iterative deepening is a depth-first search in which the depth is increased with each iteration. It is essentially equivalent to a breadth-first search, but on each iteration it instead visits the nodes in the same order as a depth first search. A* traverses a graph and builds a tree of partial paths as it does so. The leaves are stored in a priority queue where the cost is the distance traveled plus an estimate of the distance to the goal.

Evidence Maximum number of steps through all trials: 16 (i.e. we encountered no board configuration that took more than 16 steps to solve) Average number of steps through all trials: 6.3 BFS with Hash table average time to solve: 829 milliseconds BFS with Binary search average time to solve: 2160 milliseconds

Holes Lack of evidence that prioritization of the objective bot results in a minimal number of visited states. Not distinguishing between objective robots has the same issue. While no unsolvable boards have been found, this doesn’t preclude the possibility that some could exist. There could be methods/tools for increasing the speed of the process.

Interpretation Breadth-first search with a hash algorithm is the best solution we found for average case or longer solutions. As the number of visited states gets higher, it gets more and more important to efficiently search the list of visited states. Without dynamic programming, the BFS becomes significantly less useful. So far, no solution longer than 7 steps has been able to be returned without dynamic programming.

Interpretation cont. Branch and bound runs very quickly if lower bounded solution is found very early into the search. Otherwise it is forced to run an exhaustive search with a large upper bound, increasing time needed dramatically. Could be useful in application purposes to test a solution by giving it a small bound.

Conclusions Breadth-first search seems to be the best solution to the problem. It guarantees a best solution and for boards where the best solution is small, it is incredibly fast. Other algorithms which rely on estimates and predictions such as A* or branch and bound depend heavily on initial conditions.

Future Work Generating pre-computed boards Maintain a list of known board setups with large step solutions Other algorithms to try (A*, B*, alpha-beta pruning, etc.) Buying a physical copy and clowning my friends

Questions What algorithm design technique made breadth- first search viable? What is the worst-case starting branching factor? What algorithm would you use to input and test your own solution?

Answers What algorithm design technique made breadth- first search viable? ▫Dynamic Programming What is the worst-case starting branching factor? ▫16 (4 robots with 4 directions each) What algorithm would you use to input and test your own solution? ▫Branch and Bound