You are not logged in. login register
Game rendezvous_asteroids
name rendezvous_asteroids
creator stephan
number of roles 2
stylesheet asteroids/rendezvous-asteroids.xsl
GDL v1
enabled
matches show matches
statistics show game statistics
description Simultaneous two-player version of the existing game asteroids. The goal is to land the satelite on one of the four planets. Additionally, both players should land on the same planet to maximize their points.
Adapted GDL by Tim Federholzner (TZI, University of Bremen)

Game Description

; asteroids
(role ship1)
(role ship2)
;--------------------------------------------------------------------

(init (x1 5))
(init (y1 5))

(init (heading1 north))
(init (north-speed1 3))
(init (east-speed1 3))

(init (x2 15))
(init (y2 15))

(init (heading2 south))
(init (north-speed2 -3))
(init (east-speed2 -3))
;---------------------------------------------------------------------

(init (step 1))
;-------------------------------------------------------------

(<= (legal ship1 thrust))
(<= (legal ship1 (turn clock)))
(<= (legal ship1 (turn counter)))
(<= (legal ship2 thrust))
(<= (legal ship2 (turn clock)))
(<= (legal ship2 (turn counter)))
;-------------------------------------------------------------

(<= (next (heading1 ?h))
	(true (heading1 ?h))
	(does ship1 thrust))
(<= (next (heading1 west))
	(true (heading1 north))
	(does ship1 (turn counter)))
(<= (next (heading1 south))
	(true (heading1 west))
	(does ship1 (turn counter)))
(<= (next (heading1 east))
	(true (heading1 south))
	(does ship1 (turn counter)))
(<= (next (heading1 north))
	(true (heading1 east))
	(does ship1 (turn counter)))
(<= (next (heading1 east))
	(true (heading1 north))
	(does ship1 (turn clock)))
(<= (next (heading1 south))
	(true (heading1 east))
	(does ship1 (turn clock)))
(<= (next (heading1 west))
	(true (heading1 south))
	(does ship1 (turn clock)))
(<= (next (heading1 north))
	(true (heading1 west))
	(does ship1 (turn clock)))
(<= (next (north-speed1 ?s))
	(true (north-speed1 ?s))
	(does ship1 (turn clock)))
