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

Game Description

(role white)
(role black)
(init (location 2 1 whiteknight))
(init (location 3 1 whitebishop))
(init (location 4 1 whiterook))
(init (location 5 1 whiterook))
(init (location 6 1 whitebishop))
(init (location 7 1 whiteknight))
(init (location 3 2 whitepawn))
(init (location 4 2 whitepawn))
(init (location 5 2 whitepawn))
(init (location 6 2 whitepawn))
(init (location 3 7 blackpawn))
(init (location 4 7 blackpawn))
(init (location 5 7 blackpawn))
(init (location 6 7 blackpawn))
(init (location 2 8 blackknight))
(init (location 3 8 blackbishop))
(init (location 4 8 blackrook))
(init (location 5 8 blackrook))
(init (location 6 8 blackbishop))
(init (location 7 8 blackknight))
(init (cellofflimits 4 4))
(init (cellofflimits 4 5))
(init (cellofflimits 5 4))
(init (cellofflimits 5 5))
(init (capturecount white 0))
(init (capturecount black 0))
(init (control white))
(init (step 1))
(<= (legal ?player (move ?x1 ?y1 ?x2 ?y2))
    (true (control ?player))
    (celloccupiedby ?x1 ?y1 ?player)
    (validmove ?x1 ?y1 ?x2 ?y2)
    (not (true (cellofflimits ?x2 ?y2)))
    (not (celloccupiedby ?x2 ?y2 ?player)))
(<= (legal ?player noop)
    (role ?player)
    (not (true (control ?player))))
(<= (next (location ?x2 ?y2 ?piece))
    (role ?player)
    (does ?player (move ?x1 ?y1 ?x2 ?y2))
    (true (location ?x1 ?y1 ?piece))
    (not (type ?piece pawn)))
(<= (next (location ?x2 ?y2 ?piece))
    (does white (move ?x1 ?y1 ?x2 ?y2))
    (true (location ?x1 ?y1 ?piece))
    (type ?piece pawn)
    (distinct ?y2 8))
(<= (next (location ?x2 8 whitequeen))
    (does white (move ?x1 ?y1 ?x2 8))
    (true (location ?x1 ?y1 ?piece))
    (type ?piece pawn))
(<= (next (location ?x2 ?y2 ?piece))
    (does black (move ?x1 ?y1 ?x2 ?y2))
    (true (location ?x1 ?y1 ?piece))
    (type ?piece pawn)
    (distinct ?y2 1))
(<= (next (location ?x2 1 blackqueen))
    (does black (move ?x1 ?y1 ?x2 1))
    (true (location ?x1 ?y1 ?piece))
    (type ?piece pawn))
(<= (next (location ?x ?y ?piece))
    (true (location ?x ?y ?piece))
    (role ?player)
    (does ?player (move ?x1 ?y1 ?x2 ?y2))
    (distinctcell ?x ?y ?x1 ?y1)
    (distinctcell ?x ?y ?x2 ?y2))
(<= (next (capturecount ?player ?count))
    (true (capturecount ?player ?count))
    (not (true (control ?player))))
(<= (next (capturecount ?player ?count))
    (true (capturecount ?player ?count))
    (does ?player (move ?x1 ?y1 ?x2 ?y2))
    (role ?opponent)
    (not (true (control ?opponent)))
    (not (celloccupiedby ?x2 ?y2 ?opponent)))
(<= (next (capturecount ?player ?count2))
    (true (capturecount ?player ?count1))
    (does ?player (move ?x1 ?y1 ?x2 ?y2))
    (role ?opponent)
    (not (true (control ?opponent)))
    (celloccupiedby ?x2 ?y2 ?opponent)
    (countplus ?count1 ?count2))
(<= (next (control white))
    (true (control black)))
(<= (next (control black))
    (true (control white)))
(<= (next (cellofflimits ?x ?y))
    (true (cellofflimits ?x ?y)))
(<= (next (step ?tpp))
    (true (step ?t))
    (pp ?t ?tpp))
(<= terminal
    (role ?player)
    (not (haspiece ?player)))
