Firefighter simulates the graph game Firefighter, introduced by Bert Hartnell in 1995.
- Begin with a graph.
time = 0
. - A single vertex on the graph is burning.
- The player gets to choose a vertex to protect. This vertex cannot catch fire.
- Every vertex adjacent to the burning vertices catches fire, unless it is protected.
time += 1
. - The game ends when every vertex is either burning or protected.
- Minimize the time taken to end the game.
- Maximize the number of safe vertices.
- Some kind of points system, ie.
points = burning_vertices + time
. Minimizepoints
.
Temporarily, to simulate firefighter hundreds of times on different graphs, and model how a randomized approach to firefighter works.