Argh, I hate intruduction XD Oh well. I'm developing Battle City (check my journal for detailed explanation) and I wanted to improve AI for it soon (after I fix other issues). It's currently using something I dubbed for myself "stupid AI" - AI that decides where to go and when to shoot based on chance and randomizer. It works for start but isn't challenging for the player, making the game somewhat boring.
After finding link for this article here on GameDev.Net I learned about AI architectures and decided to go with Behavior tree with 3 states: Roaming, Attacking and Pushing. Roaming state would be the same as the AI that is currently in action; Attacking and Pushing state make things interesting.
My idea is this:
When AI tank comes to the set distance from base, he would enter into Pushing state and start going towards the base in order to destroy it.
When AI "sees" player (meaning AI tank came to a set distance from player tank and there are no walls between them) AI would start chasing player in order to destroy him.
Player is prioritized over base, meaning that when conditions from both states are met, AI goes into Attacking state.
For both these states, I need a suitable pathfinding algorithm. There are 2 things that need to be taken into consideration:
1) Level is tile based, but tanks are not limited to move from tile to tile. They still move in 4 directions only.
2) One type of obstacles is destructable. And by that I don't mean "shoot it and it's removed", I mean "destroy it piece by piece".
Attachement has an example of enemy tank (red circle) switching from Roaming to Pushing state. There are 4 possible attack paths.
I've did some research myself but was unable to find anything I could use. At least I think. I've considered A* and Influence map, but from what I understood A* is best for completely tile based movement, and my game is too simple for influence mapping.
After whole wall of text, finally the point of the post:
Which pathfinding algorithm would You suggest and could You explain it by little, either by general idea, pseudocode or link to an article that explains it?
Thanks for your time to read