(<= (next (north-speed1 ?s))
	(true (north-speed1 ?s))
	(does ship1 (turn 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 ship1 thrust)
	(speed+ ?s1 ?s2))
(<= (next (north-speed1 ?s2))
	(true (north-speed1 ?s1))
	(true (heading1 south))
	(does ship1 thrust)
	(speed- ?s1 ?s2))
(<= (next (east-speed1 ?s))
	(true (east-speed1 ?s))
	(does ship1 (turn clock)))
(<= (next (east-speed1 ?s))
	(true (east-speed1 ?s))
	(does ship1 (turn 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 ship1 thrust)
	(speed+ ?s1 ?s2))
(<= (next (east-speed1 ?s2))
	(true (east-speed1 ?s1))
	(true (heading1 west))
	(does ship1 thrust)
	(speed- ?s1 ?s2))
(<= (next (x1 ?new))
	(true (x1 ?old))
	(true (east-speed1 ?s))
	(map+ ?old ?s ?new))
(<= (next (y1 ?new))
	(true (y1 ?old))
	(true (north-speed1 ?s))
	(map+ ?old ?s ?new))
;-------------------------------------------------------------
(<= (next (heading2 ?h))
	(true (heading2 ?h))
	(does ship2 thrust))
(<= (next (heading2 west))
	(true (heading2 north))
	(does ship2 (turn counter)))
(<= (next (heading2 south))
	(true (heading2 west))
	(does ship2 (turn counter)))
(<= (next (heading2 east))
	(true (heading2 south))
	(does ship2 (turn counter)))
(<= (next (heading2 north))
	(true (heading2 east))
	(does ship2 (turn counter)))
(<= (next (heading2 east))
	(true (heading2 north))
	(does ship2 (turn clock)))
(<= (next (heading2 south))
	(true (heading2 east))
	(does ship2 (turn clock)))
(<= (next (heading2 west))
	(true (heading2 south))
	(does ship2 (turn clock)))
(<= (next (heading2 north))
	(true (heading2 west))
	(does ship2 (turn clock)))
(<= (next (north-speed2 ?s))
	(true (north-speed2 ?s))
	(does ship2 (turn clock)))
(<= (next (north-speed2 ?s))
	(true (north-speed2 ?s))
	(does ship2 (turn 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 ship2 thrust)
	(speed+ ?s1 ?s2))
(<= (next (north-speed2 ?s2))
	(true (north-speed2 ?s1))
	(true (heading2 south))
	(does ship2 thrust)
	(speed- ?s1 ?s2))
(<= (next (east-speed2 ?s))
	(true (east-speed2 ?s))
	(does ship2 (turn clock)))
(<= (next (east-speed2 ?s))
	(true (east-speed2 ?s))
	(does ship2 (turn 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 ship2 thrust)
	(speed+ ?s1 ?s2))
(<= (next (east-speed2 ?s2))
	(true (east-speed2 ?s1))
	(true (heading2 west))
	(does ship2 thrust)
	(speed- ?s1 ?s2))
(<= (next (x2 ?new))
	(true (x2 ?old))
	(true (east-speed2 ?s))
	(map+ ?old ?s ?new))
(<= (next (y2 ?new))
	(true (y2 ?old))
	(true (north-speed2 ?s))
	(map+ ?old ?s ?new))
;-------------------------------------------------------------

(<= (next (step ?n++))
	(true (step ?n))
	(succ ?n ?n++))
(<= terminal
	(stopped ship1)
	(stopped ship2))
(<= terminal
	timeout)

(<= (goal ?r 100)
	(role ?r)
	(stopped ship1)
	(stopped ship2)
	(atplanet ?n ship1)
	(atplanet ?n ship2)
)
(<= (goal ?r 90)
	(role ?r)
	(stopped ship1)
	(stopped ship2)
	(atplanet ?n1 ship1)
	(atplanet ?n2 ship2)
	(distinct ?n1 ?n2)
)

(<= (goal ?r 75)
	(role ?r)
	(stopped ?r)
	(atplanet ?n ?r)
	(role ?r2)
	(distinct ?r ?r2)
	(stopped ?r2)
	(not (atplanet ?n ?r2))
)
(<= (goal ?r 60)
	(role ?r)
	(stopped ?r)
	(atplanet ?n ?r)
	(role ?r2)
	(distinct ?r ?r2)
	(not (stopped ?r2))
)

(<= (goal ?r 30)
	(role ?r)
	(stopped ?r)
	(not (atplanet1 ?r))
	(not (atplanet2 ?r))
	(not (atplanet3 ?r))
	(not (atplanet4 ?r))
)

(<= (goal ?r 0)
	(role ?r)
	(not (stopped ?r))
)

(<= (stopped ship1)
	(true (north-speed1 0))
	(true (east-speed1 0)))
(<= (stopped ship2)
	(true (north-speed2 0))
	(true (east-speed2 0)))

(<= (atplanet1 ship1)
	(true (x1 5))
	(true (y1 5)))
(<= (atplanet2 ship1)
	(true (x1 5))
	(true (y1 15)))
(<= (atplanet3 ship1)
	(true (x1 15))
	(true (y1 5)))
(<= (atplanet4 ship1)
	(true (x1 15))
	(true (y1 15)))

(<= (atplanet1 ship2)
	(true (x2 5))
	(true (y2 5)))
(<= (atplanet2 ship2)
	(true (x2 5))
	(true (y2 15)))
(<= (atplanet3 ship2)
	(true (x2 15))
	(true (y2 5)))
(<= (atplanet4 ship2)
	(true (x2 15))
	(true (y2 15)))

(<= (atplanet 1 ?r)
	(atplanet1 ?r)
)
(<= (atplanet 2 ?r)
	(atplanet2 ?r)
)
(<= (atplanet 3 ?r)
	(atplanet3 ?r)
)
(<= (atplanet 4 ?r)
	(atplanet4 ?r)
)
(planet 1)
(planet 2)
(planet 3)
(planet 4)

(<= timeout
	(true (step 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 20)
(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 19)
(map+ 2 -2 20)
(map+ 2 -1 1)
(map+ 2 0 2)
(map+ 2 1 3)
(map+ 2 2 4)
(map+ 2 3 5)
(map+ 1 -3 18)
(map+ 1 -2 19)
(map+ 1 -1 20)
(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)
(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))