Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI)
Home

[Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI)
From: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Date: Mon, 4 Mar 2002 11:28:20 -0600

On Mon, Mar 04, 2002 at 12:11:28PM +0000, Gregory Berkolaiko wrote:
> This is related to an earlier email by Raimar.  He was talking about
> displaying the effect a building like Marketplace would have.  Well,
> Marketplace is an easy one to estimate for anyone (incl. AI) who knows
> about the notion of "percent".  But the effect of, say, Cathedral, is more
> involved.
> 
> So I would suggest the following extension to the CMA: once the target 
> multipliers are set, you should be able to evaluate the effect of building 
> a happiness-related improvement.  It would output (for user) the increase 
> in surpluses you'd be able to get (maybe minus the cost of the 
> upkeep).  And for AI you just need to combine 
> the values of increases multiplied by their _WEIGHTINGs

        We already do.  worst_worker_tile_value() is used for this purpose
already for luxury improvements -- we assume every newly content worker can
find a tile to work which is as useful as the worst one we are working.
ai/advdomestic.c, line 225 or so.

        Happiness buildings are evaluated through building_value(), which
is another obvious target for number -> enum cleanups.  Does anyone
remember offhand what happiness[4] is?  We need enums like
HAPPY_AFTER_MARTIAL_LAW, HAPPY_AFTER_LUXURY, etc.
-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
        -Robyn Hitchcock.


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