You are not logged in. login register
Game crisscross
name crisscross
creator admin
number of roles 2
stylesheet chess_like/chess_like_automatic_no_holes.xsl
GDL v1
enabled
matches show matches
statistics show game statistics
description

Game Description

    (role red)
    (role teal)
    (init (cell a3 red))
    (init (cell a4 red))
    (init (cell b3 red))
    (init (cell b4 red))
    (init (cell c1 teal))
    (init (cell c2 teal))
    (init (cell c3 blank))
    (init (cell c4 blank))
    (init (cell c5 blank))
    (init (cell c6 blank))
    (init (cell d1 teal))
    (init (cell d2 teal))
    (init (cell d3 blank))
    (init (cell d4 blank))
    (init (cell d5 blank))
    (init (cell d6 blank))
    (init (cell e3 blank))
    (init (cell e4 blank))
    (init (cell f3 blank))
    (init (cell f4 blank))
    (init (control red))
    (init (first nobody))
    (init (step 1))
    (<= (next (cell ?e ?player))
        (does ?player (move ?b ?e)))
    (<= (next (cell ?b blank))
        (does ?player (move ?b ?e)))
    (<= (next (cell ?x ?z))
        (true (cell ?x ?z))
        (does ?player (move ?b ?e))
        (distinct ?x ?b)
        (distinct ?x ?e))
    (<= (next (cell ?x ?z))
        (true (cell ?x ?z))
        (does red noop)
        (does teal noop))
    (<= (next (control teal))
        (true (control red)))
    (<= (next (control red))
        (true (control teal)))
    (<= (next (first red))
        (stones red all)
        (not (stones teal all)))
    (<= (next (first teal))
        (stones teal all)
        (not (stones red all)))
    (<= (next (first ?player))
        (role ?player)
        (true (first ?player)))
    (<= (next (step ?y))
        (true (step ?x))
        (succ ?x ?y))
    (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)
    (succ 35 36)
    (succ 36 37)
    (succ 37 38)
    (succ 38 39)
    (succ 39 40)

    (location a3)
    (location a4)
    (location b3)
    (location b4)
    (location c1)
    (location c2)
    (location c3)
    (location c4)
    (location c5)
    (location c6)
    (location d1)
    (location d2)
    (location d3)
    (location d4)
    (location d5)
    (location d6)
    (location e3)
    (location e4)
    (location f3)
    (location f4)

    (<= (legal ?player (move ?b ?e))
        (true (control ?player))
        (movable ?player ?b ?e))
    (<= (legal ?player noop)
        (true (control ?player2))
        (distinct ?player ?player2)
        (role ?player))
    (<= (legal ?player noop)
        (true (control ?player))
        (true (cell ?b1 ?player))
        (stuck ?b1 ?player)
        (true (cell ?b2 ?player))
        (distinct ?b1 ?b2)
        (stuck ?b2 ?player)
        (true (cell ?b3 ?player))
        (distinct ?b2 ?b3)
        (distinct ?b3 ?b1)
        (stuck ?b3 ?player)
        (true (cell ?b4 ?player))
        (distinct ?b1 ?b4)
        (distinct ?b2 ?b4)
        (distinct ?b3 ?b4)
        (stuck ?b4 ?player))
    (<= (stuck ?b ?player)
        (not (movableplayer ?player ?b))
        (role ?player)
        (location ?b))
    (<= (movableplayer ?player ?b)
        (movable ?player ?b ?e))

    (<= (movable ?player ?b ?e)
        (true (cell ?b ?player))
        (car ?player ?b ?c)
        (true (cell ?c ?p1))
        (distinct ?p1 blank)
        (car ?player ?c ?x)
        (true (cell ?x blank))
        (car ?player ?x ?d)
        (true (cell ?d ?p2))
        (distinct ?p2 blank)
        (car ?player ?d ?e)
        (true (cell ?e blank)))
    (<= (movable ?player ?b ?e)
        (true (cell ?b ?player))
        (car ?player ?b ?c)
        (true (cell ?c ?p))
        (distinct ?p blank)
        (car ?player ?c ?e)
        (true (cell ?e blank)))
    (<= (movable ?player ?b ?e)
        (true (cell ?b ?player))
        (car ?player ?b ?e)
        (true (cell ?e blank)))
    (<= (car red ?b ?e)
        (carred ?b ?e))
    (<= (car teal ?b ?e)
        (carteal ?b ?e))
    (carred a3 b3)
    (carred a4 b4)
    (carred b3 c3)
    (carred b4 c4)
    (carred c1 d1)
    (carred c2 d2)
    (carred c3 d3)
    (carred c4 d4)
    (carred c5 d5)
    (carred c6 d6)
    (carred d3 e3)
    (carred d4 e4)
    (carred e3 f3)
    (carred e4 f4)
    (carteal a3 a4)
    (carteal b3 b4)
    (carteal c1 c2)
    (carteal c2 c3)
    (carteal c3 c4)
    (carteal c4 c5)
    (carteal c5 c6)
    (carteal d1 d2)
    (carteal d2 d3)
    (carteal d3 d4)
    (carteal d4 d5)
    (carteal d5 d6)
    (carteal e3 e4)
    (carteal f3 f4)
    (<= (goal ?player 100)
        (true (first ?player)))
    (<= (goal ?player 25)
        (stones ?player all)
        (true (first ?player2))
        (distinct ?player ?player2))
    (<= (goal ?player 15)
        (stones ?player 75)
        (true (first ?player2))
        (distinct ?player ?player2))
    (<= (goal ?player 10)
        (stones ?player 50)
        (true (first ?player2))
        (distinct ?player ?player2))
    (<= (goal ?player 5)
        (stones ?player 25)
        (true (first ?player2))
        (distinct ?player ?player2))
    (<= (goal ?player 0)
        (stones ?player 0)
        (true (first ?player2))
        (distinct ?player ?player2))
    (<= (goal ?player 100)
        (true (step 40))
        (stones ?player all)
        (not finished))
    (<= (goal ?player 75)
        (true (step 40))
        (stones ?player 75)
        (not finished))
    (<= (goal ?player 50)
        (true (step 40))
        (stones ?player 50)
        (not finished))
    (<= (goal ?player 25)
        (true (step 40))
        (stones ?player 25)
        (not finished))
    (<= (goal ?player 0)
        (true (step 40))
        (stones ?player 0)
        (not finished))
    (<= finished
        (true (first ?player)))
    (<= (stones red ?payoff)
        (count e3 e4 f3 f4 red ?payoff))
    (<= (stones teal ?payoff)
        (count c5 d5 c6 d6 teal ?payoff))
    (<= (count ?x ?y ?z ?w ?player all)
        (true (cell ?x ?player))
        (true (cell ?y ?player))
        (true (cell ?z ?player))
        (true (cell ?w ?player)))
    (<= (count ?x ?y ?z ?w ?player 75)
        (true (cell ?x ?player))
        (devoid ?y ?player)
        (true (cell ?z ?player))
        (true (cell ?w ?player)))
    (<= (count ?x ?y ?z ?w ?player 75)
        (devoid ?x ?player)
        (true (cell ?y ?player))
        (true (cell ?z ?player))
        (true (cell ?w ?player)))
    (<= (count ?x ?y ?z ?w ?player 50)
        (true (cell ?x ?player))
        (true (cell ?y ?player))
        (true (cell ?z ?player))
        (devoid ?w ?player))
    (<= (count ?x ?y ?z ?w ?player 50)
        (true (cell ?x ?player))
        (true (cell ?y ?player))
        (true (cell ?w ?player))
        (devoid ?z ?player))
    (<= (count ?x ?y ?z ?w ?player 25)
        (devoid ?x ?player)
        (devoid ?y ?player)
        (true (cell ?z ?player))
        (true (cell ?w ?player)))
    (<= (count ?x ?y ?z ?w ?player 0)
        (devoid ?x ?player)
        (devoid ?z ?player)
        (location ?y)
        (location ?w))
    (<= (count ?x ?y ?z ?w ?player 0)
        (devoid ?y ?player)
        (devoid ?z ?player)
        (location ?x)
        (location ?w))
    (<= (count ?x ?y ?z ?w ?player 0)
        (devoid ?x ?player)
        (devoid ?w ?player)
        (location ?y)
        (location ?z))
    (<= (count ?x ?y ?z ?w ?player 0)
        (devoid ?y ?player)
        (devoid ?w ?player)
        (location ?x)
        (location ?z))
    (<= (count ?x ?y ?z ?w ?player 0)
        (devoid ?z ?player)
        (devoid ?w ?player)
        (location ?x)
        (location ?y))
    (<= (devoid ?x ?player)
        (true (cell ?x ?person))
        (role ?person)
        (distinct ?person ?player)
        (role ?player))
    (<= (devoid ?x ?player)
        (true (cell ?x blank))
        (role ?player))
    (<= terminal
        (true (step 40)))
    (<= terminal
        (true (first ?player))
        (stones ?player2 all)
        (distinct ?player ?player2))

