Learning · 6 min read
Learning Real-Time A*
Updates a spatial heuristic from what failed. A persistent per-cell heuristic map that starts at Manhattan distance and hardens on death cells.
Why this category
Learning. Update heuristics or action values across attempts from what failed before.
How it explores
Exploring: 2 of 31 states checked
Why this category
Learning Real-Time A* is Learning: a module-level map of heuristic values survives across attempts. Planning still looks like A* Search, but h comes from that learned map instead of fresh Manhattan distance alone.
When the death calendar is empty the heuristic map resets. Knowledge is about what failed before, which is why it is not plain Informed search.
How it picks the next move
Inflate h for every spatial cell that appears in knownUnsafe at any phase. Run A* Search with priority cost-so-far + learned h, hard bans on "x,y,phase", and soft patrol risk on edges.
After a successful plan, nudge heuristics along the route toward the remaining path length so later attempts remember useful cost-to-go.
What it stores after a fail
Engine calendar: cone cells as "x,y,phase". Algorithm memory: the heuristic map, including very high values on cells that showed up in deaths.
Together they push later A* Search expansions away from historically deadly regions even before soft risk is considered.
More learning
Try it live
Run this algorithm on a built-in level, or paint your own grid and guards.