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

Game Description

(role odd)
(role even)
(init (cell 1 1 b))
(init (cell 1 2 b))
(init (cell 1 3 b))
(init (cell 2 1 b))
(init (cell 2 2 b))
(init (cell 2 3 b))
(init (cell 3 1 b))
(init (cell 3 2 b))
(init (cell 3 3 b))
(init (control odd))
(numberof odd 1)
(numberof even 2)
(numberof odd 3)
(numberof even 4)
(numberof odd 5)
(numberof even 6)
(numberof odd 7)
(numberof even 8)
(numberof odd 9)
(<= (iswinline ?n1 ?n2 ?n3)
    (isrightsum ?n1 ?n2 ?n3))
(<= (iswinline ?n1 ?n2 ?n3)
    (isrightsum ?n1 ?n3 ?n2))
(<= (iswinline ?n1 ?n2 ?n3)
    (isrightsum ?n2 ?n1 ?n3))
(<= (iswinline ?n1 ?n2 ?n3)
    (isrightsum ?n2 ?n3 ?n1))
(<= (iswinline ?n1 ?n2 ?n3)
    (isrightsum ?n3 ?n1 ?n2))
(<= (iswinline ?n1 ?n2 ?n3)
    (isrightsum ?n3 ?n2 ?n1))
(isrightsum 1 5 9)
(isrightsum 1 6 8)
(isrightsum 2 4 9)
(isrightsum 2 5 8)
(isrightsum 2 6 7)
(isrightsum 3 4 8)
(isrightsum 3 5 7)
(isrightsum 4 5 6)
(<= (next (cell ?m ?n ?x))
    (does ?r (mark ?m ?n ?x))
    (true (cell ?m ?n b)))
(<= (next (cell ?m ?n ?w))
    (true (cell ?m ?n ?w))
    (distinct ?w b))
(<= (next (cell ?m ?n b))
    (does ?w (mark ?j ?k ?x))
    (true (cell ?m ?n b))
    (or (distinct ?m ?j) (distinct ?n ?k)))
(<= (next (control even))
    (true (control odd)))
(<= (next (control odd))
    (true (control even)))
(<= (row ?m)
    (true (cell ?m 1 ?n1))
    (true (cell ?m 2 ?n2))
    (true (cell ?m 3 ?n3))
    (iswinline ?n1 ?n2 ?n3))
(<= (column ?n)
    (true (cell 1 ?n ?n1))
    (true (cell 2 ?n ?n2))
    (true (cell 3 ?n ?n3))
    (iswinline ?n1 ?n2 ?n3))
(<= (diagonal)
    (true (cell 1 1 ?n1))
    (true (cell 2 2 ?n2))
    (true (cell 3 3 ?n3))
    (iswinline ?n1 ?n2 ?n3))
(<= (diagonal)
    (true (cell 1 3 ?n1))
    (true (cell 2 2 ?n2))
    (true (cell 3 1 ?n3))
    (iswinline ?n1 ?n2 ?n3))
(<= (line)
    (row ?m))
(<= (line)
    (column ?m))
(<= (line)
    (diagonal))
(<= open
    (true (cell ?m ?n b)))
(<= (legal ?w (mark ?x ?y ?n))
    (numberof ?w ?n)
    (not (cellwith ?n))
    (true (cell ?x ?y b))
    (true (control ?w)))
(<= (cellwith ?n)
    (true (cell ?x1 ?y1 ?n)))
(<= (legal odd noop)
    (true (cell ?x ?y b))
    (true (control even)))
(<= (legal even noop)
    (true (cell ?x ?y b))
    (true (control odd)))
(<= (goal ?x 100)
    (line)
    (role ?x)
    (true (control ?y))
    (distinct ?x ?y))
(<= (goal ?x 50)
    (role ?x)
    (not (line))
    (not open))
(<= (goal ?x 0)
    (line)
    (true (control ?x)))
(<= terminal
    (line))
(<= terminal
    (not open))

sees_XML(...) rules

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