sees_XML(...) rules

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

; transform the cells such that the normal chess stylesheet understands them
(<= (sees_xml1 (cell ?x ?y ?c2))
    (true (cell ?loc ?c))
    (map_cell_content ?c ?c2)
    (cell_to_pair ?loc ?x ?y))

; keep all other fluents
(<= (sees_xml1 ?f)
    (true ?f)
    (not (is_cell_fluent ?f)))
(<= (is_cell_fluent (cell ?x ?c))
    (true (cell ?x ?c)))

; map cell locations to a pair of coordinates
(cell_to_pair a3 a 3)
(cell_to_pair a4 a 4)
(cell_to_pair b3 b 3)
(cell_to_pair b4 b 4)
(cell_to_pair c1 c 1)
(cell_to_pair c2 c 2)
(cell_to_pair c3 c 3)
(cell_to_pair c4 c 4)
(cell_to_pair c5 c 5)
(cell_to_pair c6 c 6)
(cell_to_pair d1 d 1)
(cell_to_pair d2 d 2)
(cell_to_pair d3 d 3)
(cell_to_pair d4 d 4)
(cell_to_pair d5 d 5)
(cell_to_pair d6 d 6)
(cell_to_pair e3 e 3)
(cell_to_pair e4 e 4)
(cell_to_pair f3 f 3)
(cell_to_pair f4 f 4)

(map_cell_content red red)
(map_cell_content teal teal)
(map_cell_content blank o)