Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2001:
[Freeciv-Dev] Re: Client AI development
Home

[Freeciv-Dev] Re: Client AI development

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: cameron@xxxxxxxxxx
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Client AI development
From: Glenn Taylor <glenn@xxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 10:14:09 -0400

First of all, I really like the idea of making the entire AI writable
in any language, especially considering how AI has historically been
done primarily in Lisp (now Scheme). Emphasising standards-compliance
by the use of XML and so on is also a good idea. This method also
permits many AIs to easily be written in many different ways, which
may make it worthwhile in any case. However, this is an awful lot of
coding, so it might take quite a while. Continuing to do it in C might
not be so terrible, especially if the AI section can be logically
separated from the rest of the code.
While making the AI code in any language, I would argue for the inclusion
of existing AI-engines that provide a broad base to build from.  Yes, that
may tie you to a single language, but it's hopefully the case that you're getting
a payoff in return. I'm thinking in particular of something like Soar
(http://ai.eecs.umich.edu/soar), that's thought of as anything from an
expert system shell to a cognitive modeling architecture, by various people
who use it and develop with it. And it's been applied to games actively.
For a thorough examination of Behaviour Based Robotics, read Brooks'
paper _Intelligence Without Reason_ found at
<http://www.ai.mit.edu/people/brooks/papers/AIM-1293.pdf>, or any of a
number of other papers at
<http://www.ai.mit.edu/people/brooks/papers.html>.

So an outline of my AI would be this: each unit is an autonomous
agent, which gets its information from the map, and marks information
on the map, permitting communication between units. This allows
selection of action; there are very few possible actions for a
non-settler unit --- move, attack, fortify, pillage, disband. A
handful of subsumption-architecture layers control the actions. (The
same is true for settlers, they just have a bunch more things to do.)

I'd argue against this micro approach-- Brooks' subsumption architecture,
at least originally, suffered from a lack of goal-directed behavior, and
it's never been clear that the subsumption approach can scale well
higher than the insect level Brooks originally demonstrated. I'd say goal-
directed behavior is pretty important in a game like FreeCiv, where there are potentially
hundreds of entities to be controlled (units, cities, etc) -- there needs
to be cohesion of behavior among the entities, else they're all of their
own mind, and I'd be hard pressed to find an army that works on the
"emergence" of behavior among the troops. They need to work toward
a common goal (or smaller goals that feed a higher goal) and this is,
I'd argue, better accomplished with a goal-directed approach. Perhaps
a *single* agent isn't suitable to capture the full complexity of a country,
so you might want a few to play the roles of the advisors, and they work together
(or bicker, depending on your type of government ;) to achieve their goals.

Now, there's a tradeoff, of course. It's easier to get running with these tiny behaviors
for individual entities-- you can work on one now, one later, etc. However,
I think the goal-directed approach will provide a more life-like, challenging opponent.

You could even layer the approach, and have something like your micro-behaviors
be assigned to a particular unit ("Patrol area X") and that unit would perform
that behavior and not need to be bothered with until the task is done; the high-level
tasking, though, would be done by the military advisor goal-directed agent.

Why is it AI discussions always sound like religious discussions? :)

glenn

--

Glenn Taylor                     Soar Technology, Inc
P: (734) 327-8000                F: (734) 913-8537
http://www.soartech.com
 
[Prev in Thread] Current Thread [Next in Thread]