(<= terminal
    (role ?player)
    (not (haslegalmove ?player)))
(<= terminal
    (true (step 60)))
(<= (goal ?player ?goal)
    (role ?player)
    (true (capturecount ?player ?count))
    (scoremap ?count ?goal))
(<= (validmove ?x1 ?y1 ?x2 ?y2)
    (true (location ?x1 ?y1 ?piece))
    (type ?piece pawn)
    (owns ?piece white)
    (whitepawnmove ?x1 ?y1 ?x2 ?y2))
(<= (validmove ?x1 ?y1 ?x2 ?y2)
    (true (location ?x1 ?y1 ?piece))
    (type ?piece pawn)
    (owns ?piece black)
    (blackpawnmove ?x1 ?y1 ?x2 ?y2))
(<= (validmove ?x1 ?y1 ?x2 ?y2)
    (true (location ?x1 ?y1 ?piece))
    (type ?piece rook)
    (rookmove ?x1 ?y1 ?x2 ?y2))
(<= (validmove ?x1 ?y1 ?x2 ?y2)
    (true (location ?x1 ?y1 ?piece))
    (type ?piece knight)
    (knightmove ?x1 ?y1 ?x2 ?y2))
(<= (validmove ?x1 ?y1 ?x2 ?y2)
    (true (location ?x1 ?y1 ?piece))
    (type ?piece bishop)
    (bishopmove ?x1 ?y1 ?x2 ?y2))
(<= (validmove ?x1 ?y1 ?x2 ?y2)
    (true (location ?x1 ?y1 ?piece))
    (type ?piece queen)
    (queenmove ?x1 ?y1 ?x2 ?y2))
(<= (validmove ?x1 ?y1 ?x2 ?y2)
    (true (location ?x1 ?y1 ?piece))
    (type ?piece king)
    (kingmove ?x1 ?y1 ?x2 ?y2))
(<= (whitepawnmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y1 ?y2)
    (celloccupiedby ?x2 ?y2 black))
(<= (whitepawnmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x2 ?x1)
    (plus 1 ?y1 ?y2)
    (celloccupiedby ?x2 ?y2 black))
(<= (blackpawnmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y2 ?y1)
    (celloccupiedby ?x2 ?y2 white))
(<= (blackpawnmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x2 ?x1)
    (plus 1 ?y2 ?y1)
    (celloccupiedby ?x2 ?y2 white))
(<= (rookmove ?x1 ?y1 ?x2 ?y2)
    (horizontalmove ?x1 ?y1 ?x2 ?y2))
(<= (rookmove ?x1 ?y1 ?x2 ?y2)
    (horizontalmove ?x2 ?y2 ?x1 ?y1))
(<= (rookmove ?x1 ?y1 ?x2 ?y2)
    (verticalmove ?x1 ?y1 ?x2 ?y2))
(<= (rookmove ?x1 ?y1 ?x2 ?y2)
    (verticalmove ?x2 ?y2 ?x1 ?y1))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?x1 ?x2)
    (plus 1 ?y1 ?y2))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?x1 ?x2)
    (plus 1 ?y2 ?y1))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?x2 ?x1)
    (plus 1 ?y1 ?y2))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?x2 ?x1)
    (plus 1 ?y2 ?y1))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?y1 ?y2)
    (plus 1 ?x1 ?x2))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?y1 ?y2)
    (plus 1 ?x2 ?x1))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?y2 ?y1)
    (plus 1 ?x1 ?x2))
(<= (knightmove ?x1 ?y1 ?x2 ?y2)
    (plus 2 ?y2 ?y1)
    (plus 1 ?x2 ?x1))
(<= (bishopmove ?x1 ?y1 ?x2 ?y2)
    (diagonalupmove ?x1 ?y1 ?x2 ?y2))
(<= (bishopmove ?x1 ?y1 ?x2 ?y2)
    (diagonalupmove ?x2 ?y2 ?x1 ?y1))
(<= (bishopmove ?x1 ?y1 ?x2 ?y2)
    (diagonaldownmove ?x1 ?y1 ?x2 ?y2))
