You are not logged in. login register
Game tictactoeserial
name tictactoeserial
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

; tictactoeserial
(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 (control1 xplayer))
(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 (control2 xplayer))
(<= (legal ?player (mark1 ?x ?y))
    (not game1over)
    (true (control1 ?player))
    (true (cell1 ?x ?y b)))
(<= (legal xplayer noop)
    (not game1over)
    (true (control1 oplayer)))
(<= (legal oplayer noop)
    (not game1over)
    (true (control1 xplayer)))
(<= (legal ?player (mark2 ?x ?y))
    game1over
    (true (control2 ?player))
    (true (cell2 ?x ?y b)))
(<= (legal xplayer noop)
    game1over
    (true (control2 oplayer)))
(<= (legal oplayer noop)
    game1over
    (true (control2 xplayer)))
(<= (next (cell1 ?x ?y x))
    (does xplayer (mark1 ?x ?y)))
(<= (next (cell1 ?x ?y o))
    (does oplayer (mark1 ?x ?y)))
(<= (next (cell1 ?x1 ?y1 ?mark))
    (true (cell1 ?x1 ?y1 ?mark))
    (does xplayer (mark1 ?x2 ?y2))
    (distinctcell ?x1 ?y1 ?x2 ?y2))
(<= (next (cell1 ?x1 ?y1 ?mark))
    (true (cell1 ?x1 ?y1 ?mark))
    (does oplayer (mark1 ?x2 ?y2))
    (distinctcell ?x1 ?y1 ?x2 ?y2))
(<= (next (cell1 ?x ?y ?mark))
    (true (cell1 ?x ?y ?mark))
    game1over)
(<= (next (control1 xplayer))
    (not game1over)
    (true (control1 oplayer)))
(<= (next (control1 oplayer))
    (not game1over)
    (true (control1 xplayer)))
(<= (next (control1 ?player))
    (true (control1 ?player))
    game1over)
(<= (next (cell2 ?x ?y x))
    (does xplayer (mark2 ?x ?y)))
(<= (next (cell2 ?x ?y o))
    (does oplayer (mark2 ?x ?y)))
(<= (next (cell2 ?x1 ?y1 ?mark))
    (true (cell2 ?x1 ?y1 ?mark))
    (does xplayer (mark2 ?x2 ?y2))
    (distinctcell ?x1 ?y1 ?x2 ?y2))
(<= (next (cell2 ?x1 ?y1 ?mark))
    (true (cell2 ?x1 ?y1 ?mark))
    (does oplayer (mark2 ?x2 ?y2))
    (distinctcell ?x1 ?y1 ?x2 ?y2))
(<= (next (cell2 ?x ?y ?mark))
    (true (cell2 ?x ?y ?mark))
    (not game1over))
(<= (next (control2 xplayer))
    game1over
    (true (control2 oplayer)))
(<= (next (control2 oplayer))
    game1over
    (true (control2 xplayer)))
(<= (next (control2 ?player))
    (true (control2 ?player))
    (not game1over))
(<= (next (game1overlock))
    game1termcond)
(<= (next (game1overlock))
    (true (game1overlock)))
(<= terminal
    game2termcond)
(<= (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)
(<= game1over
    game1termcond)
(<= game1over
    (true (game1overlock)))
(<= game1termcond
    (line1 x))
(<= game1termcond
    (line1 o))
(<= game1termcond
    (not open1))
(<= game2termcond
    (line2 x))
(<= game2termcond
    (line2 o))
(<= game2termcond
    (not open2))
(<= 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))