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

Game Description

; asteroidsserial
(role ship)
(init (x1 10))
(init (y1 10))
(init (heading1 north))
(init (north-speed1 3))
(init (east-speed1 2))
(init (step1 1))
(init (x2 10))
(init (y2 10))
(init (heading2 north))
(init (north-speed2 3))
(init (east-speed2 2))
(init (step2 1))
(<= (legal ship thrust1)
    (not game1over))
(<= (legal ship (turn1 clock))
    (not game1over))
(<= (legal ship (turn1 counter))
    (not game1over))
(<= (legal ship thrust2)
    game1over)
(<= (legal ship (turn2 clock))
    game1over)
(<= (legal ship (turn2 counter))
    game1over)
(<= (next (heading1 ?h))
    (true (heading1 ?h))
    (does ship thrust1))
(<= (next (heading1 ?dir2))
    (does ship (turn1 counter))
    (true (heading1 ?dir1))
    (nextcounter ?dir1 ?dir2))
(<= (next (heading1 ?dir2))
    (does ship (turn1 clock))
    (true (heading1 ?dir1))
    (nextclock ?dir1 ?dir2))
(<= (next (heading1 ?dir))
    (true (heading1 ?dir))
    game1over)
(<= (next (north-speed1 ?s))
    (true (north-speed1 ?s))
    (does ship (turn1 clock)))
(<= (next (north-speed1 ?s))
    (true (north-speed1 ?s))
    (does ship (turn1 counter)))
(<= (next (north-speed1 ?s))
    (true (north-speed1 ?s))
    (true (heading1 east)))
(<= (next (north-speed1 ?s))
    (true (north-speed1 ?s))
    (true (heading1 west)))
(<= (next (north-speed1 ?s2))
    (true (north-speed1 ?s1))
    (true (heading1 north))
    (does ship thrust1)
    (speed+ ?s1 ?s2))
(<= (next (north-speed1 ?s2))
    (true (north-speed1 ?s1))
    (true (heading1 south))
    (does ship thrust1)
    (speed- ?s1 ?s2))
(<= (next (north-speed1 ?s))
    (true (north-speed1 ?s))
    game1over)
(<= (next (east-speed1 ?s))
    (true (east-speed1 ?s))
    (does ship (turn1 clock)))
(<= (next (east-speed1 ?s))
    (true (east-speed1 ?s))
    (does ship (turn1 counter)))
(<= (next (east-speed1 ?s))
    (true (east-speed1 ?s))
    (true (heading1 north)))
(<= (next (east-speed1 ?s))
    (true (east-speed1 ?s))
    (true (heading1 south)))
(<= (next (east-speed1 ?s2))
    (true (east-speed1 ?s1))
    (true (heading1 east))
    (does ship thrust1)
    (speed+ ?s1 ?s2))
(<= (next (east-speed1 ?s2))
    (true (east-speed1 ?s1))
    (true (heading1 west))
    (does ship thrust1)
    (speed- ?s1 ?s2))
(<= (next (east-speed1 ?s))
    (true (east-speed1 ?s))
    game1over)
(<= (next (x1 ?new))
    (not game1over)
    (true (x1 ?old))
    (true (east-speed1 ?s))
    (map+ ?old ?s ?new))
(<= (next (x1 ?x))
    game1over
    (true (x1 ?x)))
(<= (next (y1 ?new))
    (not game1over)
    (true (y1 ?old))
    (true (north-speed1 ?s))
    (map+ ?old ?s ?new))
(<= (next (y1 ?y))
    game1over
    (true (y1 ?y)))
(<= (next (step1 ?n++))
    (not game1over)
    (true (step1 ?n))
    (succ ?n ?n++))
(<= (next (step1 ?n))
    (true (step1 ?n))
    game1over)
(<= (next (heading2 ?h))
    (true (heading2 ?h))
    (does ship thrust2))
(<= (next (heading2 ?dir2))
    (does ship (turn2 counter))
    (true (heading2 ?dir1))
    (nextcounter ?dir1 ?dir2))
(<= (next (heading2 ?dir2))
    (does ship (turn2 clock))
    (true (heading2 ?dir1))
    (nextclock ?dir1 ?dir2))
(<= (next (heading2 ?dir))
    (true (heading2 ?dir))
    (not game1over))
(<= (next (north-speed2 ?s))
    (true (north-speed2 ?s))
    (does ship (turn2 clock)))
(<= (next (north-speed2 ?s))
    (true (north-speed2 ?s))
    (does ship (turn2 counter)))