(<= (bishopmove ?x1 ?y1 ?x2 ?y2)
    (diagonaldownmove ?x2 ?y2 ?x1 ?y1))
(<= (queenmove ?x1 ?y1 ?x2 ?y2)
    (rookmove ?x1 ?y1 ?x2 ?y2))
(<= (queenmove ?x1 ?y1 ?x2 ?y2)
    (bishopmove ?x1 ?y1 ?x2 ?y2))
(<= (kingmove ?x1 ?y ?x2 ?y)
    (plus 1 ?x1 ?x2)
    (index ?y))
(<= (kingmove ?x1 ?y ?x2 ?y)
    (plus 1 ?x2 ?x1)
    (index ?y))
(<= (kingmove ?x ?y1 ?x ?y2)
    (plus 1 ?y1 ?y2)
    (index ?x))
(<= (kingmove ?x ?y1 ?x ?y2)
    (plus 1 ?y2 ?y1)
    (index ?x))
(<= (kingmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y1 ?y2))
(<= (kingmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x2 ?x1)
    (plus 1 ?y1 ?y2))
(<= (kingmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y2 ?y1))
(<= (kingmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x2 ?x1)
    (plus 1 ?y2 ?y1))
(<= (horizontalmove ?x1 ?y ?x3 ?y)
    (plus 1 ?x1 ?x2)
    (cellempty ?x2 ?y)
    (horizontalmove ?x2 ?y ?x3 ?y)
    (index ?y))
(<= (horizontalmove ?x1 ?y ?x2 ?y)
    (plus 1 ?x1 ?x2)
    (index ?y))
(<= (verticalmove ?x ?y1 ?x ?y3)
    (plus 1 ?y1 ?y2)
    (cellempty ?x ?y2)
    (verticalmove ?x ?y2 ?x ?y3)
    (index ?x))
(<= (verticalmove ?x ?y1 ?x ?y2)
    (plus 1 ?y1 ?y2)
    (index ?x))
(<= (diagonalupmove ?x1 ?y1 ?x3 ?y3)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y1 ?y2)
    (cellempty ?x2 ?y2)
    (diagonalupmove ?x2 ?y2 ?x3 ?y3))
(<= (diagonalupmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y1 ?y2))
(<= (diagonaldownmove ?x1 ?y1 ?x3 ?y3)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y2 ?y1)
    (cellempty ?x2 ?y2)
    (diagonaldownmove ?x2 ?y2 ?x3 ?y3))
(<= (diagonaldownmove ?x1 ?y1 ?x2 ?y2)
    (plus 1 ?x1 ?x2)
    (plus 1 ?y2 ?y1))
(<= (haslegalmove ?player)
    (celloccupiedby ?x1 ?y1 ?player)
    (validmove ?x1 ?y1 ?x2 ?y2)
    (not (celloccupiedby ?x2 ?y2 ?player)))
(<= (haspiece ?player)
    (true (location ?x ?y ?piece))
    (owns ?piece ?player))
(<= (distinctcell ?x1 ?y1 ?x2 ?y2)
    (cell ?x1 ?y1)
    (cell ?x2 ?y2)
    (distinct ?x1 ?x2))
(<= (distinctcell ?x1 ?y1 ?x2 ?y2)
    (cell ?x1 ?y1)
    (cell ?x2 ?y2)
    (distinct ?y1 ?y2))
(<= (celloccupiedby ?x ?y ?player)
    (true (location ?x ?y ?piece))
    (owns ?piece ?player))
(<= (cellempty ?x ?y)
    (cell ?x ?y)
    (not (true (cellofflimits ?x ?y)))
    (not (celloccupiedby ?x ?y black))
    (not (celloccupiedby ?x ?y white)))
(<= (cell ?x ?y)
    (index ?x)
    (index ?y))
