Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: Requirements for gen eff AI
Home

[Freeciv-Dev] Re: Requirements for gen eff AI

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Requirements for gen eff AI
From: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Thu, 13 May 2004 20:43:42 +0200

On Thu, May 13, 2004 at 02:26:34PM +0000, Per I. Mathisen wrote:
> I am in the process of writing a new AI for the gen eff patch, and which
> replaces the current improvements evaluation code. I need feedback from
> the list on the requirements specifications for this code.

Two ideas: assign each improvement a at runtime a value based on the
effects. This is very crude.

Second idea: only take the city-related (city-related = effects which
affect the output of the 6 stats and maybe happines) effects into
account. You can extract these easily. Example:

Improvement 1:
 + 5% food

Improvement 2:
 + 3% shield
 + 2% trade

delta_1 = FOOD_WEIGHT * current food * 5 %
delta_2 =
    SHIELD_WEIGHT * current shield * 3 % +TRADE_WEIGHT * current trade * 2 %

Now you compare delta_1 and delta_2.

For non-city-related (make-all-new-units-veteran, allow-nuclear for
example) you have assign some special value.

So I would go for understanding of the effects. You have to value them
somehow. I wasn't forced to do this with CMA because the effects of
the choices could be described in terms of the 6 stats. For these you
have to give weights. You could extend this model however. In addition
to shield-weight you also require a weight for
make-all-new-units-veteran and allow-nuclear. So your evaluation code
becomes a sum of change*weight.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Only one human captain has ever survived battle with the Minbari
  fleet. He is behind me. You are in front of me. If you value your 
  lives, be somewhere else."
    -- Ambassador Delenn, "Severed Dreams," Babylon 5


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