You are not logged in. login register
Game farmers
name farmers
creator xsheng
number of roles 3
stylesheet generic/generic.xsl
GDL v1
enabled
matches show matches
statistics show game statistics
description

Game Description

(role alice)
(role barney)
(role charlie)
(init (money alice 25))
(init (money barney 25))
(init (money charlie 25))
(init (market wheat 4))
(init (market flour 10))
(init (market cotton 7))
(init (market cloth 14))
(init (state 0))
(structure farm)
(structure factory)
(commodity cotton)
(commodity cloth)
(commodity wheat)
(commodity flour)
(price farm 10)
(price factory 20)
(growable cotton)
(growable wheat)
(used-in cotton cloth)
(used-in wheat flour)
(endstate 10)
(<= (next (market ?g ?x))
    (true (market ?g ?x1))
    (selling ?g ?x2)
    (buying ?g ?x3)
    (sum ?x1 1 ?x4)
    (sum ?x4 ?x3 ?x5)
    (minus ?x5 ?x2 ?x))
(<= (next (market ?g 0))
    (true (market ?g ?x1))
    (selling ?g ?x2)
    (distinct ?x2 0)
    (buying ?g ?x3)
    (sum ?x1 1 ?x4)
    (sum ?x4 ?x3 ?x5)
    (gte ?x2 ?x5))
(<= (sells ?r ?g 2)
    (does ?r (sell ?g)))
(<= (sells ?r ?g 0)
    (role ?r)
    (commodity ?g)
    (not (does ?r (sell ?g))))
(<= (selling ?g ?x)
    (sells alice ?g ?x1)
    (sells barney ?g ?x2)
    (sells charlie ?g ?x3)
    (sum ?x1 ?x2 ?x4)
    (sum ?x4 ?x3 ?x))
(<= (buys ?r ?g 2)
    (does ?r (buy ?g)))
(<= (buys ?r ?g 0)
    (role ?r)
    (commodity ?g)
    (not (does ?r (buy ?g))))
(<= (buying ?g ?x)
    (buys alice ?g ?x1)
    (buys barney ?g ?x2)
    (buys charlie ?g ?x3)
    (sum ?x1 ?x2 ?x4)
    (sum ?x4 ?x3 ?x))
(<= (next (state ?x))
    (true (state ?y))
    (succ ?y ?x))
(<= terminal
    (endstate ?x)
    (true (state ?x)))
(<= (goal ?r1 100)
    terminal
    (true (money ?r1 ?x))
    (true (money ?r2 ?y))
    (true (money ?r3 ?z))
    (distinct ?r1 ?r2)
    (distinct ?r1 ?r3)
    (distinct ?r2 ?r3)
    (gte ?x ?y)
    (gte ?x ?z))
(<= (goal ?r1 0)
    terminal
    (true (money ?r1 ?x))
    (true (money ?r2 ?y))
    (true (money ?r3 ?z))
    (distinct ?r1 ?r2)
    (distinct ?r1 ?r3)
    (distinct ?r2 ?r3)
    (or (not (gte ?x ?y)) (not (gte ?x ?z))))
(<= (legal ?r (build ?structure))
    (role ?r)
    (structure ?structure)
    (price ?structure ?p)
    (true (money ?r ?m))
    (not (true (controls ?r ?structure)))
    (gte ?m ?p))
(<= (legal ?r (manufacture ?g))
    (true (controls ?r factory))
    (used-in ?h ?g)
    (true (inventory ?r ?h)))
(<= (legal ?r (sell ?g))
    (true (inventory ?r ?g)))
(<= (legal ?r (buy ?g))
    (true (market ?g ?p))
    (not (true (inventory ?r ?g)))
    (true (money ?r ?x))
    (gte ?x ?p))
(<= (legal ?r (grow ?g))
    (true (controls ?r farm))
    (growable ?g)
    (not (true (inventory ?r ?g))))
(<= (legal ?r noop)
    (role ?r))
(<= (next (controls ?r ?structure))
    (does ?r (build ?structure)))
(<= (next (controls ?r ?structure))
    (true (controls ?r ?structure)))
