You are not logged in. login register
Game tttcc4
name tttcc4
creator admin
number of roles 3
stylesheet ttc/ttc.xsl
GDL v1
enabled
matches show matches
statistics show game statistics
description

Game Description

(role red)
(role yellow)
(role blue)
(init (control red))
(init (cell 1 5 redpawn))
(init (cell 1 4 redchecker))
(init (cell 1 3 redknight))
(init (cell 3 1 yellowpawn))
(init (cell 4 1 yellowchecker))
(init (cell 5 1 yellowknight))
(init (cell 7 3 bluepawn))
(init (cell 7 4 bluechecker))
(init (cell 7 5 blueknight))
(init (step 1))
(<= (legal ?player noop)
    (role ?player))
(<= (legal ?player (drop ?x))
    (true (control ?player))
    (chute ?x)
    (emptycell ?x 6))
(<= (legal ?player (pawnmove ?x1 ?y1 ?x2 ?y2))
    (true (control ?player))
    (true (cell ?x1 ?y1 ?piece))
    (piece ?piece pawn ?player)
    (orthogonal ?x1 ?y1 ?x2 ?y2)
    (onboard ?x2 ?y2)
    (emptycell ?x2 ?y2))
(<= (legal ?player1 (pawnmove ?x1 ?y1 ?x2 ?y2))
    (true (control ?player1))
    (true (cell ?x1 ?y1 ?piece1))
    (piece ?piece1 pawn ?player1)
    (diagonal ?x1 ?y1 ?x2 ?y2)
    (onboard ?x2 ?y2)
    (true (cell ?x2 ?y2 ?piece2))
    (piece ?piece2 ?ignore ?player2)
    (distinct ?player1 ?player2))
(<= (legal ?player (knightmove ?x1 ?y1 ?x2 ?y2))
    (true (control ?player))
    (true (cell ?x1 ?y1 ?piece))
    (piece ?piece knight ?player)
    (ell ?x1 ?y1 ?x2 ?y2)
    (onboard ?x2 ?y2)
    (emptycell ?x2 ?y2))
(<= (legal ?player1 (knightmove ?x1 ?y1 ?x2 ?y2))
    (true (control ?player1))
    (true (cell ?x1 ?y1 ?piece1))
    (piece ?piece1 knight ?player1)
    (ell ?x1 ?y1 ?x2 ?y2)
    (onboard ?x2 ?y2)
    (true (cell ?x2 ?y2 ?piece2))
    (piece ?piece2 ?ignore ?player2)
    (distinct ?player1 ?player2))
(<= (legal ?player (checkermove ?x1 ?y1 ?x2 ?y2))
    (true (control ?player))
    (true (cell ?x1 ?y1 ?piece))
    (piece ?piece checker ?player)
    (diagonal ?x1 ?y1 ?x2 ?y2)
    (onboard ?x2 ?y2)
    (emptycell ?x2 ?y2))
(<= (legal ?player1 (jump ?x1 ?y1 ?x2 ?y2 ?x3 ?y3))
    (true (control ?player1))
    (true (cell ?x1 ?y1 ?piece1))
    (piece ?piece1 checker ?player1)
    (upright ?x1 ?y1 ?x2 ?y2)
    (true (cell ?x2 ?y2 ?piece2))
    (piece ?piece2 ?ignore ?player2)
    (distinct ?player1 ?player2)
    (upright ?x2 ?y2 ?x3 ?y3)
    (onboard ?x3 ?y3)
    (emptycell ?x3 ?y3))
(<= (legal ?player1 (jump ?x1 ?y1 ?x2 ?y2 ?x3 ?y3))
    (true (control ?player1))
    (true (cell ?x1 ?y1 ?piece1))
    (piece ?piece1 checker ?player1)
    (upleft ?x1 ?y1 ?x2 ?y2)
    (true (cell ?x2 ?y2 ?piece2))
    (piece ?piece2 ?ignore ?player2)
    (distinct ?player1 ?player2)
    (upleft ?x2 ?y2 ?x3 ?y3)
    (onboard ?x3 ?y3)
    (emptycell ?x3 ?y3))
