Firing squad
The prisoner and the firing squad
“Suppose that a prisoner is about to be executed by a firing squad. A certain chain of events must occur for this to happen. First, the court orders the execution. The order goes to a captain, who signals the soldiers on the firing squad (A and B) to fire. We’ll assume that they are obedient and expert marksmen, so they only fire on command, and if either one of them shoots, the prisoner dies.”
The problem as a Bayesian network
We implemented Pearl’s firing squad problem as a causal Bayesian network in BayesiaLab. “Causal” means that the arc directions represent causal relationships between the nodes.
You can download this XBL file and open it with any version of BayesiaLab:
Alternatively, you can experiment with the firing squad model on this WebSimulator page:
Question #1
“Using this diagram, we can start answering causal questions from different rungs of the ladder. First, we can answer questions of association (i.e., what one fact tells us about another). If the prisoner is dead, does that mean the court order was given?” (Pearl, p. 40)
Querying the Bayesian network
To answer this question in BayesiaLab, set Hard Evidence by double-clicking the state of . This indicates that you learned that the prisoner had been executed (first rung of the ladder).
In the WebSimulator, move the slider for the state of to 100%. The Observed checkbox is automatically checked upon releasing the mouse button, and the evidence is propagated in the network to update the probability distributions of the other variables.
Once we know that the prisoner is dead, we infer that both soldiers fired and that the court order was given.
Question #2
“Suppose we find out that A fired. What does that tell us about B? By following the arrows, the computer concludes that B must have fired too. (A would not have fired if the captain hadn’t signaled, so B must have fired as well.) This is true even though A does not cause B (there is no arrow from A to B).” (Pearl, p. 40)
Querying the Bayesian network
- This is another observational query, the “first rung of the ladder.”
- In BayesiaLab, set Hard Evidence by double-clicking the state of to indicate that you found out that Soldier A fired.
In the WebSimulator, move the slider for the state of to 100%.
Given that we know that Soldier A fired, we infer that the court order was given and that Soldier B also fired.
Question #3
“Going up the Ladder of Causation, we can ask questions about intervention. What if Soldier A decides on his own initiative to fire, without waiting for the captain’s command? Will the prisoner be dead or alive?” (Pearl, p. 40)
Querying the Bayesian network
- In BayesiaLab, choose Intervention from the Monitor Contextual Menu for , then set the node to .
- This triggers the “mutilation of the graph” (or “graph surgery”), which blocks the associational path between and that goes via .
- You can also block the path by choosing Fix Probabilities from the Monitor Contextual Menu for to hold its probability distribution constant.
- Then set Hard Evidence on the state of .
In the WebSimulator, you can simulate this intervention by checking Observed for , then setting the state of to 100%.

If Soldier A decides to fire on his own initiative, this implies the death of the prisoner without affecting our belief regarding the other variables.