A project for Multi-Agent Systems 2015
java -jar pah.jar
It will give you the opportunity to distribute hat colors over prisoners A to D. After which the program will show what the prisoners know during certain stages of the puzzle.An example execution is show below:
Prison: C-> B-> A-> |wall| <-D
The arrows represent the viewing direction of the prisoners
What color of hat is A wearing? (case sensitive)
>>orange
What color of hat is B wearing?
>>purple
What color of hat is C wearing?
>>orange
What color of hat is D wearing?
>>purple
Prison hats distributed, press return to start.
>>
Prisoner A keeps quiet because he is not yet sure about his hat color.
Prisoner B keeps quiet because he is not yet sure about his hat color.
Prisoner C keeps quiet because he is not yet sure about his hat color.
Prisoner D keeps quiet because he is not yet sure about his hat color.
Press return to continue.
>>
Prisoner A keeps quiet because he is not yet sure about his hat color.
I, prisoner B know that my hat has the color purple
Prisoner C keeps quiet because he is not yet sure about his hat color.
Prisoner D keeps quiet because he is not yet sure about his hat color.
Press return to continue.
>>
The prisoners have already left the jail
The user of the program is completely free in what color hats he distributes, it would also be possible to for example distribute four hats of the same color. The prisoners will reason about any situation you throw at them (they only won't always be able to make it out alive.)
Click here to download the source code of the program.
Copyright © 2014 - All Rights Reserved - Sweta Singh (s2209381) and Niels Kluiter (s2225328)
Template by OS Templates