CodingTrain / Suggestion-Box

A repo to track ideas for topics
573 stars 86 forks source link

Impossible Chessboard Puzzle / Hamming Code visualization #1818

Open arathorn76 opened 10 months ago

arathorn76 commented 10 months ago

Inspired by: 3 blue 1 brown video https://www.youtube.com/watch?v=wTJI_WuZSwE a chessboard puzzle that can be solved using hamming codes.

A sample implementation I did can be found at https://editor.p5js.org/arathorn76/sketches/biqRaqcQ_

The core of the puzzle is to mark one specific cell of an 8*8 grid. At start all 64 cells hold a coin randomly showing heads or tails. The warden hides the key under one of the cells. Prisoner 1 / Player 1 knows where the key is hidden. He turns exactly 1 coin over. Then Prisoner 2 / Player 2 comes into the room. He has no other information than the state of the board and must find the key in 1 try. On success -> freedom