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

Game Description

; quartosuicide
(role white)
(role black)
(init (cell 1 1 empty))
(init (cell 1 2 empty))
(init (cell 1 3 empty))
(init (cell 1 4 empty))
(init (cell 2 1 empty))
(init (cell 2 2 empty))
(init (cell 2 3 empty))
(init (cell 2 4 empty))
(init (cell 3 1 empty))
(init (cell 3 2 empty))
(init (cell 3 3 empty))
(init (cell 3 4 empty))
(init (cell 4 1 empty))
(init (cell 4 2 empty))
(init (cell 4 3 empty))
(init (cell 4 4 empty))
(init (pool p0000))
(init (pool p0001))
(init (pool p0010))
(init (pool p0011))
(init (pool p0100))
(init (pool p0101))
(init (pool p0110))
(init (pool p0111))
(init (pool p1000))
(init (pool p1001))
(init (pool p1010))
(init (pool p1011))
(init (pool p1100))
(init (pool p1101))
(init (pool p1110))
(init (pool p1111))
(init (selectcontrol white))
(<= (legal ?player (select ?piece))
    (role ?player)
    (true (selectcontrol ?player))
    (true (pool ?piece)))
(<= (legal ?player (place ?piece ?x ?y))
    (role ?player)
    (true (placecontrol ?player))
    (true (selected ?piece))
    (true (cell ?x ?y empty)))
(<= (legal ?player noop)
    (role ?player)
    (not (true (selectcontrol ?player)))
    (not (true (placecontrol ?player))))
(<= (next (pool ?piece))
    (true (pool ?piece))
    (not (does white (select ?piece)))
    (not (does black (select ?piece))))
(<= (next (selected ?piece))
    (role ?player)
    (does ?player (select ?piece)))
(<= (next (cell ?x ?y ?state))
    (true (cell ?x ?y ?state))
    (role ?player)
    (does ?player (select ?piece)))
(<= (next (cell ?x1 ?y1 ?state))
    (true (cell ?x1 ?y1 ?state))
    (role ?player)
    (does ?player (place ?piece ?x2 ?y2))
    (distinctcell ?x1 ?y1 ?x2 ?y2))
(<= (next (cell ?x ?y ?piece))
    (does ?player (place ?piece ?x ?y)))
(<= (next (selectcontrol white))
    (true (placecontrol white)))
(<= (next (placecontrol white))
    (true (selectcontrol black)))
(<= (next (selectcontrol black))
    (true (placecontrol black)))
(<= (next (placecontrol black))
    (true (selectcontrol white)))
(<= terminal
    line)
(<= terminal
    (not boardopen))
(<= (goal white 0)
    line
    (placedlast white))
(<= (goal white 50)
    (not line)
    (not boardopen))
(<= (goal white 0)
    (not line)
    boardopen)
(<= (goal white 100)
    line
    (placedlast black))
(<= (goal black 0)
    line
    (placedlast black))
(<= (goal black 50)
    (not line)
    (not boardopen))
(<= (goal black 0)
    (not line)
    boardopen)
(<= (goal black 100)
    line
    (placedlast white))
(<= (placedlast ?player)
    (true (selectcontrol ?player)))
(<= boardopen
    (true (cell ?x ?y empty)))
(<= line
    row)
(<= line
    column)
(<= line
    diagonal)
(<= row
    (index ?y)
    (true (cell 1 ?y ?p1))
    (true (cell 2 ?y ?p2))
    (true (cell 3 ?y ?p3))
    (true (cell 4 ?y ?p4))
    (set ?p1 ?p2 ?p3 ?p4))
(<= column
    (index ?x)
    (true (cell ?x 1 ?p1))
    (true (cell ?x 2 ?p2))
    (true (cell ?x 3 ?p3))
    (true (cell ?x 4 ?p4))
    (set ?p1 ?p2 ?p3 ?p4))
(<= diagonal
    (true (cell 1 1 ?p1))
    (true (cell 2 2 ?p2))
    (true (cell 3 3 ?p3))
    (true (cell 4 4 ?p4))
    (set ?p1 ?p2 ?p3 ?p4))
(<= diagonal
    (true (cell 1 4 ?p1))
    (true (cell 2 3 ?p2))
    (true (cell 3 2 ?p3))
    (true (cell 4 1 ?p4))
    (set ?p1 ?p2 ?p3 ?p4))
(<= (set ?p1 ?p2 ?p3 ?p4)
    (bit ?bit)
    (index ?n)
    (bitnis ?n ?p1 ?bit)
    (bitnis ?n ?p2 ?bit)
    (bitnis ?n ?p3 ?bit)
    (bitnis ?n ?p4 ?bit))
(<= (distinctcell ?x1 ?y1 ?x2 ?y2)
    (index ?x1)
    (index ?y1)
    (index ?x2)
    (index ?y2)
    (distinct ?x1 ?x2))
(<= (distinctcell ?x1 ?y1 ?x2 ?y2)
    (index ?x1)
    (index ?y1)
    (index ?x2)
    (index ?y2)
    (distinct ?y1 ?y2))
(bit 0)
(bit 1)
(index 1)
(index 2)
(index 3)
(index 4)
(bitnis 4 p0000 0)
(bitnis 3 p0000 0)
(bitnis 2 p0000 0)
(bitnis 1 p0000 0)
(bitnis 4 p0001 0)
(bitnis 3 p0001 0)
(bitnis 2 p0001 0)
(bitnis 1 p0001 1)
(bitnis 4 p0010 0)
(bitnis 3 p0010 0)
(bitnis 2 p0010 1)
(bitnis 1 p0010 0)
(bitnis 4 p0011 0)
(bitnis 3 p0011 0)
(bitnis 2 p0011 1)
(bitnis 1 p0011 1)
(bitnis 4 p0100 0)
(bitnis 3 p0100 1)
(bitnis 2 p0100 0)
(bitnis 1 p0100 0)
(bitnis 4 p0101 0)
(bitnis 3 p0101 1)
(bitnis 2 p0101 0)
(bitnis 1 p0101 1)
(bitnis 4 p0110 0)
(bitnis 3 p0110 1)
(bitnis 2 p0110 1)
(bitnis 1 p0110 0)
(bitnis 4 p0111 0)
(bitnis 3 p0111 1)
(bitnis 2 p0111 1)
(bitnis 1 p0111 1)
(bitnis 4 p1000 1)
(bitnis 3 p1000 0)
(bitnis 2 p1000 0)
(bitnis 1 p1000 0)
(bitnis 4 p1001 1)
(bitnis 3 p1001 0)
(bitnis 2 p1001 0)
(bitnis 1 p1001 1)
(bitnis 4 p1010 1)
(bitnis 3 p1010 0)
(bitnis 2 p1010 1)
(bitnis 1 p1010 0)
(bitnis 4 p1011 1)
(bitnis 3 p1011 0)
(bitnis 2 p1011 1)
(bitnis 1 p1011 1)
(bitnis 4 p1100 1)
(bitnis 3 p1100 1)
(bitnis 2 p1100 0)
(bitnis 1 p1100 0)
(bitnis 4 p1101 1)
(bitnis 3 p1101 1)
(bitnis 2 p1101 0)
(bitnis 1 p1101 1)
(bitnis 4 p1110 1)
(bitnis 3 p1110 1)
(bitnis 2 p1110 1)
(bitnis 1 p1110 0)
(bitnis 4 p1111 1)
(bitnis 3 p1111 1)
(bitnis 2 p1111 1)
(bitnis 1 p1111 1)

sees_XML(...) rules

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