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

Game Description

(role player)

(init (cell a 1 k))

(init (cell a 2 b))

(init (cell a 3 b))

(init (cell a 4 b))

(init (cell a 5 b))

(init (cell a 6 b))

(init (cell a 7 b))

(init (cell a 8 b))

(init (cell b 1 b))

(init (cell b 2 b))

(init (cell b 3 b))

(init (cell b 4 b))

(init (cell b 5 b))

(init (cell b 6 b))

(init (cell b 7 b))

(init (cell b 8 b))

(init (cell c 1 b))

(init (cell c 2 b))

(init (cell c 3 b))

(init (cell c 4 b))

(init (cell c 5 b))

(init (cell c 6 b))

(init (cell c 7 b))

(init (cell c 8 b))

(init (cell d 1 b))

(init (cell d 2 b))

(init (cell d 3 b))

(init (cell d 4 b))

(init (cell d 5 b))

(init (cell d 6 b))

(init (cell d 7 b))

(init (cell d 8 b))

(init (cell e 1 b))

(init (cell e 2 b))

(init (cell e 3 b))

(init (cell e 4 b))

(init (cell e 5 b))

(init (cell e 6 b))

(init (cell e 7 b))

(init (cell e 8 b))

(init (cell f 1 b))

(init (cell f 2 b))

(init (cell f 3 b))

(init (cell f 4 b))

(init (cell f 5 b))

(init (cell f 6 b))

(init (cell f 7 b))

(init (cell f 8 b))

(init (cell g 1 b))

(init (cell g 2 b))

(init (cell g 3 b))

(init (cell g 4 b))

(init (cell g 5 b))

(init (cell g 6 b))

(init (cell g 7 b))

(init (cell g 8 b))

(init (cell h 1 b))

(init (cell h 2 b))

(init (cell h 3 b))

(init (cell h 4 b))

(init (cell h 5 b))

(init (cell h 6 b))

(init (cell h 7 b))

(init (cell h 8 b))

(init (step 1))

(<= (next (cell ?x ?y k))

    (does player (move ?x ?y)))

(<= (next (cell ?x ?y o))

    (true (cell ?x ?y k)))

(<= (next (cell ?x ?y o))

    (true (cell ?x ?y o)))

(<= (next (cell ?x ?y b))

    (true (cell ?x ?y b))

    (not (does player (move ?x ?y))))

(<= (next (step ?y))

    (true (step ?x))

    (succ ?x ?y))

(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)

(<= (legal player (move ?x ?y))

    (true (cell ?u ?v k))

    (true (cell ?x ?y b))

    (knightmove ?u ?v ?x ?y))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?u ?w)

    (nextcolumn ?w ?x)

    (adjacent ?v ?y))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?x ?w)

    (nextcolumn ?w ?u)

    (adjacent ?v ?y))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?u ?w)

    (nextcolumn ?w ?x)

    (adjacent ?y ?v))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?x ?w)

    (nextcolumn ?w ?u)

    (adjacent ?y ?v))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?u ?x)

    (adjacent ?v ?w)

    (adjacent ?w ?y))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?u ?x)

    (adjacent ?y ?w)

    (adjacent ?w ?v))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?x ?u)

    (adjacent ?v ?w)

    (adjacent ?w ?y))

(<= (knightmove ?u ?v ?x ?y)

    (nextcolumn ?x ?u)

    (adjacent ?y ?w)

    (adjacent ?w ?v))

(adjacent 1 2)

(adjacent 2 3)

(adjacent 3 4)

(adjacent 4 5)

(adjacent 5 6)

(adjacent 6 7)

(adjacent 7 8)

(nextcolumn a b)

(nextcolumn b c)

(nextcolumn c d)

(nextcolumn d e)

(nextcolumn e f)

(nextcolumn f g)

(nextcolumn g h)

(<= (goal player 100)

    (true (step 64)))

(<= (goal player 90)

    (true (step ?x))

	(smaller ?x 64)

	(smaller 61 ?x))

(<= (goal player 80)

    (true (step ?x))

	(smaller ?x 62)

	(smaller 59 ?x))

(<= (goal player 70)

    (true (step ?x))

	(smaller ?x 60)

	(smaller 55 ?x))

(<= (goal player 60)

    (true (step ?x))

	(smaller ?x 56)

	(smaller 51 ?x))

(<= (goal player 50)

    (true (step ?x))

	(smaller ?x 52)

	(smaller 47 ?x))

(<= (goal player 40)

    (true (step ?x))

	(smaller ?x 48)

	(smaller 43 ?x))

(<= (goal player 30)

    (true (step ?x))

	(smaller ?x 44)

	(smaller 39 ?x))

(<= (goal player 20)

    (true (step ?x))

	(smaller ?x 40)

	(smaller 35 ?x))

(<= (goal player 10)

    (true (step ?x))

	(smaller ?x 36)

	(smaller 31 ?x))

(<= (goal player 0)

    (true (step ?x))

	(smaller ?x 32))

(<= terminal

    (not existslegalmove))

(<= existslegalmove

    (true (cell ?u ?v k))

    (true (cell ?x ?y b))

    (knightmove ?u ?v ?x ?y))

(<= (smaller ?x ?y)

	(succ ?x ?y))

(<= (smaller ?x ?y)

	(succ ?z ?y)

	(smaller ?x ?z))

sees_XML(...) rules

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