(<= (next (inventory ?r ?g))
    (does ?r (manufacture ?g)))
(<= (next (inventory ?r ?g))
    (does ?r (grow ?g)))
(<= (next (inventory ?r ?h))
    (does ?r (manufacture ?g))
    (not (used-in ?h ?g))
    (commodity ?h))
(<= (next (inventory ?r ?h))
    (does ?r (sell ?g))
    (true (inventory ?r ?h))
    (distinct ?g ?h))
(<= (next (inventory ?r ?h))
    (does ?r (build ?s))
    (true (inventory ?r ?h)))
(<= (next (inventory ?r ?h))
    (does ?r noop)
    (true (inventory ?r ?h)))
(<= (next (inventory ?r ?g))
    (does ?r (buy ?g)))
(<= (next (money ?r ?x))
    (does ?r (build ?structure))
    (true (money ?r ?y))
    (price ?structure ?p)
    (minus ?y ?p ?x))
(<= (next (money ?r ?x))
    (does ?r (sell ?g))
    (true (market ?g ?z))
    (true (money ?r ?y))
    (sum ?y ?z ?x))
(<= (next (money ?r ?x))
    (does ?r (buy ?g))
    (true (market ?g ?z))
    (true (money ?r ?y))
    (minus ?y ?z ?x))
(<= (next (money ?r ?x))
    (true (money ?r ?x))
    (does ?r (grow ?g)))
(<= (next (money ?r ?x))
    (true (money ?r ?x))
    (does ?r (manufacture ?g)))
(<= (next (money ?r ?x))
    (true (money ?r ?x))
    (does ?r noop))
(<= (gte ?x 0)
    (number ?x))
(<= (gte 80 ?x)
    (number ?x))
(<= (gte ?x ?x)
    (number ?x))
(<= (gte ?x ?z)
    (succ ?y ?x)
    (gte ?y ?z))
(<= (gte ?x ?y)
    (succ ?y ?x))
(<= (sum ?x 0 ?x)
    (number ?x))
(<= (sum ?x ?y ?z)
    (succ ?x ?m)
    (succ ?n ?y)
    (sum ?m ?n ?z))
(<= (minus ?x 0 ?x)
    (number ?x))
(<= (minus ?x ?y ?z)
    (succ ?m ?x)
    (succ ?n ?y)
    (minus ?m ?n ?z))
