You are not logged in. login register
Game montyhall
name montyhall
creator stephan
number of roles 2
stylesheet generic/generic.xsl
GDL v2
enabled
matches show matches
statistics show game statistics
description GDL version of the Monty Hall game (cf., e.g., J. Rosenhouse: "The Monty Hall Problem", Oxford University Press, 2009

Game Description

;; GDL-II

(role candidate)
(role random)

(init (closed 1))
(init (closed 2))
(init (closed 3))
(init (step 1))

(<= (legal random (hide_car ?d))
   (true (step 1))
   (true (closed ?d)))
(<= (legal random (open_door ?d))
   (true (step 2))
   (true (closed ?d))
   (not (true (car ?d)))
   (not (true (chosen ?d))))
(<= (legal random noop)
   (true (step 3)))

(<= (legal candidate (choose ?d))
   (true (step 1))
   (true (closed ?d)))
(<= (legal candidate noop)
   (true (step 2)))
(<= (legal candidate switch)
   (true (step 3)))
(<= (legal candidate noop)
   (true (step 3)))

(<= (sees candidate (does candidate ?m))
   (does candidate ?m))
(<= (sees candidate (open_door ?d))
   (does random (open_door ?d)))

(<= (next (car ?d))
   (does random (hide_car ?d)))
(<= (next (car ?d))
   (true (car ?d)))
(<= (next (closed ?d))
   (true (closed ?d))
   (not (does random (open_door ?d))))
(<= (next (chosen ?d))
   (next_chosen ?d))

(<= (next_chosen ?d)
   (does candidate (choose ?d)))
(<= (next_chosen ?d)
   (true (chosen ?d))
   (not (does candidate switch)))
(<= (next_chosen ?d)
   (does candidate switch)
   (true (closed ?d))
   (not (true (chosen ?d))))

(<= (next (step 2))
   (true (step 1)))
(<= (next (step 3))
   (true (step 2)))
(<= (next (step 4))
   (true (step 3)))

(<= (sees candidate (car ?d))
   (true (step 3))
   (true (car ?d))
   (next_chosen ?d))

(<= terminal
   (true (step 4)))

(goal random 100)
(<= (goal candidate 100)
   (true (chosen ?d))
   (true (car ?d)))
(<= (goal candidate 0)
   (true (chosen ?d))
   (not (true (car ?d))))

sees_XML(...) rules

(<= (sees_xml random ?t) (true ?t))

(<= (sees_xml candidate (closed ?d)) (true (closed ?d)))
(<= (sees_xml candidate (chosen ?d)) (true (chosen ?d)))
(<= (sees_xml candidate (step ?s)) (true (step ?s)))
(<= (sees_xml candidate (car ?d)) (true (step 4)) (true (car ?d)))