(<= (next (north-speed2 ?s))
    (true (north-speed2 ?s))
    (true (heading2 east)))
(<= (next (north-speed2 ?s))
    (true (north-speed2 ?s))
    (true (heading2 west)))
(<= (next (north-speed2 ?s2))
    (true (north-speed2 ?s1))
    (true (heading2 north))
    (does ship thrust2)
    (speed+ ?s1 ?s2))
(<= (next (north-speed2 ?s2))
    (true (north-speed2 ?s1))
    (true (heading2 south))
    (does ship thrust2)
    (speed- ?s1 ?s2))
(<= (next (north-speed2 ?s))
    (true (north-speed2 ?s))
    (not game1over))
(<= (next (east-speed2 ?s))
    (true (east-speed2 ?s))
    (does ship (turn2 clock)))
(<= (next (east-speed2 ?s))
    (true (east-speed2 ?s))
    (does ship (turn2 counter)))
(<= (next (east-speed2 ?s))
    (true (east-speed2 ?s))
    (true (heading2 north)))
(<= (next (east-speed2 ?s))
    (true (east-speed2 ?s))
    (true (heading2 south)))
(<= (next (east-speed2 ?s2))
    (true (east-speed2 ?s1))
    (true (heading2 east))
    (does ship thrust2)
    (speed+ ?s1 ?s2))
(<= (next (east-speed2 ?s2))
    (true (east-speed2 ?s1))
    (true (heading2 west))
    (does ship thrust2)
    (speed- ?s1 ?s2))
(<= (next (east-speed2 ?s))
    (true (east-speed2 ?s))
    (not game1over))
(<= (next (x2 ?new))
    game1over
    (true (x2 ?old))
    (true (east-speed2 ?s))
    (map+ ?old ?s ?new))
(<= (next (x2 ?x))
    (not game1over)
    (true (x2 ?x)))
(<= (next (y2 ?new))
    game1over
    (true (y2 ?old))
    (true (north-speed2 ?s))
    (map+ ?old ?s ?new))
(<= (next (y2 ?y))
    (not game1over)
    (true (y2 ?y)))
(<= (next (step2 ?n++))
    game1over
    (true (step2 ?n))
    (succ ?n ?n++))
(<= (next (step2 ?n))
    (true (step2 ?n))
    (not game1over))
(<= (next (game1overlock))
    game1termcond)
(<= (next (game1overlock))
    (true (game1overlock)))
(<= terminal
    game2termcond)
(<= (goal ship 100)
    goal1-100
    goal2-100)
(<= (goal ship 75)
    goal1-100
    goal2-50)
(<= (goal ship 75)
    goal1-50
    goal2-100)
(<= (goal ship 50)
    goal1-100
    goal2-0)
(<= (goal ship 50)
    goal1-50
    goal2-50)
(<= (goal ship 50)
    goal1-0
    goal2-100)
(<= (goal ship 25)
    goal1-50
    goal2-0)
(<= (goal ship 25)
    goal1-0
    goal2-50)
(<= (goal ship 0)
    goal1-0
    goal2-0)
(<= game1over
    game1termcond)
(<= game1over
    (true (game1overlock)))
(<= game1termcond
    stopped1)
(<= game1termcond
    timeout1)
(<= game2termcond
    stopped2)
(<= game2termcond
    timeout2)
(<= stopped1
    (true (north-speed1 0))
    (true (east-speed1 0)))
(<= stopped2
    (true (north-speed2 0))
    (true (east-speed2 0)))
(<= atplanet1
    (true (x1 15))
    (true (y1 5)))
(<= atplanet2
    (true (x2 15))
    (true (y2 5)))
(<= goal1-100
    stopped1
    atplanet1)
(<= goal1-50
    stopped1
    (not atplanet1))
(<= goal1-0
    (not stopped1))
(<= goal2-100
    stopped2
    atplanet2)
(<= goal2-50
    stopped2
    (not atplanet2))
(<= goal2-0
    (not stopped2))
(<= timeout1
    (true (step1 50)))
(<= timeout2
    (true (step2 50)))
