A retro-inspired 2D Action RPG set in the distant future (DEMO)4.55 / 5.00 35,000 Views
Travel the world on an epic shark lifting adventure!4.18 / 5.00 16,874 Views
What happens after the final boss is defeated?4.04 / 5.00 11,025 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.