Chuck Asimov is a keen inventor and balloonist. He has developed some humanoid robots and decided to take nine of them (conveniently numbered 1 to 9) on a trip in his hot air balloon.
Unfortunately the weather conditions have deteriorated rapidly and the balloon has been blown off-course - it is heading for a range of rocky mountains! The balloon is going to crash unless he can lose some weight from the balloon, and quickly. If the balloon crashes, Chuck will be killed and all the robots in the basket destroyed.
Chuck weighs 100kg. Each of the robots also weighs 100kg. The balloon will only make it to safety if the total weight of the occupants of the basket can be reduced to 400kg.
If it was up to Chuck, he would throw six of the robots over the side - he can always build new ones - but it is not up to Chuck. The robots are stronger than he is, so they will decide who gets thrown over the side. No only that, but Chuck hurt his back recently and couldn't even throw a deactivated robot over the side.
Now Chuck has programmed a set of laws into his robots which are similar (but not identical to) those formulated by his distant relative.
- Law 1: A robot may not cause harm to a human, or by inaction allow a human to come to harm.
- Law 2: A robot may not harm another robot, or by inaction allow another robot to come to harm unless that robot is self-sacrificing.
- Law 3: A robot must protect itself from harm.
The laws are, of course, prioritised so that a robot will always attempt to follow them except where doing so would conflict with an earlier law. The laws activate when the robots find themselves in emergency conditions and the robots will begin to take action in their numerical order.
When Chuck realises the peril he is in, he announces the state of emergency and expects robots 1 to 6 to throw themselves overboard in order to save the other occupants of the balloon. Unfortunately for Chuck, his programming skills are not as good as his mechanical skills and the laws have not taken effect properly in all the robots. For each robot there is only a 50% chance per law that it has taken effect. Some robots may have all three laws correctly programmed, others may have any two, one or even none.
What really happens now is a matter of chance. The robots begin to take actions in their numerical order, but in very quick succession.
- If a robot has no laws active, it will perform no actions.
- If a robot has laws 2 and 3 in place, it will attempt to throw Chuck overboard.
- Chuck is able to deactivate the first robot (in each round of moves) attempting to throw him overboard, but not subsequent robots in the same round.
- A robot with law 3 in place, but lacking law 2 will pick any robot at random and attempt to throw them overboard.
- A robot with law 3 in place but lacking laws 1 and 2 will pick Chuck or any random robot and attempt to throw them overboard (equal probabilities).
- A single robot can counter the agressive actions of another robot towards Chuck, another robot, or themselves where those actions conflict with their own programming. Both robots will become deactivated (but remain in the basket).
After all robots have acted, any robots remaining in the basket who have not been deactivated will get another round of moves to act in the same sequence as before. This continues until all robots have been deactivated or the crash has been averted.
The robots don't think several moves down the line - they are concerned only with immediate actions and outcomes.
Question: What is the probability that Chuck survives his balloon trip?
Bonus Question: How many robots would there need to have been in the basket initially for Chuck's chance of survival to be 10% or less?
Each robot plans its move, considering the planned actions of all the preceding robots. The first robot in any round that chooses to attack Chuck has its attack instantly negated and becomes deactivated. Self-sacrifice moves are also regarded as being instantaneous.
- L--- No laws are active, so the robot does nothing.
- L--3 If the robot is currently under attack, it will defend itself. Otherwise it will choose another occupant at random and throw them overboard.
- L-2- If any other robot is currently subject to an unblocked attack, it will defend that robot. If multiple robots are under threat, it will choose to defend the robot attacked by the lowest-numbered attacker. If no robots are under threat it will either throw Chuck out or self-sacrifice (50% of each).
- L-23 If any other robot is under attack, it will defend that robot. Otherwise if it is under attack, it will defend itself. Otherwise it will throw Chuck out.
- L1-- If Chuck is under attack, it will defend him. Otherwise it will choose a random robot (including itself as a target) and throw them out.
- L1-3 If Chuck is under attack it will attempt to defend him. Otherwise if it is under attack it will self-defend. Otherwise it will throw out a random robot.
- L12- If Chuck is under attack it will attempt to defend him. Otherwise if any other robot is under attack it will attempt to defend them. Otherwise it will self-sacrifice.
- L123 If Chuck is under attack it will attempt to defend him. Otherwise if any other robot is under attack it will attempt to defend them. Otherwise if it is under attack it will self-defend. Otherwise it will self-sacrifice.
Once all the moves have been planned, the defensive actions are resolved first (defending is faster than hoisting another balloon occupant in the air and launching them overboard).
Once the defensive actions are resolved, any outstanding offensive actions are resolved.
Another Edit Initially when I posted this, I thought it had the makings of a good puzzle, however it appears that this is clearly not the case. The various attempts to answer, although appearing to make similar interpretations of the rules, have come up with different answers. In each case the results are different from my own and this is likely to be due to minor differences in the implementations. I don't wish to draw the question out by refining the specification over and over until someone's numbers tally with mine, as that is akin to puzzles where someone posts a valid response to a question and the OP discounts it as it's not the answer that they were thinking of. I intend to upvote the responses provided to date as they all show a high level of effort and a considered approach to the question. I can't really mark any as the answer, though.
In case anyone is interested, my own figures fell squarely between those of @Trenin and @1361991 for up to 20 robots. My survival rate, however, continues to drop so that by the time you get to 700 robots Chuck only survives 10% of the time.