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

Game Description

; 4-player smallest game
(role player1)
(role player2)
(role player3)
(role player4)

; Initial state
(init (round 1))
(init (score player1 0))
(init (score player2 0))
(init (score player3 0))
(init (score player4 0))

; Legal moves
(<= (legal ?p (select ?n))
    (role ?p)
    (number ?n))

; Transition rules
(<= (non_unique_selection ?n)
    (does ?p1 (select ?n))
    (does ?p2 (select ?n))
    (distinct ?p1 ?p2))

(<= (next (round ?new_round))
    (true (round ?old_round))
    (succ ?old_round ?new_round))
(<= (next (score ?p ?score))
    (true (score ?p ?score))
    (does ?p (select ?n))
    (does ?other (select ?n))
    (distinct ?p ?other))
(<= (next (score ?p ?score))
    (true (score ?p ?score))
    (does ?p (select ?n))
    (does ?other (select ?m))
    (greater ?n ?m)
    (not (non_unique_selection ?m)))

(<= (smaller_and_unique ?s1 ?s2)
    (greater ?s2 ?s1)    ; ?s1 < ?s2
    (not (non_unique_selection ?s1)))  ; s1 is unique

(<= (anyone_is_better_than ?n)
    (does ?someone (select ?n1))
    (smaller_and_unique ?n1 ?n))

(<= (next (score ?player ?new_score))
    (true (score ?player ?old_score))
    (add_10 ?old_score ?new_score)
    (does ?player (select ?n))
    (not (non_unique_selection ?n))
    (not (anyone_is_better_than ?n)))

; Termination conditions
(<= terminal
    (true (round 25)))
(<= terminal
    (true (score ?p 100)))

; Payoffs
(<= (goal ?p ?score)
    (true (score ?p ?score)))

(add_10 0 10)
(add_10 10 20)
(add_10 20 30)
(add_10 30 40)
(add_10 40 50)
(add_10 50 60)
(add_10 60 70)
(add_10 70 80)
(add_10 80 90)
(add_10 90 100)
(<= (greater ?m ?n)
    (succ ?n ?m))
(<= (greater ?m ?n)
    (succ ?k ?m)
    (greater ?k ?n))
(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)
(number 1)
(number 2)
(number 3)
(number 4)
(number 5)
(number 6)
(number 7)
(number 8)
(number 9)
(number 10)

sees_XML(...) rules

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