Game Pilgrimage

name | Pilgrimage | |
---|---|---|

creator | stephan | |

number of roles | 2 | |

stylesheet | pilgrimage/pilgrimage.xsl | |

GDL | v1 | |

enabled | ||

matches | show matches | |

statistics | show game statistics | |

description | This game involves two phases of play. In the first phase, players build the terrain of the board together. A player can transition to the next phase by placing all of his pieces on tiles with the maximum height of 5. Before the player moves to the pilgrimage phase, he must select one of his pieces to be the "pilgrim". In order to gain points/win, the player must attempt to move his pilgrim down to a tile of height 0 within 20 moves. Pieces can only move between tiles if they have a height difference of at most one. Tradeoffs in this game include how much time a player spends manipulating the terrain/getting his pieces into a favorable position versus when he starts the pilgrimage phase. It is possible for pieces to become trapped. by: Peter Pham |

## Game Description

```
( role red )
( role blue )
( init ( builder red 2 2 ) )
( init ( builder red 2 4 ) )
( init ( builder red 2 5 ) )
( init ( builder blue 5 5 ) )
( init ( builder blue 5 2 ) )
( init ( builder blue 5 3 ) )
( init ( phase red build_terrain ) )
( init ( phase blue build_terrain ) )
( init ( control red ) )
( phase_list build_terrain )
( phase_list place_pilgrim )
( phase_list pilgrimage )
( index 1 )
( index 2 )
( index 3 )
( index 4 )
( index 5 )
( index 6 )
( board_succ 1 2 )
( board_succ 2 3 )
( board_succ 3 4 )
( board_succ 4 5 )
( board_succ 5 6 )
( height 1 )
( height 2 )
( height 3 )
( height 4 )
( height 5 )
( height_end 5 )
( height_succ 0 1 )
( height_succ 1 2 )
( height_succ 2 3 )
( height_succ 3 4 )
( height_succ 4 5 )
( <= ( base ( cell ?i ?j ?h ) ) ( index ?i ) ( index ?j ) ( height ?h ) )
( <= ( base ( builder ?p ?i ?j ) ) ( role ?p ) ( index ?i ) ( index ?j ) )
( <= ( base ( pilgrim ?p ?i ?j ) ) ( role ?p ) ( index ?i ) ( index ?j ) )
( <= ( base ( control ?p ) ) ( role ?p ) )
( <= ( base ( phase ?p ?e ) ) ( role ?p ) ( phase_list ?e ) )
( <= ( base ( moves ?p ?s ) ) ( role ?p ) ( succ ?s ?o ) )
( <= ( input ?p noop ) ( role ?p ) )
( <= ( input ?p ( move ?i ?j ?m ?n ) ) ( role ?p ) ( index ?i ) ( index ?j ) ( index ?m ) ( index ?n ) )
( <= ( input ?p ( raise ?i ?j ) ) ( role ?p ) ( index ?i ) ( index ?j ) )
( <= ( input ?p ( place_pilgrim ?i ?j ) ) ( role ?p ) ( index ?i ) ( index ?j ) )
( <= ( piece ?p ?i ?j ) ( true ( builder ?p ?i ?j ) ) )
( <= ( piece ?p ?i ?j ) ( true ( pilgrim ?p ?i ?j ) ) )
( <= ( has_height ?i ?j ) ( true ( cell ?i ?j ?h ) ) )
( <= ( effective_height ?i ?j ?h ) ( true ( cell ?i ?j ?h ) ) )
( <= ( effective_height ?i ?j 0 ) ( index ?i ) ( index ?j ) ( not ( has_height ?i ?j ) ) )
( <= ( height_diff_one ?i ?j ?m ?n ) ( effective_height ?i ?j ?h ) ( effective_height ?m ?n ?g ) ( height_succ ?g ?h ) )
( <= ( height_diff_one ?i ?j ?m ?n ) ( effective_height ?i ?j ?h ) ( effective_height ?m ?n ?g ) ( height_succ ?h ?g ) )
( <= ( same_height ?i ?j ?m ?n ) ( effective_height ?i ?j ?h ) ( effective_height ?m ?n ?h ) )
( <= ( adjacent ?i ?j ?m ?j ) ( index ?j ) ( board_succ ?i ?m ) )
( <= ( adjacent ?i ?j ?m ?j ) ( index ?j ) ( board_succ ?m ?i ) )
( <= ( adjacent ?i ?j ?i ?n ) ( index ?i ) ( board_succ ?j ?n ) )
( <= ( adjacent ?i ?j ?i ?n ) ( index ?i ) ( board_succ ?n ?j ) )
( <= ( can_move_pieces ?p ) ( true ( phase ?p build_terrain ) ) ( not ( true ( control ?p ) ) ) )
( <= ( can_move_pieces ?p ) ( true ( phase ?p pilgrimage ) ) ( true ( control ?p ) ) )
( <= ( free_path ?i ?j ?m ?n ) ( adjacent ?i ?j ?m ?n ) ( height_diff_one ?i ?j ?m ?n ) ( not ( filled ?i ?j ) ) )
( <= ( free_path ?i ?j ?m ?n ) ( adjacent ?i ?j ?m ?n ) ( same_height ?i ?j ?m ?n ) ( not ( filled ?i ?j ) ) )
( <= ( legal_move ?p ?i ?j ?m ?n ) ( piece ?p ?m ?n ) ( free_path ?i ?j ?m ?n ) ( can_move_pieces ?p ) )
( <= ( legal_raise ?p ?i ?j ) ( true ( builder ?p ?i ?j ) ) ( true ( control ?p ) ) ( effective_height ?i ?j ?h ) ( true ( phase ?p build_terrain ) ) ( not ( height_end ?h ) ) )
( <= ( legal_pilgrim ?p ?i ?j ) ( true ( control ?p ) ) ( true ( builder ?p ?i ?j ) ) ( true ( phase ?p place_pilgrim ) ) )
( <= ( has_raise ?p ) ( legal_raise ?p ?i ?j ) )
( <= ( has_action ?p ) ( legal_move ?p ?i ?j ?m ?n ) )
( <= ( has_action ?p ) ( legal_raise ?p ?i ?j ) )
( <= ( has_action ?p ) ( legal_pilgrim ?p ?i ?j ) )
( <= ( filled ?i ?j ) ( true ( pilgrim ?p ?i ?j ) ) )
( <= ( filled ?i ?j ) ( true ( builder ?p ?i ?j ) ) )
( <= ( legal ?p noop ) ( role ?p ) ( not ( has_action ?p ) ) )
( <= ( legal ?p ( place_pilgrim ?i ?j ) ) ( legal_pilgrim ?p ?i ?j ) )
( <= ( legal ?p ( move ?i ?j ?m ?n ) ) ( legal_move ?p ?i ?j ?m ?n ) )
( <= ( legal ?p ( raise ?i ?j ) ) ( legal_raise ?p ?i ?j ) )
( <= ( move_conflict ) ( does ?p ( move ?i ?j ?m ?n ) ) ( does ?q ( move ?i ?j ?k ?l ) ) ( distinct ?p ?q ) )
( <= ( actual_move ?p ?i ?j ?m ?n ) ( does ?p ( move ?i ?j ?m ?n ) ) ( true ( phase ?p pilgrimage ) ) )
( <= ( actual_move ?p ?i ?j ?m ?n ) ( does ?p ( move ?i ?j ?m ?n ) ) ( true ( phase ?p build_terrain ) ) ( not ( move_conflict ) ) )
( <= ( removed ?m ?n ) ( actual_move ?p ?i ?j ?m ?n ) )
( <= ( removed ?i ?j ) ( does ?p ( place_pilgrim ?i ?j ) ) )
( <= ( cell_raise ?i ?j ) ( does ?p ( raise ?i ?j ) ) )
; Persistence rules
( <= ( next ( builder ?p ?i ?j ) ) ( true ( builder ?p ?i ?j ) ) ( not ( removed ?i ?j ) ) )
( <= ( next ( pilgrim ?p ?i ?j ) ) ( true ( pilgrim ?p ?i ?j ) ) ( not ( removed ?i ?j ) ) )
( <= ( next ( builder ?p ?i ?j ) ) ( true ( builder ?p ?m ?n ) ) ( actual_move ?p ?i ?j ?m ?n ) )
( <= ( next ( pilgrim ?p ?i ?j ) ) ( true ( pilgrim ?p ?m ?n ) ) ( actual_move ?p ?i ?j ?m ?n ) )
( <= ( next ( pilgrim ?p ?i ?j ) ) ( does ?p ( place_pilgrim ?i ?j ) ) )
( <= ( next ( phase ?p ?e ) ) ( true ( phase ?p ?e ) ) ( not ( phase_transition ?p ) ) )
( <= ( next ( control red ) ) ( true ( control blue ) ) )
( <= ( next ( control blue ) ) ( true ( control red ) ) )
( <= ( next ( cell ?i ?j 1 ) ) ( does ?p ( raise ?i ?j ) ) ( effective_height ?i ?j 0 ) )
( <= ( next ( cell ?i ?j ?h ) ) ( true ( cell ?i ?j ?h ) ) ( not ( cell_raise ?i ?j ) ) )
( <= ( next ( cell ?i ?j ?h ) ) ( does ?p ( raise ?i ?j ) ) ( true ( cell ?i ?j ?g ) ) ( height_succ ?g ?h ) )
( <= ( next ( moves ?p ?s ) ) ( true ( moves ?p ?o ) ) ( succ ?s ?o ) )
( <= ( next ( moves ?p 0 ) ) ( true ( moves ?p 0 ) ) )
; Phase transitions
( <= ( phase_transition ?p ) ( build_terrain_transition ?p ) )
( <= ( build_terrain_transition ?p ) ( true ( control ?p ) ) ( true ( phase ?p build_terrain ) ) ( not ( has_raise ?p ) ) )
( <= ( next ( phase ?p place_pilgrim ) ) ( build_terrain_transition ?p ) )
( <= ( phase_transition ?p ) ( place_pilgrim_transition ?p ) )
( <= ( place_pilgrim_transition ?p ) ( true ( control ?p ) ) ( true ( phase ?p place_pilgrim ) ) )
( <= ( next ( phase ?p pilgrimage ) ) ( place_pilgrim_transition ?p ) )
( <= ( next ( moves ?p 20 ) ) ( place_pilgrim_transition ?p ) )
; Terminal
( <= ( pilgrim_height ?p ?h ) ( true ( pilgrim ?p ?i ?j ) ) ( effective_height ?i ?j ?h ) )
( <= ( complete ?p ) ( pilgrim_height ?p 0 ) ( true ( phase ?p pilgrimage ) ) )
( <= terminal ( complete ?p ) )
( <= terminal ( true ( moves red 0 ) ) ( true ( moves blue 0 ) ) ( true ( phase ?p pilgrimage ) ) )
( <= ( some_complete ) ( complete ?p ) )
( <= ( goal ?p 100 ) ( complete ?p ) )
( <= ( goal ?p 50 ) ( role ?p ) ( complete red ) ( complete blue ) )
( <= ( goal ?p 0 ) ( role ?p ) ( some_complete ) ( not ( complete ?p ) ) )
( <= ( goal ?p ?s ) ( pilgrim_height ?p ?h ) ( height_score ?h ?s ) ( not ( some_complete ) ) )
( height_score 0 100 )
( height_score 1 40 )
( height_score 2 30 )
( height_score 3 20 )
( height_score 4 10 )
( height_score 5 0 )
( succ 0 1 )
( succ 1 2 )
( succ 2 3 )
( succ 3 4 )
( succ 4 5 )
( succ 5 6 )
( succ 6 7 )
( succ 7 8 )
( succ 8 9 )
( succ 9 10 )
( succ 10 11 )
( succ 11 12 )
( succ 12 13 )
( succ 13 14 )
( succ 14 15 )
( succ 15 16 )
( succ 16 17 )
( succ 17 18 )
( succ 18 19 )
( succ 19 20 )
( succ 20 21 )
```

## sees_XML(...) rules

```
(<= (sees_xml random ?t) (true ?t))
(<= (sees_xml ?p ?t) (role ?p) (distinct ?p random) (true ?t))
```