(<= (legal ?player1 (jump ?x1 ?y1 ?x2 ?y2 ?x3 ?y3))
    (true (control ?player1))
    (true (cell ?x1 ?y1 ?piece1))
    (piece ?piece1 checker ?player1)
    (downright ?x1 ?y1 ?x2 ?y2)
    (true (cell ?x2 ?y2 ?piece2))
    (piece ?piece2 ?ignore ?player2)
    (distinct ?player1 ?player2)
    (downright ?x2 ?y2 ?x3 ?y3)
    (onboard ?x3 ?y3)
    (emptycell ?x3 ?y3))
(<= (legal ?player1 (jump ?x1 ?y1 ?x2 ?y2 ?x3 ?y3))
    (true (control ?player1))
    (true (cell ?x1 ?y1 ?piece1))
    (piece ?piece1 checker ?player1)
    (downleft ?x1 ?y1 ?x2 ?y2)
    (true (cell ?x2 ?y2 ?piece2))
    (piece ?piece2 ?ignore ?player2)
    (distinct ?player1 ?player2)
    (downleft ?x2 ?y2 ?x3 ?y3)
    (onboard ?x3 ?y3)
    (emptycell ?x3 ?y3))
(<= (next (control ?p2))
    (true (control ?p1))
    (rotation ?p1 ?p2))
(<= (next (cell ?x ?y ?piece))
    (true (control ?player))
    (does ?player noop)
    (true (cell ?x ?y ?piece)))
(<= (next (cell ?x ?y ?piece))
    (does ?player (drop ?x))
    (lowpoint ?x ?y)
    (piece ?piece disc ?player))
(<= (next (cell ?x ?y ?piece))
    (does ?player (drop ?ignore))
    (true (cell ?x ?y ?piece)))
(<= (next (cell ?x2 ?y2 ?piece))
    (does ?player (pawnmove ?x1 ?y1 ?x2 ?y2))
    (piece ?piece pawn ?player))
