The Dollar Game
The dollar game is a simple game of solitaire. Start with a connected graph where each vertex has some integer value (positive, negative, or zero). Attempt to make all vertices non-negative by repeatedly applying either of these steps:
- A given node requests aid. Each adjacent node gives it one dollar.
- A given node offers aid. It gives each adjacent node one dollar.
Once all nodes have non-zero values the game is won.
Running the Game
go run dollarGame.go | gvpack -u | dot -Tpng > test.png && open test.png
Play Notes
Not all starting configurations are solvable. If the following inequality is true then the configuration will be solvable (it is not clear whether the converse is true):
Total of all values >= EdgeCount - VertexCount + 1
Resources