Well, I'm testing an AI to mimic Human behavior, and it's going well, but the difficult I'm facing now is to determine the ways to reach the player. If the AI is placed in a spot where he need to destroy some walls to reach the player, he will be unable to pathfind the player, also, if he have a long way to go, but destroying a wall near him can make a shortcut, he will ignore this and walk all the way around...
@m00npunk, I have no idea of how to make a matrix and explore its potential to result in something useful, like chess AI do. Chess have two main variables, the number of moves and the movement behavior itself, but here, you'll have power ups like gamecorpstudio said, will have superpowers, jump mechanics, aggressive and defensive status, walls to block his way, bombs to avoid, also blocking the way, plus traps, destructible permanent stops, etc xD
I'm trying to start with a simple bomberman/dynaman behavior because it only use bombs and power ups, walls and few less mechanics to learn and work on.
So, my sixty sense is saying the mimic human behavior is the way to go, ignoring algorithms, and making it more chaotic and variable.
Organizing this behavior, it'll be something like this:
- Destroy a radius of 3-4 wall blocks around the initial spot always catching powerups;
- Check the player distance and orientation, going toward him, picking the nearest wall and destroying it;
- Check the player powerups, if he is powerful than the AI, it will chase powerups and become in a defensive status, else, hunt the player mimicking the human behavior, trying to hold him with bombs and corners.
- Pick the nearest destructible wall where he is able to reach;
- Search for powerups on screen and try to reach it;
- Avoid player, avoid cross paths with bombins in line, avoid corners and dead end paths;
- Chase the player, staying two to three steps ahead him;
- Avoid corners, but use the bomb space to protect himself if necessary;
- Keep tracking the bombs timers and ranges;
- Track bomb paths and the possibility of one bomb ignite another one;
- Pick bombs and throw them if possible, in direction of the player;
- Kick bombs in line to hold the player on corners, also check if a bomb can explode and his fire will cross the path of this bomb to explode before;
To make the bombs more predictable, I'm thinking in setup an invisible object to be placed along the line of fire exactly when the bomb is placed, so, any AI will can check where the fire will hit and avoid it, but, if a wall near the bomb is destroyed before it explode, the range of this bomb will need to be adjusted.
This give me freedom to make every AI with some human behaviors, like more aggressive, more strategic, more defensive and even more careful of crossing fires, using it in its favor, dropping bombs in time to kill the player when he is running around.
All the way this is a huge amount of things to do such simple AI =
Do you think it can work well?