(<= (next (cell ?xany ?yany ?piece))
    (does ?player (pawnmove ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?xany ?yany ?x1 ?y1)
    (distinctcell ?xany ?yany ?x2 ?y2)
    (true (cell ?xany ?yany ?piece)))
(<= (next (cell ?x2 ?y2 ?piece))
    (does ?player (knightmove ?x1 ?y1 ?x2 ?y2))
    (piece ?piece knight ?player))
(<= (next (cell ?xany ?yany ?piece))
    (does ?player (knightmove ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?xany ?yany ?x1 ?y1)
    (distinctcell ?xany ?yany ?x2 ?y2)
    (true (cell ?xany ?yany ?piece)))
(<= (next (cell ?x2 ?y2 ?piece))
    (does ?player (checkermove ?x1 ?y1 ?x2 ?y2))
    (piece ?piece checker ?player))
(<= (next (cell ?xany ?yany ?piece))
    (does ?player (checkermove ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?xany ?yany ?x1 ?y1)
    (distinctcell ?xany ?yany ?x2 ?y2)
    (true (cell ?xany ?yany ?piece)))
(<= (next (cell ?x3 ?y3 ?piece))
    (does ?player (jump ?x1 ?y1 ?x2 ?y2 ?x3 ?y3))
    (piece ?piece checker ?player))
(<= (next (cell ?xany ?yany ?piece))
    (does ?player (jump ?x1 ?y1 ?x2 ?y2 ?x3 ?y3))
    (distinctcell ?xany ?yany ?x1 ?y1)
    (distinctcell ?xany ?yany ?x2 ?y2)
    (true (cell ?xany ?yany ?piece)))
(<= (next (cell ?xstart ?ystart ?piece))
    (does ?player (pawnmove ?x1 ?y1 ?x2 ?y2))
    (true (cell ?x2 ?y2 ?piece))
    (start ?piece ?xstart ?ystart))
(<= (next (cell ?xstart ?ystart ?piece))
    (does ?player (knightmove ?x1 ?y1 ?x2 ?y2))
    (true (cell ?x2 ?y2 ?piece))
    (start ?piece ?xstart ?ystart))
(<= (next (cell ?xstart ?ystart ?piece))
    (does ?player (jump ?x1 ?y1 ?x2 ?y2 ?x3 ?y3))
    (true (cell ?x2 ?y2 ?piece))
    (start ?piece ?xstart ?ystart))
(<= (next (step ?t2))
    (true (step ?t1))
    (stepcount ?t1 ?t2))
(<= terminal
    (role ?player)
    (line ?player))
(<= terminal
    (true (step 31)))
(<= (goal ?player 0)
    (role ?player)
    (not (line ?player)))
(<= (goal ?player 100)
    (role ?player)
    (line ?player))
(<= (lowpoint ?x ?y)
    (lowpointfrom ?x 6 ?x ?y))
(<= (lowpointfrom ?x 2 ?x 2)
    (index ?x))
(<= (lowpointfrom ?x ?y2 ?x ?y2)
    (index ?x)
    (plus1 ?y1 ?y2)
    (not (emptycell ?x ?y1)))
(<= (lowpointfrom ?x ?y3 ?x ?y1)
    (index ?x)
    (plus1 ?y2 ?y3)
    (emptycell ?x ?y2)
    (lowpointfrom ?x ?y2 ?x ?y1))
(<= (orthogonal ?x1 ?y1 ?x2 ?y2)
    (up ?x1 ?y1 ?x2 ?y2))
(<= (orthogonal ?x1 ?y1 ?x2 ?y2)
    (down ?x1 ?y1 ?x2 ?y2))
(<= (orthogonal ?x1 ?y1 ?x2 ?y2)
    (left ?x1 ?y1 ?x2 ?y2))
(<= (orthogonal ?x1 ?y1 ?x2 ?y2)
    (right ?x1 ?y1 ?x2 ?y2))
(<= (diagonal ?x1 ?y1 ?x2 ?y2)
    (upleft ?x1 ?y1 ?x2 ?y2))
(<= (diagonal ?x1 ?y1 ?x2 ?y2)
    (upright ?x1 ?y1 ?x2 ?y2))
(<= (diagonal ?x1 ?y1 ?x2 ?y2)
    (downleft ?x1 ?y1 ?x2 ?y2))
(<= (diagonal ?x1 ?y1 ?x2 ?y2)
    (downright ?x1 ?y1 ?x2 ?y2))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (up ?x1 ?y1 ?x2 ?y2)
    (upright ?x2 ?y2 ?x3 ?y3))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (up ?x1 ?y1 ?x2 ?y2)
    (upleft ?x2 ?y2 ?x3 ?y3))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (right ?x1 ?y1 ?x2 ?y2)
    (upright ?x2 ?y2 ?x3 ?y3))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (right ?x1 ?y1 ?x2 ?y2)
    (downright ?x2 ?y2 ?x3 ?y3))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (down ?x1 ?y1 ?x2 ?y2)
    (downright ?x2 ?y2 ?x3 ?y3))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (down ?x1 ?y1 ?x2 ?y2)
    (downleft ?x2 ?y2 ?x3 ?y3))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (left ?x1 ?y1 ?x2 ?y2)
    (upleft ?x2 ?y2 ?x3 ?y3))
(<= (ell ?x1 ?y1 ?x3 ?y3)
    (left ?x1 ?y1 ?x2 ?y2)
    (downleft ?x2 ?y2 ?x3 ?y3))
(<= (left ?x1 ?y ?x2 ?y)
    (plus1 ?x2 ?x1)
    (index ?y))
(<= (right ?x1 ?y ?x2 ?y)
    (plus1 ?x1 ?x2)
    (index ?y))
(<= (down ?x ?y1 ?x ?y2)
    (index ?x)
    (plus1 ?y2 ?y1))
(<= (up ?x ?y1 ?x ?y2)
    (index ?x)
    (plus1 ?y1 ?y2))
(<= (upleft ?x1 ?y1 ?x2 ?y2)
    (plus1 ?x2 ?x1)
    (plus1 ?y1 ?y2))
(<= (upright ?x1 ?y1 ?x2 ?y2)
    (plus1 ?x1 ?x2)
    (plus1 ?y1 ?y2))
(<= (downleft ?x1 ?y1 ?x2 ?y2)
    (plus1 ?x2 ?x1)
    (plus1 ?y2 ?y1))
(<= (downright ?x1 ?y1 ?x2 ?y2)
    (plus1 ?x1 ?x2)
    (plus1 ?y2 ?y1))
