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

Game Description

(role white)
(role black)
(init (heap white 9))
(init (heap black 9))
(init (step 0))
(init (control white))
(init (pit outer n empty))
(init (pit outer ne empty))
(init (pit outer e empty))
(init (pit outer se empty))
(init (pit outer s empty))
(init (pit outer sw empty))
(init (pit outer w empty))
(init (pit outer nw empty))
(init (pit middle n empty))
(init (pit middle ne empty))
(init (pit middle e empty))
(init (pit middle se empty))
(init (pit middle s empty))
(init (pit middle sw empty))
(init (pit middle w empty))
(init (pit middle nw empty))
(init (pit inner n empty))
(init (pit inner ne empty))
(init (pit inner e empty))
(init (pit inner se empty))
(init (pit inner s empty))
(init (pit inner sw empty))
(init (pit inner w empty))
(init (pit inner nw empty))
(<= terminal
    (true (heap white 0))
    (true (heap black 0))
    (count ?w ?b)
    (or (smaller ?w 3) (smaller ?b 3)))
(<= terminal
    (true (step 60)))
(<= (goal white 100)
    (count ?w ?b)
    (smaller ?b 3))
(<= (goal white 75)
    (count ?w ?b)
    (not (smaller ?b 3))
    (smaller ?b ?w))
(<= (goal white 25)
    (count ?w ?b)
    (not (smaller ?w 3))
    (smaller ?w ?b))
(<= (goal white 0)
    (count ?w ?b)
    (smaller ?w 3))
(<= (goal ?p 50)
    (count ?w ?w)
    (role ?p))
(<= (goal black 100)
    (count ?w ?b)
    (smaller ?w 3))
(<= (goal black 75)
    (count ?w ?b)
    (not (smaller ?w 3))
    (smaller ?w ?b))
(<= (goal black 25)
    (count ?w ?b)
    (not (smaller ?b 3))
    (smaller ?b ?w))
(<= (goal black 0)
    (count ?w ?b)
    (smaller ?b 3))
(<= (legal ?p noop)
    (true (control ?p2))
    (distinct ?p2 ?p)
    (role ?p))
(<= (legal ?p noop)
    (true (control ?p))
    (true made_a_mill)
    (not exists_stone_to_remove))
(<= (legal ?p noop)
    (true (control ?p))
    (not (true made_a_mill))
    (true (heap ?p 0))
    (not exists_legal_move))
(<= (legal ?p (place ?x ?y))
    (true (control ?p))
    (not (true made_a_mill))
    (true (heap ?p ?n))
    (distinct ?n 0)
    (true (pit ?x ?y empty)))
(<= (legal ?p (move ?x1 ?y1 ?x2 ?y2))
    (true (control ?p))
    (not (true made_a_mill))
    (true (heap ?p 0))
    (true (pit ?x1 ?y1 ?p))
    (true (pit ?x2 ?y2 empty))
    (adjacent ?x1 ?y1 ?x2 ?y2))
(<= (legal ?p (move ?x1 ?y1 ?x2 ?y2))
    (true (control ?p))
    (not (true made_a_mill))
    (true (heap ?p 0))
    (true (pit ?x1 ?y1 ?p))
    (true (pit ?x2 ?y2 empty))
    (count_role ?p 3)
    (or (distinct ?x1 ?x2) (distinct ?y1 ?y2)))
(<= (legal ?p (remove ?x ?y))
    (true (control ?p))
    (true made_a_mill)
    (true (pit ?x ?y ?p2))
    (role ?p2)
    (distinct ?p2 ?p)
    (not (in_a_mill ?p2 ?x ?y)))
(<= (next (step ?n2))
    (true (step ?n))
    (succ ?n ?n2))
(<= (next (heap ?p ?n))
    (does ?p (place ?x ?y))
    (true (heap ?p ?n2))
    (succ ?n ?n2))
(<= (next (heap ?p ?n))
    (true (heap ?p ?n))
    (not (places ?p)))
(<= (next (pit ?x ?y ?p))
    (does ?p (place ?x ?y)))
(<= (next (pit ?x ?y ?p))
    (does ?p (move ?x1 ?y1 ?x ?y)))
(<= (next (pit ?x ?y empty))
    (does ?p (remove ?x ?y)))
(<= (next (pit ?x ?y empty))
    (does ?p (move ?x ?y ?x1 ?y1)))
