Search code examples
artificial-intelligencepath-findinga-starheuristics

stealth game AI solver


I'm making an AI for solving a simple stealth game. The objective is to go to the goal point without being caught by enemies(with flashlights). I already implemented a pathfinding algorithm(A*) but without the logic for avoiding or waiting at a certain spot before moving again. There are no other elements on the map. There's just the player, the guards, and the goal. The only idea I have right now is, when the AI has already constructed the path, the coordinates in the path that would be spotted will be excluded and the AI constantly reconstructs the path. But the enemies are constantly moving(dynamic obstruction) so I think it's impossible to reach the goal with only this. Any other ideas?


Solution

  • Assuming you've got enough memory to play with and the guard movements are known/deterministic, you can model time as another dimension (e.g. your 2D map becomes a 3D space-time arena).

    Then you can do A* through time..... the enemies with moving searchlights will be "static" in space-time.