(<= (controls ?x ?y ?role)
    (true (cell ?x ?y ?piece))
    (piece ?piece ?ignore ?role))
(<= (onboard ?x ?y)
    (cell ?x ?y)
    (distinct ?x 1)
    (distinct ?x 7)
    (distinct ?y 1)
    (distinct ?y 7))
(<= (cell ?x ?y)
    (index ?x)
    (index ?y))
(<= (distinctcell ?x1 ?y1 ?x2 ?y2)
    (cell ?x1 ?y1)
    (cell ?x2 ?y2)
    (distinct ?x1 ?x2))
(<= (distinctcell ?x1 ?y1 ?x2 ?y2)
    (cell ?x1 ?y1)
    (cell ?x2 ?y2)
    (distinct ?y1 ?y2))
(<= (emptycell ?x ?y)
    (cell ?x ?y)
    (not (controls ?x ?y red))
    (not (controls ?x ?y yellow))
    (not (controls ?x ?y blue)))
(<= (line ?player)
    (row ?player))
(<= (line ?player)
    (column ?player))
(<= (line ?player)
    (diag ?player))
(<= (row ?player)
    (controls 3 3 ?player)
    (controls 4 3 ?player)
    (controls 5 3 ?player))
(<= (row ?player)
    (controls 3 4 ?player)
    (controls 4 4 ?player)
    (controls 5 4 ?player))
(<= (row ?player)
    (controls 3 5 ?player)
    (controls 4 5 ?player)
    (controls 5 5 ?player))
(<= (column ?player)
    (controls 3 3 ?player)
    (controls 3 4 ?player)
    (controls 3 5 ?player))
(<= (column ?player)
    (controls 4 3 ?player)
    (controls 4 4 ?player)
    (controls 4 5 ?player))
(<= (column ?player)
    (controls 5 3 ?player)
    (controls 5 4 ?player)
    (controls 5 5 ?player))
(<= (diag ?player)
    (controls 3 3 ?player)
    (controls 4 4 ?player)
    (controls 5 5 ?player))
(<= (diag ?player)
    (controls 3 5 ?player)
    (controls 4 4 ?player)
    (controls 5 3 ?player))
(rotation red yellow)
(rotation yellow blue)
(rotation blue red)
(start redpawn 1 5)
(start redchecker 1 4)
(start redknight 1 3)
(start yellowpawn 3 1)
(start yellowchecker 4 1)
(start yellowknight 5 1)
(start bluepawn 7 3)
(start bluechecker 7 4)
(start blueknight 7 5)
(piece reddisc disc red)
(piece yellowdisc disc yellow)
(piece bluedisc disc blue)
(piece redpawn pawn red)
(piece yellowpawn pawn yellow)
(piece bluepawn pawn blue)
(piece redchecker checker red)
(piece yellowchecker checker yellow)
(piece bluechecker checker blue)
(piece redknight knight red)
(piece yellowknight knight yellow)
(piece blueknight knight blue)
(chute 3)
(chute 4)
(chute 5)
(index 1)
(index 2)
(index 3)
(index 4)
(index 5)
(index 6)
(index 7)
(plus1 1 2)
(plus1 2 3)
(plus1 3 4)
(plus1 4 5)
(plus1 5 6)
(plus1 6 7)
(stepcount 1 2)
(stepcount 2 3)
(stepcount 3 4)
(stepcount 4 5)
(stepcount 5 6)
(stepcount 6 7)
(stepcount 7 8)
(stepcount 8 9)
(stepcount 9 10)
(stepcount 10 11)
(stepcount 11 12)
(stepcount 12 13)
(stepcount 13 14)
(stepcount 14 15)
(stepcount 15 16)
(stepcount 16 17)
(stepcount 17 18)
(stepcount 18 19)
(stepcount 19 20)
(stepcount 20 21)
(stepcount 21 22)
(stepcount 22 23)
(stepcount 23 24)
(stepcount 24 25)
(stepcount 25 26)
(stepcount 26 27)
(stepcount 27 28)
(stepcount 28 29)
(stepcount 29 30)
(stepcount 30 31)

sees_XML(...) rules

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