ANIME-Y HIGHSCHOOL STUPID OTAKU ADVENTURE ACTION EXPLOSIONS YAY3.86 / 5.00 3,774 Views
The most mixed MMA-simulator ever!3.77 / 5.00 7,477 Views
Fighting Puzzle! Defeat the enemy using your brain!3.67 / 5.00 16,523 Views
At the moment in my turn-based RPG, I'm working with the AI finding the best or seemingly best move (movement + attack) to make. I have a few influence maps for movement decisions based on various factors, and per tile it checks it's various attacks to see what does the most damage * accuracy or most healing, etc. Then it adds the movement score with the attack score and finds the max of that. One problem that I'm having is that the attack score far outweighs the movement score. The influence maps are the results of normalized numbers (resulting in values from -1 to 2, though it could be -1 to 1 if I would normalize again), while the attack score could be in the hundreds. Also, some units have stat buffs/debuffs and status effects; how could I work that into a number to compare to simply attacking instead?
I'm also thinking about working towards having the AI look down the list of units whose turns are coming up, and making some decisions based on that. Any suggestions on how that should work, I guess besides testing every possible scenario between the two? For instance, a guy who does a lot of damage on my team is up next; how can I help him score a kill?
You could try to make min-max sort of algorithm that looks at how the moves affect future possibilities, as opposed to a greedy algorithm that makes the best possible move for 1 turn.
Depending on your engine you could simply try all valid combinations, or make a list of moves that should more often be considered.