You are not logged in. login register
Game mimikry
name mimikry
creator stephan
number of roles 1
stylesheet mimikry/mimikry.xsl
GDL v1
enabled
matches show matches
statistics show game statistics
description GDL version of the single-player board game "Mimikry" by Heinz Meister.
On the 6x6-board, 34 sea shells are placed (at most one on each cell). The shells can be moved a certain number of cells (horizontally, vertically, or diagonally) onto an empty seafloor cell, depending on the row they reside in. A moved shell is turned to become invisible and can no longer move. The goal is to make all shells invisible. The number of cells to move for rows from top to bottom: 1, 4, 2, 1, 3, 2.
GDL by Peter Kissmann (TZI, University of Bremen)

Game Description

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Mimikry
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(role player)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(init (cell 0 1 two))
(init (cell 0 2 three))
(init (cell 0 3 one))
(init (cell 0 4 two))
(init (cell 0 5 four))
(init (cell 0 6 one))

(init (cell 1 1 seafloor))
(init (cell 1 2 shell))
(init (cell 1 3 shell))
(init (cell 1 4 shell))
(init (cell 1 5 shell))
(init (cell 1 6 shell))
(init (cell 2 1 shell))
(init (cell 2 2 shell))
(init (cell 2 3 shell))
(init (cell 2 4 shell))
(init (cell 2 5 shell))
(init (cell 2 6 shell))
(init (cell 3 1 shell))
(init (cell 3 2 shell))
(init (cell 3 3 shell))
(init (cell 3 4 shell))
(init (cell 3 5 shell))
(init (cell 3 6 shell))
(init (cell 4 1 shell))
(init (cell 4 2 shell))
(init (cell 4 3 shell))
(init (cell 4 4 shell))
(init (cell 4 5 shell))
(init (cell 4 6 shell))
(init (cell 5 1 shell))
(init (cell 5 2 shell))
(init (cell 5 3 shell))
(init (cell 5 4 shell))
(init (cell 5 5 shell))
(init (cell 5 6 shell))
(init (cell 6 1 shell))
(init (cell 6 2 shell))
(init (cell 6 3 shell))
(init (cell 6 4 shell))
(init (cell 6 5 shell))
(init (cell 6 6 seafloor))

(init (shellcount 34))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(<= (next (cell ?cs ?rs seafloor))
    (does player (move ?cs ?rs ?ce ?re))
)

(<= (next (cell ?ce ?re invisible))
    (does player (move ?cs ?rs ?ce ?re))
)

(<= (next (shellcount ?y))
    (true (shellcount ?x))
    (succ ?y ?x)
)

; The rest is for the frame

(<= (next (cell ?c ?r ?t))
    (true (cell ?c ?r ?t))
    (index ?c)
    (index ?r)
    (does player (move ?cs ?rs ?ce ?re))
    (distinct ?cs ?c)
    (distinct ?ce ?c)
)
(<= (next (cell ?c ?r ?t))
    (true (cell ?c ?r ?t))
    (index ?c)
    (index ?r)
    (does player (move ?cs ?rs ?ce ?re))
    (distinct ?rs ?r)
    (distinct ?re ?r)
)
(<= (next (cell ?c ?r ?t))
    (true (cell ?c ?r ?t))
    (index ?c)
    (index ?r)
    (does player (move ?cs ?rs ?ce ?re))
    (distinct ?cs ?c)
    (distinct ?re ?r)
)
(<= (next (cell ?c ?r ?t))
    (true (cell ?c ?r ?t))
    (index ?c)
    (index ?r)
    (does player (move ?cs ?rs ?ce ?re))
    (distinct ?rs ?r)
    (distinct ?ce ?c)
)

