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

Game Description

; tictactoeparallel
(role xplayer)
(role oplayer)
(init (cell1 1 1 b))
(init (cell1 1 2 b))
(init (cell1 1 3 b))
(init (cell1 2 1 b))
(init (cell1 2 2 b))
(init (cell1 2 3 b))
(init (cell1 3 1 b))
(init (cell1 3 2 b))
(init (cell1 3 3 b))
(init (cell2 1 1 b))
(init (cell2 1 2 b))
(init (cell2 1 3 b))
(init (cell2 2 1 b))
(init (cell2 2 2 b))
(init (cell2 2 3 b))
(init (cell2 3 1 b))
(init (cell2 3 2 b))
(init (cell2 3 3 b))
(init (control xplayer))
(<= (legal ?player (mark ?x1 ?y1 ?x2 ?y2))
    (true (control ?player))
    (true (cell1 ?x1 ?y1 b))
    (true (cell2 ?x2 ?y2 b)))
(<= (legal xplayer noop)
    (true (control oplayer)))
(<= (legal oplayer noop)
    (true (control xplayer)))
(<= (next (cell1 ?x1 ?y1 x))
    (does xplayer (mark ?x1 ?y1 ?x2 ?y2)))
(<= (next (cell1 ?x1 ?y1 o))
    (does oplayer (mark ?x1 ?y1 ?x2 ?y2)))
