Sonntag, 28. März 2010

Behavior - Alternating tasks

From now on, it is fairly simple to extend and enhance our AI's behavior:

We'll let building remain our priority, but whenever we have dropped a converter, we will pick up a power-up while our converter sinks into the ground.
Once we have picked up the power-up (or if there is no power-up available) we get into position to drop the next converter. For the time being we will leave our behavior totally determinstic and just add tasks with the principle of priorization.


With this small modification our pacifistic AI behavs almost like a (somewhat greedy) human player already...



Without changing our behavior any further, it can never be wrong to shoot at anything that moves! So let's destroy enemy converters and the enemy tank when they are in reach.



Finally, to use our nice catching behavior that we implemented earlier, let's go and hunt down the enemy once it has less than a quarter of its maximum heahlth.



With this very basic behavior that can - now that we have all tools like pathfinding and building avaialable - easily be enhanced, it is already quite fun to play against the AI.

Keine Kommentare:

Kommentar veröffentlichen