Skip to content

Instantly share code, notes, and snippets.

@tchaumeny
Last active September 19, 2025 21:57
Show Gist options
  • Select an option

  • Save tchaumeny/fdfbdf203d711b7332380bb290fa45b9 to your computer and use it in GitHub Desktop.

Select an option

Save tchaumeny/fdfbdf203d711b7332380bb290fa45b9 to your computer and use it in GitHub Desktop.
-- Boolean variables for "Agent i has blue eyes?"
VARS 1,2,3,4,5
LAW Top
-- Agents can see each other eyes, but not their own
OBS a: 2, 3, 4, 5
b: 1, 3, 4, 5
c: 1, 2, 4, 5
d: 1, 2, 3, 5
e: 1, 2, 3, 4
WHERE?
-- Monday: Visitor announces seeing someone with blue eyes
< ! (1 | 2 | 3 | 4 | 5) >
-- Tuesday: Nothing special at noon.
< ! (
~(a knows that 1)
& ~(b knows that 2)
& ~(c knows that 3)
& ~(d knows that 4)
& ~(e knows that 5)
) >
-- Wesdnesday: Nothing special at noon.
< ! (
~(a knows that 1)
& ~(b knows that 2)
& ~(c knows that 3)
& ~(d knows that 4)
& ~(e knows that 5)
) >
-- Thursday: a, b, c commit suicide.
(
a knows that 1
& b knows that 2
& c knows that 3
& ~(d knows that 4)
& ~(e knows that 5)
)
TRUE?
{1, 2, 3}
a knows that (1 | 2 | 3 | 4 | 5)
& b knows that (1 | 2 | 3 | 4 | 5)
& c knows that (1 | 2 | 3 | 4 | 5)
& d knows that (1 | 2 | 3 | 4 | 5)
& e knows that (1 | 2 | 3 | 4 | 5)
TRUE?
{1, 2, 3}
a knows that a knows that (1 | 2 | 3 | 4 | 5)
& a knows that b knows that (1 | 2 | 3 | 4 | 5)
& a knows that c knows that (1 | 2 | 3 | 4 | 5)
& a knows that d knows that (1 | 2 | 3 | 4 | 5)
& a knows that e knows that (1 | 2 | 3 | 4 | 5)
TRUE?
{1, 2, 3}
~(a knows that b knows that c knows that (1 | 2 | 3 | 4 | 5))
TRUE?
{1, 2, 3}
~((a, b, c, d, e) comknow that (1 | 2 | 3 | 4 | 5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment