

If a friendly unit is within range (i.e., is reachable from a location your unit can reach), add it to the list of possible tactics and give it a fitness rating equal to, say, 100 * (1.0 - unit health), where unit health ranges from 0 to 1. For instance, your "heal a friendly unit" tactical decision phase might step through all friendly units. What I mean by fitness function is to decide on the "value" of performing the tactic on a certain unit or location. If there aren't any tactics available, repeat the process with flagging the terrain for two moves, and so on. Select the best one or randomize from the top.

This gives you a list of available tactics and their fitness functions for each move. If you pass in the flagged terrain, you can very quickly determine what your space of possible tactics are. Once you know that, step through your available tactics (melee attack, heal friendly unit, whatever), and assign a fitness function for all available uses of the tactic. Use A* or whatever to flag out the terrain to see how far the unit can move this turn. One approach I've used is to do a two-pass system.įirst, find out where your unit can go. Or worse, a unit is blocking the way on lets say a bridge so there is actually no way to reach him. Ps.1 - A problem is that to know accurately how far an enemy is i would need to pathfind to him, because although the enemy is near, an impassable cliff might be separating us which takes 4 turns to go around. In final fantasy tactics it might be applied successfully, although the branching factor is much bigger than that of 9x9 Go (from what i understand) I believe the space my actors will be using is not good for it, as many many moves in the game don't result in a position from which you can attack and affect the world (i am in a world bigger than final fantasy tactics) Someone elsewhere suggested using Monte Carlo Tree Search, used currently in Go games. I have no idea how to handle having many skills, and skills that don't do damage but rather buff/debuff or alter the world. I am currently trying to use potential fields / influence maps to generate the data i take decisions upon.

I want to move towards a unified system, but trying out things from Potential field research used in a manner like in the Killzone 1 AI has me getting stuck on local maximums. i can't decide where to move unless i know who i am going to attack, and what range the skill i will use has, and vice versa, i can't decide who to attack unless i know how many turns it will take me to reach each target) I am considering having the decisions disconnected, but all these 3 decisions are largely coupled. I am implementing a small grid based, turn based strategy in the lines of Final Fantasy tactics.ĭo you have any ideas on how i can approach the target selection, movement and skill selection process?