(<= (next (cell 0 ?r ?t))
    (true (cell 0 ?r ?t))
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(<= (legal player (move ?cs ?rs ?ce ?re))
    (true (cell ?ce ?re seafloor))
    (possiblemove ?cs ?rs ?ce ?re)
    (true (cell ?cs ?rs shell))
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(<= (goal player 100)
    (true (shellcount 0))
)

(<= (goal player 90)
    (true (shellcount 1))
)

(<= (goal player 80)
    (true (shellcount 2))
)

(<= (goal player 70)
    (true (shellcount 3))
)

(<= (goal player 60)
    (true (shellcount 4))
)

(<= (goal player 50)
    (true (shellcount 5))
)

(<= (goal player 40)
    (true (shellcount 6))
)

(<= (goal player 30)
    (true (shellcount 7))
)

(<= (goal player 20)
    (true (shellcount 8))
)

(<= (goal player 10)
    (true (shellcount 9))
)

;(<= (goal player 69)
;    (true (shellcount 10))
;)
;
;(<= (goal player 66)
;    (true (shellcount 11))
;)
;
;(<= (goal player 63)
;    (true (shellcount 12))
;)
;
;(<= (goal player 60)
;    (true (shellcount 13))
;)
;
;(<= (goal player 57)
;    (true (shellcount 14))
;)
;
;(<= (goal player 54)
;    (true (shellcount 15))
;)
;
;(<= (goal player 51)
;    (true (shellcount 16))
;)
;
;(<= (goal player 48)
;    (true (shellcount 17))
;)
;
;(<= (goal player 45)
;    (true (shellcount 18))
;)
;
;(<= (goal player 42)
;    (true (shellcount 19))
;)
;
;(<= (goal player 39)
;    (true (shellcount 20))
;)
;
;(<= (goal player 36)
;    (true (shellcount 21))
;)
;
;(<= (goal player 33)
;    (true (shellcount 22))
;)
;
;(<= (goal player 30)
;    (true (shellcount 23))
;)
;
;(<= (goal player 27)
;    (true (shellcount 24))
;)
;
;(<= (goal player 24)
;    (true (shellcount 25))
;)
;
;(<= (goal player 21)
;    (true (shellcount 26))
;)
;
;(<= (goal player 18)
;    (true (shellcount 27))
;)
;
;(<= (goal player 15)
;    (true (shellcount 28))
;)
;
;(<= (goal player 12)
;    (true (shellcount 29))
;)
;
;(<= (goal player 9)
;    (true (shellcount 30))
;)
;
;(<= (goal player 6)
;    (true (shellcount 31))
;)
;
;(<= (goal player 3)
;    (true (shellcount 32))
;)

(<= (goal player 0)
    (true (shellcount 10))
)

(<= (goal player 0)
    (true (shellcount 11))
)

(<= (goal player 0)
    (true (shellcount 12))
)

(<= (goal player 0)
    (true (shellcount 13))
)

(<= (goal player 0)
    (true (shellcount 14))
)

(<= (goal player 0)
    (true (shellcount 15))
)

(<= (goal player 0)
    (true (shellcount 16))
)

(<= (goal player 0)
    (true (shellcount 17))
)

(<= (goal player 0)
    (true (shellcount 18))
)

(<= (goal player 0)
    (true (shellcount 19))
)

(<= (goal player 0)
    (true (shellcount 20))
)

(<= (goal player 0)
    (true (shellcount 21))
)

(<= (goal player 0)
    (true (shellcount 22))
)

(<= (goal player 0)
    (true (shellcount 23))
)

(<= (goal player 0)
    (true (shellcount 24))
)

(<= (goal player 0)
    (true (shellcount 25))
)

(<= (goal player 0)
    (true (shellcount 26))
)

(<= (goal player 0)
    (true (shellcount 27))
)

(<= (goal player 0)
    (true (shellcount 28))
)

(<= (goal player 0)
    (true (shellcount 29))
)

(<= (goal player 0)
    (true (shellcount 30))
)

(<= (goal player 0)
    (true (shellcount 31))
)

(<= (goal player 0)
    (true (shellcount 32))
)

(<= (goal player 0)
    (true (shellcount 33))
)

(<= (goal player 0)
    (true (shellcount 34))
)

(<= (goal player 0)
    (true (shellcount 35))
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(<= terminal
    (true (shellcount 0))
)

(<= terminal
    (not canmove)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(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)
(succ 21 22)
(succ 22 23)
(succ 23 24)
(succ 24 25)
(succ 25 26)
(succ 26 27)
(succ 27 28)
(succ 28 29)
(succ 29 30)
(succ 30 31)
(succ 31 32)
(succ 32 33)
(succ 33 34)
(succ 34 35)

(index 1)
(index 2)
(index 3)
(index 4)
(index 5)
(index 6)

(<= canmove
    (true (cell ?ce ?re seafloor))
    (possiblemove ?cs ?rs ?ce ?re)
    (true (cell ?cs ?rs shell))
)

(<= (possiblemove ?cs ?rs ?ce ?re)
    (movenorth ?cs ?rs ?ce ?re)
)
(<= (possiblemove ?cs ?rs ?ce ?re)
    (movenortheast ?cs ?rs ?ce ?re)
)
(<= (possiblemove ?cs ?rs ?ce ?re)
    (moveeast ?cs ?rs ?ce ?re)
)
(<= (possiblemove ?cs ?rs ?ce ?re)
    (movesoutheast ?cs ?rs ?ce ?re)
)
(<= (possiblemove ?cs ?rs ?ce ?re)
    (movesouth ?cs ?rs ?ce ?re)
)
(<= (possiblemove ?cs ?rs ?ce ?re)
    (movesouthwest ?cs ?rs ?ce ?re)
)
(<= (possiblemove ?cs ?rs ?ce ?re)
    (movewest ?cs ?rs ?ce ?re)
)
(<= (possiblemove ?cs ?rs ?ce ?re)
    (movenorthwest ?cs ?rs ?ce ?re)
)

(<= (movenorth ?c 1 ?c 3)
    (index ?c)
)
(<= (movenorth ?c 2 ?c 5)
    (index ?c)
)
(<= (movenorth ?c 3 ?c 4)
    (index ?c)

)
(<= (movenorth ?c 4 ?c 6)
    (index ?c)
)

(<= (movenortheast ?cs 1 ?ce 3)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?ce)
    (index ?ce)
)
(<= (movenortheast ?cs 2 ?ce 5)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?c2)
    (succ ?c2 ?ce)
    (index ?ce)
)
(<= (movenortheast ?cs 3 ?ce 4)
    (index ?cs)
    (succ ?cs ?ce)
    (index ?ce)
)
(<= (movenortheast ?cs 4 ?ce 6)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?ce)
    (index ?ce)
)

(<= (moveeast ?cs 1 ?ce 1)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?ce)
    (index ?ce)
)
(<= (moveeast ?cs 2 ?ce 2)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?c2)
    (succ ?c2 ?ce)
    (index ?ce)
)
(<= (moveeast ?cs 3 ?ce 3)
    (index ?cs)
    (succ ?cs ?ce)
    (index ?ce)
)
(<= (moveeast ?cs 4 ?ce 4)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?ce)
    (index ?ce)
)
(<= (moveeast ?cs 5 ?ce 5)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?c2)
    (succ ?c2 ?c3)
    (succ ?c3 ?ce)
    (index ?ce)
)
(<= (moveeast ?cs 6 ?ce 6)
    (index ?cs)
    (succ ?cs ?ce)
    (index ?ce)
)

