NashFP's playground for modeling the two generals problem
From Distributed Algorithms (Nancy Lynch) Chapter 5.1
Several generals are planning a coordinated attack from different directions, against a common objective. They know that the only way the attack can succeed is if all the generals attack; if only some of the generals attack, their armies will be destroyed.
The generals are located in different places. Nearby generals can communicate, but only via messengers that travel on foot. However, messengers can be lost or captured, and their messages may thus be lost. Using only this unreliable means of communication, the generals must manage to agree on whether or not to attack. Moreover, they should attack if possible.
(We suppose that the " communication graph" of generals is undirected and connected, and that all of the generals know the graph. We also assume that there is a known upper bound on the time it takes for a successful messenger to deliver a message.)
Contribute your solution by adding a folder name {your github name}+{your language} such as "bryanhunter+elixir".