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

Game Description

; blockerserial

(role crosser)
(role blocker)
(init (cell1 1 1 b))
(init (cell1 1 2 b))
(init (cell1 1 3 b))
(init (cell1 1 4 b))
(init (cell1 2 1 b))
(init (cell1 2 2 b))
(init (cell1 2 3 b))
(init (cell1 2 4 b))
(init (cell1 3 1 b))
(init (cell1 3 2 b))
(init (cell1 3 3 b))
(init (cell1 3 4 b))
(init (cell1 4 1 b))
(init (cell1 4 2 b))
(init (cell1 4 3 b))
(init (cell1 4 4 b))
(init (cell2 1 1 b))
(init (cell2 1 2 b))
(init (cell2 1 3 b))
(init (cell2 1 4 b))
(init (cell2 2 1 b))
(init (cell2 2 2 b))
(init (cell2 2 3 b))
(init (cell2 2 4 b))
(init (cell2 3 1 b))
(init (cell2 3 2 b))
(init (cell2 3 3 b))
(init (cell2 3 4 b))
(init (cell2 4 1 b))
(init (cell2 4 2 b))
(init (cell2 4 3 b))
(init (cell2 4 4 b))
(<= (legal ?who (mark1 ?x ?y))
    (not game1over)
    (role ?who)
    (true (cell1 ?x ?y b)))
(<= (legal ?who (mark2 ?x ?y))
    game1over
    (role ?who)
    (true (cell2 ?x ?y b)))
(<= (next (cell1 ?x ?y blk))
    (does blocker (mark1 ?x ?y)))
(<= (next (cell1 ?xc ?yc crosser))
    (does crosser (mark1 ?xc ?yc))
    (does blocker (mark1 ?xb ?yb))
    (distinctcell ?xc ?yc ?xb ?yb))
(<= (next (cell1 ?x ?y ?mark))
    (true (cell1 ?x ?y ?mark))
    (does blocker (mark1 ?xb ?yb))
    (does crosser (mark1 ?xc ?yc))
    (distinctcell ?x ?y ?xb ?yb)
    (distinctcell ?x ?y ?xc ?yc))
(<= (next (cell1 ?x ?y ?mark))
    (true (cell1 ?x ?y ?mark))
    game1over)
(<= (next (cell2 ?x ?y blk))
    (does blocker (mark2 ?x ?y)))
(<= (next (cell2 ?xc ?yc crosser))
    (does crosser (mark2 ?xc ?yc))
    (does blocker (mark2 ?xb ?yb))
    (distinctcell ?xc ?yc ?xb ?yb))
(<= (next (cell2 ?x ?y ?mark))
    (true (cell2 ?x ?y ?mark))
    (does blocker (mark2 ?xb ?yb))
    (does crosser (mark2 ?xc ?yc))
    (distinctcell ?x ?y ?xb ?yb)
    (distinctcell ?x ?y ?xc ?yc))
(<= (next (cell2 ?x ?y ?mark))
    (true (cell2 ?x ?y ?mark))
    (not game1over))
(<= (next (game1overlock))
    game1termcond)
(<= (next (game1overlock))
    (true (game1overlock)))
(<= terminal
    game2termcond)
(<= (goal blocker 100)
    goalblocker1-100
    goalblocker2-100)
(<= (goal blocker 50)
    goalblocker1-100
    goalblocker2-0)
(<= (goal blocker 50)
    goalblocker1-0
    goalblocker2-100)
(<= (goal blocker 0)
    goalblocker1-0
    goalblocker2-0)
(<= (goal crosser 100)
    goalcrosser1-100
    goalcrosser2-100)
(<= (goal crosser 50)
    goalcrosser1-100
    goalcrosser2-0)
(<= (goal crosser 50)
    goalcrosser1-0
    goalcrosser2-100)
(<= (goal crosser 0)
    goalcrosser1-0
    goalcrosser2-0)
(<= game1over
    game1termcond)
(<= game1over
    (true (game1overlock)))
(<= game1termcond
    bridge1)
(<= game1termcond
    (not open1))
(<= game2termcond
    bridge2)
(<= game2termcond
    (not open2))
(<= bridge1
    (true (cell1 1 ?a crosser))
    (cont ?a ?b)
    (true (cell1 2 ?b crosser))
    (cont ?b ?c)
    (true (cell1 3 ?c crosser))
    (cont ?c ?d)
    (true (cell1 4 ?d crosser)))
(<= bridge2
    (true (cell2 1 ?a crosser))
    (cont ?a ?b)
    (true (cell2 2 ?b crosser))
    (cont ?b ?c)
    (true (cell2 3 ?c crosser))
    (cont ?c ?d)
    (true (cell2 4 ?d crosser)))
(<= open1
    (true (cell1 ?m ?n b)))
(<= open2
    (true (cell2 ?m ?n 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))
(<= goalblocker1-100
    (not bridge1)
    (not open1))
(<= goalblocker1-0
    bridge1)
(<= goalblocker1-0
    open1)
(<= goalblocker2-100
    (not bridge2)
    (not open2))
(<= goalblocker2-0
    bridge2)
(<= goalblocker2-0
    open2)
(<= goalcrosser1-100
    bridge1)
(<= goalcrosser1-0
    (not bridge1))
(<= goalcrosser2-100
    bridge2)
(<= goalcrosser2-0
    (not bridge2))
(cont 1 1)
(cont 2 2)
(cont 3 3)
(cont 4 4)
(cont 1 2)
(cont 2 3)
(cont 3 4)
(cont 2 1)
(cont 3 2)
(cont 4 3)
(cell 1 1)
(cell 2 1)
(cell 3 1)
(cell 4 1)
(cell 1 2)
(cell 2 2)
(cell 3 2)
(cell 4 2)
(cell 1 3)
(cell 2 3)
(cell 3 3)
(cell 4 3)
(cell 1 4)
(cell 2 4)
(cell 3 4)
(cell 4 4)

sees_XML(...) rules

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