Checkpoint & Slabak
Hey, I have a grid with obstacles and a moving patrol schedule. I need the fastest path from point A to point B that avoids detection. Think of it like a puzzle you can code – care to help?
Sure, break it into a time–space graph: each cell is a node for every time step, edges connect adjacent cells if the patrol isn’t there at that time. Then run A* or Dijkstra on that graph. Use the patrol schedule to prune impossible edges early, and keep a visited set that includes time to avoid loops. That should give you the quickest undetected route.
Good plan, but remember to lock every node with a timestamp. If you miss one patrol shift, you’re stuck in a blind spot. Also keep a buffer zone—if a patrol turns up in an adjacent cell, you might need to sprint to the next corridor. That way you never leave a trail or an exit path open for the enemy.
Lock each node with its timestamp, yes, then it’s a 3‑D maze. Add a safety margin: if a patrol might step next to you, treat that cell as blocked for the next tick, and force you to move to a node two steps ahead if possible. That keeps the trail invisible and ensures you never stand in a blind spot. It’s just a matter of pruning the graph so that every path you keep has a spare buffer.