Memo SiegeRepeated enemy waves are repeated subproblems. Place caches so each one only has to be fought once.

Calls 0Cache hits 0
Call runs Cache hit, subtree skipped Each node is one function call. The root is at the top.

State table

Click a state to give it a cache slot. The Heat switch shows how often a state is requested, how often your plan runs it, or how many calls caching it would save. Teal border means cached.