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

Game Description

; blockerparallel

(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 (mark ?x1 ?y1 ?x2 ?y2))
    (role ?who)
    (true (cell1 ?x1 ?y1 b))
    (true (cell2 ?x2 ?y2 b)))
(<= (next (cell1 ?x1 ?y1 blk))
    (does blocker (mark ?x1 ?y1 ?x2 ?y2)))
(<= (next (cell1 ?xc1 ?yc1 crosser))
    (does crosser (mark ?xc1 ?yc1 ?xc2 ?yc2))
    (does blocker (mark ?xb1 ?yb1 ?xb2 ?yb2))
    (distinctcell ?xc1 ?yc1 ?xb1 ?yb1))
(<= (next (cell1 ?x ?y ?mark))
    (true (cell1 ?x ?y ?mark))
    (does blocker (mark ?xb1 ?yb1 ?xb2 ?yb2))
    (does crosser (mark ?xc1 ?yc1 ?xc2 ?yc2))
    (distinctcell ?x ?y ?xb1 ?yb1)
    (distinctcell ?x ?y ?xc1 ?yc1))
(<= (next (cell2 ?x2 ?y2 blk))
    (does blocker (mark ?x1 ?y1 ?x2 ?y2)))
(<= (next (cell2 ?xc2 ?yc2 crosser))
    (does crosser (mark ?xc1 ?yc1 ?xc2 ?yc2))
    (does blocker (mark ?xb1 ?yb1 ?xb2 ?yb2))
    (distinctcell ?xc2 ?yc2 ?xb2 ?yb2))
(<= (next (cell2 ?x ?y ?mark))
    (true (cell2 ?x ?y ?mark))
    (does blocker (mark ?xb1 ?yb1 ?xb2 ?yb2))
    (does crosser (mark ?xc1 ?yc1 ?xc2 ?yc2))
    (distinctcell ?x ?y ?xb2 ?yb2)
    (distinctcell ?x ?y ?xc2 ?yc2))
(<= terminal
    bridge1)
(<= terminal
    bridge2)
(<= terminal
    (not open1))
(<= terminal
    (not open2))
(<= (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)
(<= 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))