Skip to content

natalidahary/Thousand_Wines_One_Poison

Repository files navigation

Thousand Wines One Poison Puzzle 

Story: 
Someone is trying to kill the king. We have just been informed that one of his thousand bottles of wine is poisoned. Ten slaves are dedicated to this mission and they have to slip in some order each bottle of wine. The bottles are not marked. The slaves has to sacrifice themselves and some or all will die. How will the king know which bottle is poisoned? 
 
In this puzzle user pick a number between 1 and 1000, while the algorithm will try to guess it by asking 10 binary questions. But there's a twist - the algorithm knows the consequences of your choice!

The game uses a matrix of numbers to keep track of which numbers are still in contention. Each row of the matrix represents a binary digit of the numbers being guessed. If a binary digit is 1, then the corresponding row of the matrix contains the possible numbers that have a 1 in that digit. If a binary digit is 0, then the corresponding row of the matrix contains the possible numbers that have a 0 in that digit. The game narrows down the possibilities by asking you to pick a binary digit and telling you which numbers are still in contention for that digit.

After asking 10 questions, the user will be presented with a picture of poisoned wine and a row of slaves who survived and thos been poisoned will be marked purplish. The algorithm will reveal the number you chose and the amount of slaves that were killed because of it.

About

Python game for Thousand wines one poison puzzle using Tkinter GUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages