Complete.Org: Mailing Lists: Archives: freeciv-ai: June 2002:
[freeciv-ai] Re: Opinions on some AI issues

[freeciv-ai] Re: Opinions on some AI issues

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: Opinions on some AI issues
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Wed, 19 Jun 2002 22:16:26 -0400

At 07:29 PM 02/06/17 +0100, Gregory Berkolaiko wrote:
>Just to let you know my opinion on a couple of issues and maybe also 
>revive the list.
>I. Technology selection by AI.  
>Right now the AI evaluates units (and I 
>guess buildings) that it can build to select the build but it also 
>evaluates the things it cannot yet build and if they are found useful, 
>the want of the enabling techs is bumped up.  IMO it is a very good 
>philosophy.  Unfortunately it is hard to maintain, hard to generalize, it 
>encourages spaghetti-coding and slows down the server.  Also it is hard to 
>weigh importance of musketeers on the same scale as importance of 
>Instead I suggest that tech slection be done randomly, based on some
>general tendencies.  We can define few general tech directions, like
>Social, Economy, Military.  Then we can have base weights for each civ
>plus some situational modifiers (e.g. a lot of cities in danger -- go for
>Military, too many elvii -- go for social, empty coffers -- go for
>economy).  The next tech will be selected randomly with more probability 
>going to the more desired directions.
>This is a very basic idea.  It can be made more complicated (and therefore 
>flexible, I hope), by several means:
>1. Split basic directions
>                 Military
>               /        \
>         Defense        Offense
>        /       \
>    Buildings  Units
>2. Each tech can have a precomputed score in each of the directions.  
>You combine (scalar product) these with the civs weight and it becomes the 
>probability of this tech's selection.
>3. Each civ can have it's character reflected in the base wieghts.

Sounds good.

Combine this with a divisor something like (1 + num_precursors^2) if
you extend it beyond the current tech selection list.

One kind of a modest example extension, perhaps what you hinted at. 
1)  cache a list of the currently accessible techs with their weights.
2)  Add to a tech weight (and total) anytime some advisor code thinks
    it wants that tech, or to the weight bias as well.
3)  Use these accumulated totals and weights to do the next random
    selection and reset for the next research period.

This will tend to build up a situational factor to research that may
reflect game conditions as opposed to personality bias. It may also
reduce random effects if there is a consistent demand for a certain
tech or tech class, i.e. prolonged warfare.

When doing the random selection, use squares of the weight products
or something other than linear random selection to accentuate biases.

>II. Fuzzy AI
>Fuzziness is good.  AI should make mistakes.
>Not much more to say, actually.

But worth repeating :-).

Actually it is less mistakes, as varying the weights on choices, or
choosing from a selection by biased random selection so that different
"right" answers are selected rather than a consistently same one.

>Well, enough for today.

Can we count on this as a weekly feature column?



[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] Re: Opinions on some AI issues, Ross W. Wetmore <=