(map+ 20 -3 17)
(map+ 20 -2 18)
(map+ 20 -1 19)
(map+ 20 0 20)
(map+ 20 1 1)
(map+ 20 2 2)
(map+ 20 3 3)
(map+ 19 -3 16)
(map+ 19 -2 17)
(map+ 19 -1 18)
(map+ 19 0 19)
(map+ 19 1 20)
(map+ 19 2 1)
(map+ 19 3 2)
(map+ 18 -3 15)
(map+ 18 -2 16)
(map+ 18 -1 17)
(map+ 18 0 18)
(map+ 18 1 19)
(map+ 18 2 20)
(map+ 18 3 1)
(map+ 17 -3 14)
(map+ 17 -2 15)
(map+ 17 -1 16)
(map+ 17 0 17)
(map+ 17 1 18)
(map+ 17 2 19)
(map+ 17 3 20)
(map+ 16 -3 13)
(map+ 16 -2 14)
(map+ 16 -1 15)
(map+ 16 0 16)
(map+ 16 1 17)
(map+ 16 2 18)
(map+ 16 3 19)
(map+ 15 -3 12)
(map+ 15 -2 13)
(map+ 15 -1 14)
(map+ 15 0 15)
(map+ 15 1 16)
(map+ 15 2 17)
(map+ 15 3 18)
(map+ 14 -3 11)
(map+ 14 -2 12)
(map+ 14 -1 13)
(map+ 14 0 14)
(map+ 14 1 15)
(map+ 14 2 16)
(map+ 14 3 17)
(map+ 13 -3 10)
(map+ 13 -2 11)
(map+ 13 -1 12)
(map+ 13 0 13)
(map+ 13 1 14)
(map+ 13 2 15)
(map+ 13 3 16)
(map+ 12 -3 9)
(map+ 12 -2 10)
(map+ 12 -1 11)
(map+ 12 0 12)
(map+ 12 1 13)
(map+ 12 2 14)
(map+ 12 3 15)
(map+ 11 -3 8)
(map+ 11 -2 9)
(map+ 11 -1 10)
(map+ 11 0 11)
(map+ 11 1 12)
(map+ 11 2 13)
(map+ 11 3 14)
(map+ 10 -3 7)
(map+ 10 -2 8)
(map+ 10 -1 9)
(map+ 10 0 10)
(map+ 10 1 11)
(map+ 10 2 12)
(map+ 10 3 13)
(map+ 9 -3 6)
(map+ 9 -2 7)
(map+ 9 -1 8)
(map+ 9 0 9)
(map+ 9 1 10)
(map+ 9 2 11)
(map+ 9 3 12)
(map+ 8 -3 5)
(map+ 8 -2 6)
(map+ 8 -1 7)
(map+ 8 0 8)
(map+ 8 1 9)
(map+ 8 2 10)
(map+ 8 3 11)
(map+ 7 -3 4)
(map+ 7 -2 5)
(map+ 7 -1 6)
(map+ 7 0 7)
(map+ 7 1 8)
(map+ 7 2 9)
(map+ 7 3 10)
(map+ 6 -3 3)
(map+ 6 -2 4)
(map+ 6 -1 5)
(map+ 6 0 6)
(map+ 6 1 7)
(map+ 6 2 8)
(map+ 6 3 9)
(map+ 5 -3 2)
(map+ 5 -2 3)
(map+ 5 -1 4)
(map+ 5 0 5)
(map+ 5 1 6)
(map+ 5 2 7)
(map+ 5 3 8)
(map+ 4 -3 1)
(map+ 4 -2 2)
(map+ 4 -1 3)
(map+ 4 0 4)
(map+ 4 1 5)
(map+ 4 2 6)
(map+ 4 3 7)
(map+ 3 -3 10)
(map+ 3 -2 1)
(map+ 3 -1 2)
(map+ 3 0 3)
(map+ 3 1 4)
(map+ 3 2 5)
(map+ 3 3 6)
(map+ 2 -3 9)
(map+ 2 -2 10)
(map+ 2 -1 1)
(map+ 2 0 2)
(map+ 2 1 3)
(map+ 2 2 4)
(map+ 2 3 5)
(map+ 1 -3 8)
(map+ 1 -2 9)
(map+ 1 -1 10)
(map+ 1 0 1)
(map+ 1 1 2)
(map+ 1 2 3)
(map+ 1 3 4)
(speed+ -3 -2)
(speed+ -2 -1)
(speed+ -1 0)
(speed+ 0 1)
(speed+ 1 2)
(speed+ 2 3)
(speed+ 3 3)
(speed- 3 2)
(speed- 2 1)
(speed- 1 0)
(speed- 0 -1)
(speed- -1 -2)
(speed- -2 -3)
(speed- -3 -3)
(nextcounter north west)
(nextcounter west south)
(nextcounter south east)
(nextcounter east north)
(nextclock north east)
(nextclock east south)
(nextclock south west)
(nextclock west north)
(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)

sees_XML(...) rules

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