(<= (next (pit ?x ?y ?c))
    (true (pit ?x ?y ?c))
    (or (does ?p (place ?x1 ?y1)) (does ?p (remove ?x1 ?y1)))
    (or (distinct ?x ?x1) (distinct ?y ?y1)))
(<= (next (pit ?x ?y ?c))
    (true (pit ?x ?y ?c))
    (does ?p (move ?x2 ?y2 ?x1 ?y1))
    (or (distinct ?x ?x1) (distinct ?y ?y1))
    (or (distinct ?x ?x2) (distinct ?y ?y2)))
(<= (next (pit ?x ?y ?c))
    (true (pit ?x ?y ?c))
    (does white noop)
    (does black noop))
(<= (next (control ?p))
    (true (control ?p))
    (makes_a_mill ?p))
(<= (next (control ?p2))
    (true (control ?p1))
    (role ?p2)
    (distinct ?p2 ?p1)
    (not (makes_a_mill ?p1)))
(<= (next made_a_mill)
    (true (control ?p))
    (makes_a_mill ?p))
(<= (places ?p)
    (does ?p (place ?x ?y)))
(<= exists_stone_to_remove
    (true (control ?p))
    (role ?p2)
    (distinct ?p2 ?p)
    (true (pit ?x ?y ?p2))
    (not (in_a_mill ?p2 ?x ?y)))
(<= exists_legal_move
    (true (control ?p))
    (true (pit ?x1 ?y1 ?p))
    (true (pit ?x2 ?y2 empty))
    (adjacent ?x1 ?y1 ?x2 ?y2))
(<= exists_legal_move
    (true (control ?p))
    (true (pit ?x1 ?y1 ?p))
    (true (pit ?x2 ?y2 empty))
    (count_role ?p 3)
    (or (distinct ?x1 ?x2) (distinct ?y1 ?y2)))
(<= (count_role white ?n)
    (count ?n ?n1))
(<= (count_role black ?n)
    (count ?n1 ?n))
(<= (count ?w ?b)
    (count_loop inner ne 0 0 ?w ?b))
(<= (count_loop outer n ?w1 ?b1 ?w ?b)
    (count_one outer n ?w1 ?b1 ?w ?b))
(<= (count_loop ?x1 ?y1 ?w1 ?b1 ?w ?b)
    (count_one ?x1 ?y1 ?w1 ?b1 ?w2 ?b2)
    (next_pit ?x1 ?y1 ?x2 ?y2)
    (count_loop ?x2 ?y2 ?w2 ?b2 ?w ?b))
(<= (count_one ?x ?y ?w1 ?b ?w ?b)
    (true (pit ?x ?y white))
    (succ ?w1 ?w)
    (number ?b))
(<= (count_one ?x ?y ?w ?b1 ?w ?b)
    (true (pit ?x ?y black))
    (succ ?b1 ?b)
    (number ?w))
(<= (count_one ?x ?y ?w ?b ?w ?b)
    (true (pit ?x ?y empty))
    (number ?b)
    (number ?w))
(<= (next_pit ?x1 n ?x2 ne)
    (next_square ?x1 ?x2))
(<= (next_pit ?x ?y1 ?x ?y2)
    (distinct ?y1 n)
    (next_dir ?y1 ?y2)
    (square ?x))
(<= (makes_a_mill ?p)
    (does ?p (place ?x ?y))
    (or (mill ?x ?y ?x2 ?y2 ?x3 ?y3) (mill ?x2 ?y2 ?x ?y ?x3 ?y3) (mill ?x2 ?y2 ?x3 ?y3 ?x ?y))
    (true (pit ?x2 ?y2 ?p))
    (true (pit ?x3 ?y3 ?p)))
(<= (makes_a_mill ?p)
    (does ?p (move ?x1 ?y1 ?x ?y))
    (or (mill ?x ?y ?x2 ?y2 ?x3 ?y3) (mill ?x2 ?y2 ?x ?y ?x3 ?y3) (mill ?x2 ?y2 ?x3 ?y3 ?x ?y))
    (true (pit ?x2 ?y2 ?p))
    (true (pit ?x3 ?y3 ?p))
    (or (distinct ?x2 ?x1) (distinct ?y2 ?y1))
    (or (distinct ?x3 ?x1) (distinct ?y3 ?y1)))
(<= (in_a_mill ?p ?x ?y)
    (or (mill ?x ?y ?x2 ?y2 ?x3 ?y3) (mill ?x2 ?y2 ?x ?y ?x3 ?y3) (mill ?x2 ?y2 ?x3 ?y3 ?x ?y))
    (true (pit ?x ?y ?p))
    (true (pit ?x2 ?y2 ?p))
    (true (pit ?x3 ?y3 ?p)))