(<= (next (cell1 ?x ?y ?mark))
    (true (cell1 ?x ?y ?mark))
    (does xplayer (mark ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?x ?y ?x1 ?y1))
(<= (next (cell1 ?x ?y ?mark))
    (true (cell1 ?x ?y ?mark))
    (does oplayer (mark ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?x ?y ?x1 ?y1))
(<= (next (cell2 ?x2 ?y2 x))
    (does xplayer (mark ?x1 ?y1 ?x2 ?y2)))
(<= (next (cell2 ?x2 ?y2 o))
    (does oplayer (mark ?x1 ?y1 ?x2 ?y2)))
(<= (next (cell2 ?x ?y ?mark))
    (true (cell2 ?x ?y ?mark))
    (does xplayer (mark ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?x ?y ?x2 ?y2))
(<= (next (cell2 ?x ?y ?mark))
    (true (cell2 ?x ?y ?mark))
    (does oplayer (mark ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?x ?y ?x2 ?y2))
(<= (next (control xplayer))
    (true (control oplayer)))
(<= (next (control oplayer))
    (true (control xplayer)))
(<= terminal
    (line1 x))
(<= terminal
    (line1 o))
(<= terminal
    (not open1))
(<= terminal
    (line2 x))
(<= terminal
    (line2 o))
(<= terminal
    (not open2))
(<= (goal xplayer 100)
    goalxplayer1-100
    goalxplayer2-100)
(<= (goal xplayer 75)
    goalxplayer1-100
    goalxplayer2-50)
(<= (goal xplayer 75)
    goalxplayer1-50
    goalxplayer2-100)
(<= (goal xplayer 50)
    goalxplayer1-100
    goalxplayer2-0)
(<= (goal xplayer 50)
    goalxplayer1-50
    goalxplayer2-50)
(<= (goal xplayer 50)
    goalxplayer1-0
    goalxplayer2-100)
(<= (goal xplayer 25)
    goalxplayer1-50
    goalxplayer2-0)
(<= (goal xplayer 25)
    goalxplayer1-0
    goalxplayer2-50)
(<= (goal xplayer 0)
    goalxplayer1-0
    goalxplayer2-0)
(<= (goal oplayer 100)
    goaloplayer1-100
    goaloplayer2-100)
(<= (goal oplayer 75)
    goaloplayer1-100
    goaloplayer2-50)
(<= (goal oplayer 75)
    goaloplayer1-50
    goaloplayer2-100)
(<= (goal oplayer 50)
    goaloplayer1-100
    goaloplayer2-0)
(<= (goal oplayer 50)
    goaloplayer1-50
    goaloplayer2-50)
(<= (goal oplayer 50)
    goaloplayer1-0
    goaloplayer2-100)
(<= (goal oplayer 25)
    goaloplayer1-50
    goaloplayer2-0)
(<= (goal oplayer 25)
    goaloplayer1-0
    goaloplayer2-50)
(<= (goal oplayer 0)
    goaloplayer1-0
    goaloplayer2-0)
(<= goalxplayer1-100
    (line1 x))
(<= goalxplayer1-50
    (not (line1 x))
    (not (line1 o))
    (not open1))
(<= goalxplayer1-0
    (line1 o))
(<= goalxplayer1-0
    (not (line1 x))
    (not (line1 o))
    open1)
(<= goaloplayer1-100
    (line1 o))
(<= goaloplayer1-50
    (not (line1 x))
    (not (line1 o))
    (not open1))
(<= goaloplayer1-0
    (line1 x))
(<= goaloplayer1-0
    (not (line1 x))
    (not (line1 o))
    open1)
(<= goalxplayer2-100
    (line2 x))
(<= goalxplayer2-50
    (not (line2 x))
    (not (line2 o))
    (not open2))
(<= goalxplayer2-0
    (line2 o))
(<= goalxplayer2-0
    (not (line2 x))
    (not (line2 o))
    open2)
(<= goaloplayer2-100
    (line2 o))
(<= goaloplayer2-50
    (not (line2 x))
    (not (line2 o))
    (not open2))
(<= goaloplayer2-0
    (line2 x))
(<= goaloplayer2-0
    (not (line2 x))
    (not (line2 o))
    open2)
(<= (row1 ?x ?mark)
    (true (cell1 ?x 1 ?mark))
    (true (cell1 ?x 2 ?mark))
    (true (cell1 ?x 3 ?mark)))
(<= (column1 ?y ?mark)
    (true (cell1 1 ?y ?mark))
    (true (cell1 2 ?y ?mark))
    (true (cell1 3 ?y ?mark)))
(<= (diagonal1 ?mark)
    (true (cell1 1 1 ?mark))
    (true (cell1 2 2 ?mark))
    (true (cell1 3 3 ?mark)))
(<= (diagonal1 ?mark)
    (true (cell1 1 3 ?mark))
    (true (cell1 2 2 ?mark))
    (true (cell1 3 1 ?mark)))
(<= (line1 ?mark)
    (row1 ?x ?mark))
(<= (line1 ?mark)
    (column1 ?y ?mark))
(<= (line1 ?mark)
    (diagonal1 ?mark))
(<= open1
    (true (cell1 ?x ?y b)))
(<= (row2 ?x ?mark)
    (true (cell2 ?x 1 ?mark))
    (true (cell2 ?x 2 ?mark))
    (true (cell2 ?x 3 ?mark)))
(<= (column2 ?y ?mark)
    (true (cell2 1 ?y ?mark))
    (true (cell2 2 ?y ?mark))
    (true (cell2 3 ?y ?mark)))
(<= (diagonal2 ?mark)
    (true (cell2 1 1 ?mark))
    (true (cell2 2 2 ?mark))
    (true (cell2 3 3 ?mark)))
(<= (diagonal2 ?mark)
    (true (cell2 1 3 ?mark))
    (true (cell2 2 2 ?mark))
    (true (cell2 3 1 ?mark)))
(<= (line2 ?mark)
    (row2 ?x ?mark))
(<= (line2 ?mark)
    (column2 ?y ?mark))
(<= (line2 ?mark)
    (diagonal2 ?mark))
(<= open2
    (true (cell2 ?x ?y b)))
(<= (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))
(cell 1 1)
(cell 1 2)
(cell 1 3)
(cell 2 1)
(cell 2 2)
(cell 2 3)
(cell 3 1)
(cell 3 2)
(cell 3 3)

sees_XML(...) rules

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