A demo of the K.O.L.M. Kickstarter game.4.18 / 5.00 8,425 Views
Fight against the HYDRA and show the world your best score!3.92 / 5.00 1,134 Views
A relaxed yet challenging puzzle with 24 levels.3.91 / 5.00 4,628 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.