Name | solitaire_decision.gringo |
---|---|
Class Tree | |
Submitter | Martin Gebser |
Author | Martin Gebser and Roland Kaminski |
Description |
Description =========== Solitaire is a single player game played on a 7x7 board with 2x2 corners omitted. Each position is either full (containing a peg / marble) or empty. With 'O' representing full positions and '.' representing an empty position, a possible board configuration is:
Each turn the player must jump a peg over an existing peg and removed the 'jumped' peg. For example, numbering the board from the top left, moving peg (4,2) down would give the following board configuration:
The task is, given an initial board configuration, find a sequence of the given number of moves. Input ----- Thirty two facts giving the initial board configuration, each of which is either: full(X,Y). or empty(X,Y). indicating that position (X,Y) is either full or empty. A number of time facts, giving the number of moves that must be found. These are given as a range of consecutive, ascending integers, starting at 1. Output ------ The input facts plus a number of move facts equal to the number of time facts. Each move fact is of the form: move(T,D,X,Y). indicating that to get to time step T from time step T-1 (the initial conditions are regarded to be time step 0), the peg in position (X,Y) is moved in direction D (up, down, left or right). Calibration ----------- Generally the fewer pegs remaining on the board, the harder it is to make a move. Thus instances starting with a full or a nearly full board and conduct 27-31 moves are the most difficult. Author: Martin Brain |
Created | 2009-03-27 12:58 |
Modified | 2009-05-11 22:04 |
Languages | |
Language Features | |
Compatible Instance Classes | |
Input Predicates |
|
Output Predicates |
|
Encoding Parameter |
|
Standalone | No |
|
|
Attributes | |
Content |