[Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
Maybe you have misunderstood me. I don't want to do something like
gold_of_marketplace = gold_multiplicator * base_gold
I want to do something like
memcpy(backup, pcity);
pcity->improvements[i]=1;
refresh_city(pcity);
y = create_diff(backup, pcity);
memcpy(pcity, backup);
The first will lead to code duplication. The second will also work if
the code doesn't know about the latest effect.
In general I would a function like:
k = get_diff(pcity, B_MARKETPLACE, GOLD);
would be ok. It doesn't matter how it is implemented.
> 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
I don't know how this relates to CMA and I don't know what target
multipliers you mean.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Reality? That's where the pizza delivery guy comes from!"
- [Freeciv-Dev] [Wishlist] Attitude manager (agent and AI), Gregory Berkolaiko, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Per I. Mathisen, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI),
Raimar Falke <=
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Gregory Berkolaiko, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Raimar Falke, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Gregory Berkolaiko, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Raimar Falke, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Jason Short, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Gregory Berkolaiko, 2002/03/04
- [Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Raimar Falke, 2002/03/04
[Freeciv-Dev] Re: [Wishlist] Attitude manager (agent and AI), Tony Stuckey, 2002/03/04
|
|