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: Glenn Taylor <glenn@xxxxxxxxxxxx>
Cc: cameron@xxxxxxxxxx, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Client AI development
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 18:00:14 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Apr 19, 2001 at 10:14:09AM -0400, Glenn Taylor wrote:
> > 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.

The proposed structure should be a general architecture. It it ok, if
you want to use it to apply soar to freeciv. I would use as a testbed
for my own programming. If somebody has created some cells which beat
the server side AI they can be put into the offical tree.

> > 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.

The problems you describe are AFAIK also the main problems of the
current (server side) AI.

The ideal solution would be that each layer get a command from the
upper layer and generates commands for the lower layers. The top layer
would issue "win this game". However there are serveral problems:
 - a layer can get commands which conflict ("increase the number of
   people in this city" and "produce attacking units fast")
 - some commands can be carried out in different ways (command is
   "increase science" possible solutions "build library" or/and
   "convert to scientist")

> 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.

This is also my current idea. Low-level tasks (which are however high
by current standarts) like "build a city", "patrol area", "manage city
to maximize shields" form a base. And the upper layers have to decide
what objects does certain actions how long: "this island is colonized
-> cities: stop settler production, city 23: produce ships, city 34:
produce explorer"

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

Till now it is fruitful. I think your schemas can be and probably must
be merged.

> Glenn Taylor                     Soar Technology, Inc

Aha ;)

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I was dead ... but I'm better now."
    -- Capitain Sheridan in Babylon 5



[Prev in Thread] Current Thread [Next in Thread]