congrats on finishing up finals, summer is Not the time to be in school
Regarding the case you mention (sacrificing a unit to the larger objective), this is relatively straightforward. The AI needs a single overriding goal, which breaks into multiple meta-goals, which each translate into a sequence of individual unit moves. If one of the meta-goals is to draw the enemy out of a defencive position, the AI will have a few options to do this with (advance a unit who will obviously be butchered, run cavalry at the archers in front and then withdraw, start up the long-range missile fire, etc).
This is not quite theoretically anymore, since I've got a good ways into designing both a campaign and battlemap AI API. Quite the enjoyable summer project--- no graphics to deal with, so it moves quickly.
Bookmarks