Question

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?

Was it helpful?

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.

OTHER TIPS

Constructing a good heuristic is the key.

Your heuristic should consider the probability that a guard is likely to move toward your path and spot you, and weight moves accordingly. This will naturally tend toward paths that avoid guards. Note that with chance elements like random moving guards, there's no way to guarantee a goal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top