Program approach
This project is based on a mathematical game that was published on the Scientific American Journal in 1999 by Ian Stewart.
The goal was to find a solution for the puzzle following logic principles, considering the pirates as independent agents, able to
reasoning and apply logic properties to come up with the solution to the puzzle.
To do so we created a Java program that simulates the behavior of the pirates, and run a "game" to see if there is, and witch is, the
correct solution. The program was able to find the correct solution, while it was coded to represent as close as possible, the
reasoning processes of every pirate
Changing Rules
The second part of this project was to experiment new rules, or the general behave of the pirates. The most interesting ones
are the one that we proposed: the "Multiple lives rule", and the "Negotiation" rule.
The first new rule is interesting because has the proprieties to eliminate the most important rule of the normal game: surviving. After we
researched the consequences of this new rule, we found out that the final result turns to be unchanged. Even if the reasoning process is different
using this new rule, the outcome is the same: this because every solution just depends on the future solution. This means that even with much more
possible solutions, depending on the number of pirates lives, every result will depend only from the next solution.
The second new rule, "Negotiation rule", is the most game-changing one. After we discovered that a final result only depends on the future ones,
we tried to change this, by giving the possibility to "change the future". As we expected introducing this new possibility changes the outcome
of the puzzle, but in a very difficult way to predict.
Peculiarity
It's interesting to analyze the puzzle from a different point of view: what would happen if we have 10 pirates instead of 5, or even 100, 200 or 500? Intuitively the number of pirates shouldn't change the result; but what happens when there are more pirates then coins? And when the pirates are more then the double of the coins? In this case it would be impossible to bribe half of them to survive. Does this mean that all the pirates above 202 have to die? Well since the pirates are rational, they understand the situation, so if possible they will try to avoid this. Let's reason in case of 204 pirates. The first one would need 102 positive votes: 1 from him, 101 from the other pirates. But he has only 100 coins, so it can bribe only 100 pirates. But also pirate 203, in case of death of pirate 204, would be in the same situation: knowing this, pirate 203 will vote for pirate 204 proposal, even without receiving money. It's interesting that this process goes along increasing the number of pirates, and follows the power of 2 distribution (over the 200). This means that only pirate 204, 208, 216, 232, etc. would survive. This because after pirate 204 survives, pirates 205, 206, 207 would die, so they will vote for pirate 208; these new 4 votes (pirate 208 votes for himself) compensate the negative votes of pirates 204,203,202,201. Above 208, other 8 pirates knowing they would die are need, so pirate 216 will have enough vote etc. After this analysis it is possible to know the results of every game, even with thousands of pirates.