(<= (mill ?x ?y1 ?x ?y2 ?x ?y3)
    (square ?x)
    (corner ?y1)
    (next_dir ?y1 ?y2)
    (next_dir ?y2 ?y3))
(<= (mill inner ?y middle ?y outer ?y)
    (direction ?y)
    (not (corner ?y)))
(succ 0 1)
(succ 1 2)
(succ 2 3)
(succ 3 4)
(succ 4 5)
(succ 5 6)
(succ 6 7)
(succ 7 8)
(succ 8 9)
(succ 9 10)
(succ 10 11)
(succ 11 12)
(succ 12 13)
(succ 13 14)
(succ 14 15)
(succ 15 16)
(succ 16 17)
(succ 17 18)
(succ 18 19)
(succ 19 20)
(succ 20 21)
(succ 21 22)
(succ 22 23)
(succ 23 24)
(succ 24 25)
(succ 25 26)
(succ 26 27)
(succ 27 28)
(succ 28 29)
(succ 29 30)
(succ 30 31)
(succ 31 32)
(succ 32 33)
(succ 33 34)
(succ 34 35)
(succ 35 36)
(succ 36 37)
(succ 37 38)
(succ 38 39)
(succ 39 40)
(succ 40 41)
(succ 41 42)
(succ 42 43)
(succ 43 44)
(succ 44 45)
(succ 45 46)
(succ 46 47)
(succ 47 48)
(succ 48 49)
(succ 49 50)
(succ 50 51)
(succ 51 52)
(succ 52 53)
(succ 53 54)
(succ 54 55)
(succ 55 56)
(succ 56 57)
(succ 57 58)
(succ 58 59)
(succ 59 60)
(succ 60 61)
(succ 61 62)
(succ 62 63)
(succ 63 64)
(succ 64 65)
(succ 65 66)
(succ 66 67)
(succ 67 68)
(succ 68 69)
(succ 69 70)
(<= (smaller ?x ?y)
    (succ ?x ?y))
(<= (smaller ?x ?y)
    (succ ?x ?z)
    (smaller ?z ?y))
(<= (adjacent ?x1 ?y ?x2 ?y)
    (not (corner ?y))
    (adj_squares ?x1 ?x2)
    (direction ?y))
(<= (adjacent ?x ?y1 ?x ?y2)
    (adj_directions ?y1 ?y2)
    (square ?x))
(<= (adj_squares ?s1 ?s2)
    (next_square ?s1 ?s2))
(<= (adj_squares ?s1 ?s2)
    (next_square ?s2 ?s1))
(square inner)
(square middle)
(square outer)
(next_square inner middle)
(next_square middle outer)
(<= (adj_directions ?d1 ?d2)
    (next_dir ?d1 ?d2))
(<= (adj_directions ?d1 ?d2)
    (next_dir ?d2 ?d1))
(<= (direction ?y)
    (next_dir ?y ?foo))
(next_dir n ne)
(next_dir ne e)
(next_dir e se)
(next_dir se s)
(next_dir s sw)
(next_dir sw w)
(next_dir w nw)
(next_dir nw n)
(corner ne)
(corner se)
(corner sw)
(corner nw)
(number 0)
(number 1)
(number 2)
(number 3)
(number 4)
(number 5)
(number 6)
(number 7)
(number 8)
(number 9)
(number 10)
(number 11)
(number 12)
(number 13)
(number 14)
(number 15)
(number 16)
(number 17)
(number 18)
(number 19)
(number 20)
(number 21)
(number 22)
(number 23)
(number 24)
(number 25)
(number 26)
(number 27)
(number 28)
(number 29)
(number 30)
(number 31)
(number 32)
(number 33)
(number 34)
(number 35)
(number 36)
(number 37)
(number 38)
(number 39)
(number 40)
(number 41)
(number 42)
(number 43)
(number 44)
(number 45)
(number 46)
(number 47)
(number 48)
(number 49)
(number 50)
(number 51)
(number 52)
(number 53)
(number 54)
(number 55)
(number 56)
(number 57)
(number 58)
(number 59)
(number 60)
(number 61)
(number 62)
(number 63)
(number 64)
(number 65)
(number 66)
(number 67)
(number 68)
(number 69)
(number 70)

sees_XML(...) rules

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