Skip to content

Instantly share code, notes, and snippets.

@robertpdx
robertpdx / prisoners.py
Last active November 1, 2022 12:54
100 Prisoners Puzzle - Network Solution Test
# Prisoner puzzle sim
# Robert Jones, October 2022
#
# 100 prisoners numbered 1-100
# Room with 100 boxes numbered 1-100
# Each box contains a slip of paper with a number (1-100)
# Each prisoner goes in one at a time and searches 50 boxes
# If they find their number they exit the room, leaving it as they found it
# No communication allowed to the prisoners that have not taken their turn
# Prisoners are allowed to strategize prior to searching
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.