A thought experiment, described in 1982, in which generals must agree on whether to attack or retreat by sending messengers, even though some messages may be lost and some generals may be traitors. It models the challenge of reaching agreement in a distributed system where some participants are unreliable or dishonest.