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

Game Description

(role player)
(init (on disc6 pillar1))
(init (on disc5 disc6))
(init (on disc4 disc5))
(init (on disc3 disc4))
(init (on disc2 disc3))
(init (on disc1 disc2))
(init (clear disc1))
(init (clear pillar2))
(init (clear pillar3))
(init (step 1))
(legal player giveup)
(<= (legal player (puton ?x ?y))
    (true (clear ?x))
    (true (clear ?y))
    (smallerdisc ?x ?y))
(<= (next (step ?y))
    (true (step ?x))
    (succ ?x ?y))
(<= (next (on ?x ?y))
    (does player (puton ?x ?y)))
(<= (next (on ?x ?y))
    (true (on ?x ?y))
    (not (put_on_any ?x)))

(<= (put_on_any ?x)
    (does player (puton ?x ?y1)))

(<= (next (clear ?y))
    (true (on ?x ?y))
    (does player (puton ?x ?y1)))
(<= (next (clear ?y))
    (true (clear ?y))
    (not (put_any_on ?y)))

(<= (put_any_on ?y)
    (does player (puton ?x ?y)))


(<= (next gaveup)
    (does player giveup))
(<= (goal player 100)
    (tower pillar3 6))
(<= (goal player 0)
    (not (true gaveup))
    (not (tower pillar3 6)))
(<= (goal player 5)
    (true gaveup))
(<= terminal
    (true (step 64)))
(<= terminal
    (tower pillar3 6))
(<= terminal
    (true gaveup))
(<= (tower ?x 0)
    (true (clear ?x)))
(<= (tower ?x ?height)
    (true (on ?y ?x))
    (disc_or_pillar ?y)
    (tower ?y ?height1)
    (succ ?height1 ?height))
(pillar pillar1)
(pillar pillar2)
(pillar pillar3)
(disc_or_pillar disc1)
(disc_or_pillar disc2)
(disc_or_pillar disc3)
(disc_or_pillar disc4)
(disc_or_pillar disc5)
(disc_or_pillar disc6)
(<= (disc_or_pillar ?p)
	(pillar ?p))
(nextsize disc1 disc2)
(nextsize disc2 disc3)
(nextsize disc3 disc4)
(nextsize disc4 disc5)
(nextsize disc5 disc6)
(<= (nextsize disc6 ?pillar)
    (pillar ?pillar))
(<= (smallerdisc ?a ?b)
    (nextsize ?a ?b))
(<= (smallerdisc ?a ?b)
    (nextsize ?a ?c)
    (smallerdisc ?c ?b))
(<= (smaller ?x ?y)
    (succ ?x ?y))
(<= (smaller ?x ?y)
    (succ ?x ?z)
    (smaller ?z ?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)

sees_XML(...) rules

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