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

Game Description

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;
;;; Chinesecheckers6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;

   (role red)
   (role yellow)
   (role green)
   (role teal)
   (role blue)
   (role magenta)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;

   (init (cell a1 red))
   (init (cell b1 red))
   (init (cell b2 red))
   (init (cell c1 magenta))
   (init (cell c2 magenta))
   (init (cell c3 blank))
   (init (cell c4 blank))
   (init (cell c5 blank))
   (init (cell c6 yellow))
   (init (cell c7 yellow))
   (init (cell d1 magenta))
   (init (cell d2 blank))
   (init (cell d3 blank))
   (init (cell d4 blank))
   (init (cell d5 blank))
   (init (cell d6 yellow))
   (init (cell e1 blank))
   (init (cell e2 blank))
   (init (cell e3 blank))
   (init (cell e4 blank))
   (init (cell e5 blank))
   (init (cell f1 blue))
   (init (cell f2 blank))
   (init (cell f3 blank))
   (init (cell f4 blank))
   (init (cell f5 blank))
   (init (cell f6 green))
   (init (cell g1 blue))
   (init (cell g2 blue))
   (init (cell g3 blank))
   (init (cell g4 blank))
   (init (cell g5 blank))
   (init (cell g6 green))
   (init (cell g7 green))
   (init (cell h1 teal))
   (init (cell h2 teal))
   (init (cell i1 teal))
   (init (control red))
   (init (step 1))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;

   (<= (next (cell ?e ?player))
       (does ?player (move ?b ?e)))

   (<= (next (cell ?b blank))
       (does ?player (move ?b ?e)))

   (<= (next (cell ?x ?z))
       (true (cell ?x ?z))
       (does ?player (move ?b ?e))
       (distinct ?x ?b)
       (distinct ?x ?e))

   (<= (next (cell ?x ?z))
       (true (cell ?x ?z))
       (does red noop)
       (does yellow noop)
       (does green noop)
       (does teal noop)
       (does blue noop)
       (does magenta noop))

   (<= (next (control yellow))
       (true (control red)))

   (<= (next (control green))
       (true (control yellow)))

   (<= (next (control teal))
       (true (control green)))

   (<= (next (control blue))
       (true (control teal)))

   (<= (next (control magenta))
       (true (control blue)))

   (<= (next (control red))
       (true (control magenta)))

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

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;

   (<= (legal ?player (move ?b ?e))
       (true (control ?player))
       (movable ?player ?b ?e))

   (<= (legal ?player noop)
       (role ?player))


   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (car ?player ?b ?c)
       (true (cell ?c ?p1))
       (distinct ?p1 blank)
       (car ?player ?c ?x)
       (true (cell ?x blank))
       (car ?player ?x ?d)
       (true (cell ?d ?p2))
       (distinct ?p2 blank)
       (car ?player ?d ?e)
       (true (cell ?e blank)))

   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (car ?player ?b ?c)
       (true (cell ?c ?p1))
       (distinct ?p1 blank)
       (car ?player ?c ?x)
       (true (cell ?x blank))
       (cdr ?player ?x ?d)
       (true (cell ?d ?p2))
       (distinct ?p2 blank)
       (cdr ?player ?d ?e)
       (true (cell ?e blank)))

   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (cdr ?player ?b ?c)
       (true (cell ?c ?p1))
       (distinct ?p1 blank)
       (cdr ?player ?c ?x)
       (true (cell ?x blank))
       (car ?player ?x ?d)
       (true (cell ?d ?p2))
       (distinct ?p2 blank)
       (car ?player ?d ?e)
       (true (cell ?e blank)))

   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (cdr ?player ?b ?c)
       (true (cell ?c ?p1))
       (distinct ?p1 blank)
       (cdr ?player ?c ?x)
       (true (cell ?x blank))
       (cdr ?player ?x ?d)
       (true (cell ?d ?p2))
       (distinct ?p2 blank)
       (cdr ?player ?d ?e)
       (true (cell ?e blank)))

   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (car ?player ?b ?c)
       (true (cell ?c ?p))
       (distinct ?p blank)
       (car ?player ?c ?e)
       (true (cell ?e blank)))

   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (cdr ?player ?b ?c)
       (true (cell ?c ?p))
       (distinct ?p blank)
       (cdr ?player ?c ?e)
       (true (cell ?e blank)))

   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (car ?player ?b ?e)
       (true (cell ?e blank)))

   (<= (movable ?player ?b ?e)
       (true (cell ?b ?player))
       (cdr ?player ?b ?e)
       (true (cell ?e blank)))


   (<= (car red ?b ?e)
       (carred ?b ?e))

   (<= (car yellow ?b ?e)
       (caryellow ?b ?e))

   (<= (car green ?b ?e)
       (carmagenta ?e ?b))

   (<= (car teal ?b ?e)
       (carred ?e ?b))

   (<= (car blue ?b ?e)
       (caryellow ?e ?b))

   (<= (car magenta ?b ?e)
       (carmagenta ?b ?e))

   (<= (cdr red ?b ?e)
       (cdrred ?b ?e))

   (<= (cdr yellow ?b ?e)
       (cdryellow ?b ?e))

   (<= (cdr green ?b ?e)
       (cdrmagenta ?e ?b))

   (<= (cdr teal ?b ?e)
       (cdrred ?e ?b))

   (<= (cdr blue ?b ?e)
       (cdryellow ?e ?b))

   (<= (cdr magenta ?b ?e)
       (cdrmagenta ?b ?e))


   (carmagenta c1 d1)
   (carmagenta d1 e1)
   (carmagenta c2 d2)
   (carmagenta e1 f2)
   (carmagenta d2 e2)
   (carmagenta c3 d3)
   (carmagenta f2 g3)
   (carmagenta e2 f3)
   (carmagenta d3 e3)
   (carmagenta c4 d4)
   (carmagenta f3 g4)
   (carmagenta e3 f4)
   (carmagenta d4 e4)
   (carmagenta c5 d5)
   (carmagenta f4 g5)
   (carmagenta e4 f5)
   (carmagenta d5 e5)
   (carmagenta f5 g6)
   (carmagenta e5 f6)
   (carmagenta f6 g7)

   (cdrmagenta c1 c2)
   (cdrmagenta d1 d2)
   (cdrmagenta c2 c3)
   (cdrmagenta e1 e2)
   (cdrmagenta d2 d3)
   (cdrmagenta c3 c4)
   (cdrmagenta f2 f3)
   (cdrmagenta e2 e3)
   (cdrmagenta d3 d4)
   (cdrmagenta c4 c5)
   (cdrmagenta g3 g4)
   (cdrmagenta f3 f4)
   (cdrmagenta e3 e4)
   (cdrmagenta d4 d5)
   (cdrmagenta g4 g5)
   (cdrmagenta f4 f5)
   (cdrmagenta e4 e5)
   (cdrmagenta g5 g6)
   (cdrmagenta f5 f6)
   (cdrmagenta g6 g7)

   (carred a1 b1)
   (carred b1 c3)
   (carred b2 c4)
   (carred c3 d2)
   (carred c4 d3)
   (carred c5 d4)
   (carred d2 e1)
   (carred d3 e2)
   (carred d4 e3)
   (carred d5 e4)
   (carred e2 f2)
   (carred e3 f3)
   (carred e4 f4)
   (carred e5 f5)
   (carred f3 g3)
   (carred f4 g4)
   (carred f5 g5)
   (carred g4 h1)
   (carred g5 h2)
   (carred h2 i1)

   (cdrred a1 b2)
   (cdrred b1 c4)
   (cdrred b2 c5)
   (cdrred c3 d3)
   (cdrred c4 d4)
   (cdrred c5 d5)
   (cdrred d2 e2)
   (cdrred d3 e3)
   (cdrred d4 e4)
   (cdrred d5 e5)
   (cdrred e1 f2)
   (cdrred e2 f3)
   (cdrred e3 f4)
   (cdrred e4 f5)
   (cdrred f2 g3)
   (cdrred f3 g4)
   (cdrred f4 g5)
   (cdrred g3 h1)
   (cdrred g4 h2)
   (cdrred h1 i1)

   (caryellow c7 c6)
   (caryellow c6 c5)
   (caryellow d6 d5)
   (caryellow c5 c4)
   (caryellow d5 d4)
   (caryellow e5 e4)
   (caryellow c4 c3)
   (caryellow d4 d3)
   (caryellow e4 e3)
   (caryellow f5 f4)
   (caryellow g5 g4)
   (caryellow d3 d2)
   (caryellow e3 e2)
   (caryellow f4 f3)
   (caryellow e2 e1)
   (caryellow f3 f2)
   (caryellow g4 g3)
   (caryellow f2 f1)
   (caryellow g3 g2)
   (caryellow g2 g1)

   (cdryellow c7 d6)
   (cdryellow c6 d5)
   (cdryellow d6 e5)
   (cdryellow c5 d4)
   (cdryellow d5 e4)
   (cdryellow e5 f5)
   (cdryellow c4 d3)
   (cdryellow d4 e3)
   (cdryellow e4 f4)
   (cdryellow f5 g5)
   (cdryellow c3 d2)
   (cdryellow d3 e2)
   (cdryellow e3 f3)
   (cdryellow f4 g4)
   (cdryellow d2 e1)
   (cdryellow e2 f2)
   (cdryellow f3 g3)
   (cdryellow e1 f1)
   (cdryellow f2 g2)
   (cdryellow f1 g1)
   
   (coordinate a1)
   (coordinate b1)
   (coordinate b2)
   (coordinate c1)
   (coordinate c2)
   (coordinate c3)
   (coordinate c4)
   (coordinate c5)
   (coordinate c7)
   (coordinate c6)
   (coordinate d1)
   (coordinate d2)
   (coordinate d3)
   (coordinate d4)
   (coordinate d5)
   (coordinate d6)
   (coordinate e1)
   (coordinate e2)
   (coordinate e3)
   (coordinate e4)
   (coordinate e5)
   (coordinate f1)
   (coordinate f2)
   (coordinate f3)
   (coordinate f4)
   (coordinate f5)
   (coordinate f6)
   (coordinate g1)
   (coordinate g2)
   (coordinate g3)
   (coordinate g4)
   (coordinate g5)
   (coordinate g6)
   (coordinate g7)
   (coordinate h1)
   (coordinate h2)
   (coordinate i1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;

   (<= (goal red ?payoff)
       (count h1 h2 i1 red ?payoff))

   (<= (goal yellow ?payoff)
       (count f1 g1 g2 yellow ?payoff))

   (<= (goal green ?payoff)
       (count c1 c2 d1 green ?payoff))

   (<= (goal teal ?payoff)
       (count a1 b1 b2 teal ?payoff))

   (<= (goal blue ?payoff)
       (count c6 c7 d6 blue ?payoff))

   (<= (goal magenta ?payoff)
       (count f6 g6 g7 magenta ?payoff))

   (<= (count ?x ?y ?z ?player 100)
       (true (cell ?x ?player))
       (true (cell ?y ?player))
       (true (cell ?z ?player)))

   (<= (count ?x ?y ?z ?player 50)
       (true (cell ?x ?player))
       (true (cell ?y ?player))
       (devoid ?z ?player))

   (<= (count ?x ?y ?z ?player 50)
       (true (cell ?x ?player))
       (devoid ?y ?player)
       (true (cell ?z ?player)))

   (<= (count ?x ?y ?z ?player 50)
       (devoid ?x ?player)
       (true (cell ?y ?player))
       (true (cell ?z ?player)))

   (<= (count ?x ?y ?z ?player 25)
       (true (cell ?x ?player))
       (devoid ?y ?player)
       (devoid ?z ?player))

   (<= (count ?x ?y ?z ?player 25)
       (devoid ?x ?player)
       (true (cell ?y ?player))
       (devoid ?z ?player))

   (<= (count ?x ?y ?z ?player 25)
       (devoid ?x ?player)
       (devoid ?y ?player)
       (true (cell ?z ?player)))

   (<= (count ?x ?y ?z ?player 0)
       (devoid ?x ?player)
       (devoid ?y ?player)
       (devoid ?z ?player)
       (role ?player))


   (<= (devoid ?x ?player)
       (true (cell ?x ?person))
       (role ?person)
       (distinct ?person ?player)
       (role ?player))

   (<= (devoid ?x ?player)
       (true (cell ?x blank))
       (role ?player))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;

   (<= terminal
       (true (step 60)))

   (<= terminal
       (goal ?player 100))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
;;;;;;;;

sees_XML(...) rules

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