(succ 0 1)
(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)
(succ 64 65)
(succ 65 66)
(succ 66 67)
(succ 67 68)
(succ 68 69)
(succ 69 70)
(succ 70 71)
(succ 71 72)
(succ 72 73)
(succ 73 74)
(succ 74 75)
(succ 75 76)
(succ 76 77)
(succ 77 78)
(succ 78 79)
(succ 79 80)
(succ 80 81)
(succ 81 82)
(succ 82 83)
(succ 83 84)
(succ 84 85)
(succ 85 86)
(succ 86 87)
(succ 87 88)
(succ 88 89)
(succ 89 90)
(succ 90 91)
(succ 91 92)
(succ 92 93)
(succ 93 94)
(succ 94 95)
(succ 95 96)
(succ 96 97)
(succ 97 98)
(succ 98 99)
(succ 99 100)
(succ 100 101)
(succ 101 102)
(succ 102 103)
(succ 103 104)
(succ 104 105)
(succ 105 106)
(succ 106 107)
(succ 107 108)
(succ 108 109)
(succ 109 110)
(succ 110 111)
(succ 111 112)
(succ 112 113)
(succ 113 114)
(succ 114 115)
(succ 115 116)
(succ 116 117)
(succ 117 118)
(succ 118 119)
(succ 119 120)
(succ 120 121)
(succ 121 122)
(succ 122 123)
(succ 123 124)
(succ 124 125)
(succ 125 126)
(succ 126 127)
(succ 127 128)
(succ 128 129)
(succ 129 130)
(succ 130 131)
(succ 131 132)
(succ 132 133)
(succ 133 134)
(succ 134 135)
(succ 135 136)
(succ 136 137)
(succ 137 138)
(succ 138 139)
(succ 139 140)
(succ 140 141)
(succ 141 142)
(succ 142 143)
(succ 143 144)
(succ 144 145)
(succ 145 146)
(succ 146 147)
(succ 147 148)
(succ 148 149)
(succ 149 150)
(succ 150 151)
(succ 151 152)
(succ 152 153)
(succ 153 154)
(succ 154 155)
(succ 155 156)
(succ 156 157)
(succ 157 158)
(succ 158 159)
(succ 159 160)
(succ 160 161)
(succ 161 162)
(succ 162 163)
(succ 163 164)
(succ 164 165)
(succ 165 166)
(succ 166 167)
(succ 167 168)
(succ 168 169)
(succ 169 170)
(succ 170 171)
(succ 171 172)
(succ 172 173)
(succ 173 174)
(succ 174 175)
(succ 175 176)
(succ 176 177)
(succ 177 178)
(succ 178 179)
(succ 179 180)
(succ 180 181)
(succ 181 182)
(succ 182 183)
(succ 183 184)
(succ 184 185)
(succ 185 186)
(succ 186 187)
(succ 187 188)
(succ 188 189)
(succ 189 190)
(succ 190 191)
(succ 191 192)
(succ 192 193)
(succ 193 194)
(succ 194 195)
(succ 195 196)
(succ 196 197)
(succ 197 198)
(succ 198 199)
(succ 199 200)
(succ 200 201)
(succ 201 202)
(succ 202 203)
(succ 203 204)
(succ 204 205)
(succ 205 206)
(succ 206 207)
(succ 207 208)
(succ 208 209)
(succ 209 210)
(succ 210 211)
(succ 211 212)
(succ 212 213)
(succ 213 214)
(succ 214 215)
(succ 215 216)
(succ 216 217)
(succ 217 218)
(succ 218 219)
(succ 219 220)
(succ 220 221)
(succ 221 222)
(succ 222 223)
(succ 223 224)
(succ 224 225)
(succ 225 226)
(succ 226 227)
(succ 227 228)
(succ 228 229)
(succ 229 230)
(succ 230 231)
(succ 231 232)
(succ 232 233)
(succ 233 234)
(succ 234 235)
(succ 235 236)
(succ 236 237)
(succ 237 238)
(succ 238 239)
(succ 239 240)
(succ 240 241)
(succ 241 242)
(succ 242 243)
(succ 243 244)
(succ 244 245)
(succ 245 246)
(succ 246 247)
(succ 247 248)
(succ 248 249)
(succ 249 250)
(succ 250 251)
(succ 251 252)
(succ 252 253)
(succ 253 254)
(succ 254 255)
(succ 255 256)
(succ 256 257)
(succ 257 258)
(succ 258 259)
(succ 259 260)
(succ 260 261)
(succ 261 262)
(succ 262 263)
(succ 263 264)
(succ 264 265)
(succ 265 266)
(succ 266 267)
(succ 267 268)
(succ 268 269)
(succ 269 270)
(succ 270 271)
(succ 271 272)
(succ 272 273)
(succ 273 274)
(succ 274 275)
(succ 275 276)
(succ 276 277)
(succ 277 278)
(succ 278 279)
(succ 279 280)
(succ 280 281)
(succ 281 282)
(succ 282 283)
(succ 283 284)
(succ 284 285)
(succ 285 286)
(succ 286 287)
(succ 287 288)
(succ 288 289)
(succ 289 290)
(succ 290 291)
(succ 291 292)
(succ 292 293)
(succ 293 294)
(succ 294 295)
(succ 295 296)
(succ 296 297)
(succ 297 298)
(succ 298 299)
(succ 299 300)
(number 0)
(number 1)
(number 2)
(number 3)
(number 4)
(number 5)
(number 6)
(number 7)
(number 8)
(number 9)
(number 10)
(number 11)
(number 12)
(number 13)
(number 14)
(number 15)
(number 16)
(number 17)
(number 18)
(number 19)
(number 20)
(number 21)
(number 22)
(number 23)
(number 24)
(number 25)
(number 26)
(number 27)
(number 28)
(number 29)
(number 30)
(number 31)
(number 32)
(number 33)
(number 34)
(number 35)
(number 36)
(number 37)
(number 38)
(number 39)
(number 40)
(number 41)
(number 42)
(number 43)
(number 44)
(number 45)
(number 46)
(number 47)
(number 48)
(number 49)
(number 50)
(number 51)
(number 52)
(number 53)
(number 54)
(number 55)
(number 56)
(number 57)
(number 58)
(number 59)
(number 60)
(number 61)
(number 62)
(number 63)
(number 64)
(number 65)
(number 66)
(number 67)
(number 68)
(number 69)
(number 70)
(number 71)
(number 72)
(number 73)
(number 74)
(number 75)
(number 76)
(number 77)
(number 78)
(number 79)
(number 80)
(number 81)
(number 82)
(number 83)
(number 84)
(number 85)
(number 86)
(number 87)
(number 88)
(number 89)
(number 90)
(number 91)
(number 92)
(number 93)
(number 94)
(number 95)
(number 96)
(number 97)
(number 98)
(number 99)
(number 100)
(number 101)
(number 102)
(number 103)
(number 104)
(number 105)
(number 106)
(number 107)
(number 108)
(number 109)
(number 110)
(number 111)
(number 112)
(number 113)
(number 114)
(number 115)
(number 116)
(number 117)
(number 118)
(number 119)
(number 120)
(number 121)
(number 122)
(number 123)
(number 124)
(number 125)
(number 126)
(number 127)
(number 128)
(number 129)
(number 130)
(number 131)
(number 132)
(number 133)
(number 134)
(number 135)
(number 136)
(number 137)
(number 138)
(number 139)
(number 140)
(number 141)
(number 142)
(number 143)
(number 144)
(number 145)
(number 146)
(number 147)
(number 148)
(number 149)
(number 150)
(number 151)
(number 152)
(number 153)
(number 154)
(number 155)
(number 156)
(number 157)
(number 158)
(number 159)
(number 160)
(number 161)
(number 162)
(number 163)
(number 164)
(number 165)
(number 166)
(number 167)
(number 168)
(number 169)
(number 170)
(number 171)
(number 172)
(number 173)
(number 174)
(number 175)
(number 176)
(number 177)
(number 178)
(number 179)
(number 180)
(number 181)
(number 182)
(number 183)
(number 184)
(number 185)
(number 186)
(number 187)
(number 188)
(number 189)
(number 190)
(number 191)
(number 192)
(number 193)
(number 194)
(number 195)
(number 196)
(number 197)
(number 198)
(number 199)
(number 200)
(number 201)
(number 202)
(number 203)
(number 204)
(number 205)
(number 206)
(number 207)
(number 208)
(number 209)
(number 210)
(number 211)
(number 212)
(number 213)
(number 214)
(number 215)
(number 216)
(number 217)
(number 218)
(number 219)
(number 220)
(number 221)
(number 222)
(number 223)
(number 224)
(number 225)
(number 226)
(number 227)
(number 228)
(number 229)
(number 230)
(number 231)
(number 232)
(number 233)
(number 234)
(number 235)
(number 236)
(number 237)
(number 238)
(number 239)
(number 240)
(number 241)
(number 242)
(number 243)
(number 244)
(number 245)
(number 246)
(number 247)
(number 248)
(number 249)
(number 250)
(number 251)
(number 252)
(number 253)
(number 254)
(number 255)
(number 256)
(number 257)
(number 258)
(number 259)
(number 260)
(number 261)
(number 262)
(number 263)
(number 264)
(number 265)
(number 266)
(number 267)
(number 268)
(number 269)
(number 270)
(number 271)
(number 272)
(number 273)
(number 274)
(number 275)
(number 276)
(number 277)
(number 278)
(number 279)
(number 280)
(number 281)
(number 282)
(number 283)
(number 284)
(number 285)
(number 286)
(number 287)
(number 288)
(number 289)
(number 290)
(number 291)
(number 292)
(number 293)
(number 294)
(number 295)
(number 296)
(number 297)
(number 298)
(number 299)
(number 300)

sees_XML(...) rules

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