The exact solver
Where does the optimum come from, and why was the published one wrong?
To know how good an episode is, each floor needs its optimum. The solver turns the grid into a graph: every monster and door is a node, neighbouring items are merged, and chains with nothing attached are merged too. It then searches over the sets of nodes the hero has cleared, keeping for each set the state with the most HP.
The solver published with the test maps keeps the first state it reaches for each set instead of the best. On the simple floor both give 13 HP. On the complex floor the published search reports 22 HP and the exact search 68, so every early claim of an "optimal" complex-floor win was an artefact (Appendix E, incident 12).
Exact search. States are taken in order of decisions (breadth first), most HP first. A set of cleared monsters and doors is expanded again only if a later state reaches it with more HP, so no better route is thrown away.
Published search. The solver released with the test maps keeps the first state it takes for each set. On this floor both find 13 HP; on the complex floor the published search reports 22 HP and the exact search 68.
More floors, including all generated floors, are on the solver page. The searches of the complex floor and hand03 take minutes, so their routes are precomputed on their floor pages.