(<= (movesoutheast ?cs 3 ?ce 2)
    (index ?cs)
    (succ ?cs ?ce)
    (index ?ce)
)
(<= (movesoutheast ?cs 4 ?ce 2)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?ce)
    (index ?ce)
)
(<= (movesoutheast ?cs 5 ?ce 1)
    (index ?cs)
    (succ ?cs ?c1)
    (succ ?c1 ?c2)
    (succ ?c2 ?c3)
    (succ ?c3 ?ce)
    (index ?ce)
)
(<= (movesoutheast ?cs 6 ?ce 5)
    (index ?cs)
    (succ ?cs ?ce)
    (index ?ce)
)

(<= (movesouth ?c 3 ?c 2)
    (index ?c)
)
(<= (movesouth ?c 4 ?c 2)
    (index ?c)
)
(<= (movesouth ?c 5 ?c 1)
    (index ?c)
)
(<= (movesouth ?c 6 ?c 5)
    (index ?c)
)

(<= (movesouthwest ?cs ?rs ?ce ?re)
    (movesoutheast ?ce ?rs ?cs ?re)
)

(<= (movewest ?cs ?r ?ce ?r)
    (moveeast ?ce ?r ?cs ?r)
)

(<= (movenorthwest ?cs ?rs ?ce ?re)
    (movenortheast ?ce ?rs ?cs ?re)
)

sees_XML(...) rules

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