Game of Risk

The below Elm visualization shows a given game's probability tree from the attacking player's perspective.

As the game progresses, more and more outcomes are determined, filling in the rows with either green or red. The bottom row of the tree represents the final probability, where the proportion of green reflects the probability of the attacker winning the game.

__These slides__provide an overview of the Game of Risk and the solver logic to find exact win probabilities given arbitrary starting game configurations. The Wolfram Alpha blog has a post describing a materialy similar approach to the problem.The below Elm visualization shows a given game's probability tree from the attacking player's perspective.

- Each node represents a single battle
- The children of each node represent the possible outcomes of each battle
- For each node, the proportion of green / red indicates the probability of not losing / losing that particular battle

- all battles and outcome probabilities are represented
- the proportion of green on the screen has
*some*correspondence to the probability of the attacker winning the game

- difficulty in assigning visual weight to different outcomes, given limited space
- the loss of visual information for branches not taken (i.e. loss scenarios)
- the crowding that occurs when height > ~6 (given a typical branching factor of 3)

As the game progresses, more and more outcomes are determined, filling in the rows with either green or red. The bottom row of the tree represents the final probability, where the proportion of green reflects the probability of the attacker winning the game.

**Github repo |****Built with Elm**