(index 1)
(index 2)
(index 3)
(index 4)
(index 5)
(index 6)
(index 7)
(index 8)
(plus 1 1 2)
(plus 1 2 3)
(plus 1 3 4)
(plus 1 4 5)
(plus 1 5 6)
(plus 1 6 7)
(plus 1 7 8)
(plus 2 1 3)
(plus 2 2 4)
(plus 2 3 5)
(plus 2 4 6)
(plus 2 5 7)
(plus 2 6 8)
(countplus 0 1)
(countplus 1 2)
(countplus 2 3)
(countplus 3 4)
(countplus 4 5)
(countplus 5 6)
(countplus 6 7)
(countplus 7 8)
(countplus 8 9)
(countplus 9 10)
(countplus 10 11)
(countplus 11 12)
(countplus 12 13)
(countplus 13 14)
(countplus 14 15)
(countplus 15 16)
(pp 1 2)
(pp 2 3)
(pp 3 4)
(pp 4 5)
(pp 5 6)
(pp 6 7)
(pp 7 8)
(pp 8 9)
(pp 9 10)
(pp 10 11)
(pp 11 12)
(pp 12 13)
(pp 13 14)
(pp 14 15)
(pp 15 16)
(pp 16 17)
(pp 17 18)
(pp 18 19)
(pp 19 20)
(pp 20 21)
(pp 21 22)
(pp 22 23)
(pp 23 24)

(pp 24 25)
(pp 25 26)
(pp 26 27)
(pp 27 28)
(pp 28 29)
(pp 29 30)
(pp 30 31)
(pp 31 32)
(pp 32 33)
(pp 33 34)
(pp 34 35)
(pp 35 36)
(pp 36 37)
(pp 37 38)
(pp 38 39)
(pp 39 40)
(pp 40 41)
(pp 41 42)
(pp 42 43)
(pp 43 44)
(pp 44 45)
(pp 45 46)
(pp 46 47)
(pp 47 48)
(pp 48 49)
(pp 49 50)
(pp 50 51)
(pp 51 52)
(pp 52 53)
(pp 53 54)
(pp 54 55)
(pp 55 56)
(pp 56 57)
(pp 57 58)
(pp 58 59)
(pp 59 60)
(pp 60 61)
(pp 61 62)
(pp 62 63)
(pp 63 64)
(pp 64 65)
(pp 65 66)
(pp 66 67)
(pp 67 68)
(pp 68 69)
(pp 69 70)
(pp 70 71)
(pp 71 72)
(pp 72 73)
(pp 73 74)
(pp 74 75)
(pp 75 76)
(pp 76 77)
(pp 77 78)
(pp 78 79)
(pp 79 80)
(pp 80 81)
(pp 81 82)
(pp 82 83)
(pp 83 84)
(pp 84 85)
(pp 85 86)
(pp 86 87)
(pp 87 88)
(pp 88 89)
(pp 89 90)
(pp 90 91)
(pp 91 92)
(pp 92 93)
(pp 93 94)
(pp 94 95)
(pp 95 96)
(pp 96 97)
(pp 97 98)
(pp 98 99)
(pp 99 100)
(scoremap 0 0)
(scoremap 1 10)
(scoremap 2 20)
(scoremap 3 30)
(scoremap 4 40)
(scoremap 5 50)
(scoremap 6 60)
(scoremap 7 70)
(scoremap 8 80)
(scoremap 9 90)
(scoremap 10 100)
(owns whitepawn white)
(owns whiterook white)
(owns whiteknight white)
(owns whitebishop white)
(owns whitequeen white)
(owns whiteking white)
(owns blackpawn black)
(owns blackrook black)
(owns blackknight black)
(owns blackbishop black)
(owns blackqueen black)
(owns blackking black)
(type whitepawn pawn)
(type whiterook rook)
(type whiteknight knight)
(type whitebishop bishop)
(type whitequeen queen)
(type whiteking king)
(type blackpawn pawn)
(type blackrook rook)
(type blackknight knight)
(type blackbishop bishop)
(type blackqueen queen)
(type blackking king)

sees_XML(...) rules

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

(<= (sees_xml1 ?f) (true ?f))
; show cells that are off limit as red circle
(<= (sees_xml1 (location ?x ?y red))
    (true (cellofflimits ?x ?y))
)