Game tictictoe
name | tictictoe | |
---|---|---|
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Tictictoe
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(role white)
(role black)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(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 (step 1))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(<= (next (cell ?j ?k x))
(true (cell ?j ?k b))
(does white (mark ?j ?k))
(does black (mark ?m ?n))
(or (distinct ?j ?m) (distinct ?k ?n)))
(<= (next (cell ?m ?n o))
(true (cell ?m ?n b))
(does white (mark ?j ?k))
(does black (mark ?m ?n))
(or (distinct ?j ?m) (distinct ?k ?n)))
(<= (next (cell ?m ?n b))
(true (cell ?m ?n b))
(does white (mark ?m ?n))
(does black (mark ?m ?n)))
(<= (next (cell ?p ?q b))
(true (cell ?p ?q b))
(does white (mark ?j ?k))
(does black (mark ?m ?n))
(or (distinct ?j ?p) (distinct ?k ?q))
(or (distinct ?m ?p) (distinct ?n ?q)))
(<= (next (cell ?m ?n ?w))
(true (cell ?m ?n ?w))
(distinct ?w b))
(<= (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)
(<= (row ?m ?x)
(true (cell ?m 1 ?x))
(true (cell ?m 2 ?x))
(true (cell ?m 3 ?x)))
(<= (column ?n ?x)
(true (cell 1 ?n ?x))
(true (cell 2 ?n ?x))
(true (cell 3 ?n ?x)))
(<= (diagonal ?x)
(true (cell 1 1 ?x))
(true (cell 2 2 ?x))
(true (cell 3 3 ?x)))
(<= (diagonal ?x)
(true (cell 1 3 ?x))
(true (cell 2 2 ?x))
(true (cell 3 1 ?x)))
(<= (line ?x) (row ?m ?x))
(<= (line ?x) (column ?m ?x))
(<= (line ?x) (diagonal ?x))
(<= nolinex
(not (line x)))
(<= nolineo
(not (line o)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(<= (legal white (mark ?x ?y))
(true (cell ?x ?y b)))
(<= (legal black (mark ?x ?y))
(true (cell ?x ?y b)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(<= (goal white 50)
(line x)
(line o))
(<= (goal white 100)
(line x)
nolineo)
(<= (goal white 0)
nolinex
(line o))
(<= (goal white 50)
nolinex
nolineo)
(<= (goal black 50)
(line x)
(line o))
(<= (goal black 100)
nolinex
(line o))
(<= (goal black 0)
(line x)
nolineo)
(<= (goal black 50)
nolinex
nolineo)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(<= terminal
(true (step 7)))
(<= terminal
(line x))
(<= terminal
(line o))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sees_XML(...) rules
(<= (sees_xml random ?t) (true ?t))
(<= (sees_xml ?p ?t) (role ?p) (distinct ?p random) (true ?t))