Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)]
Home

[Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)]

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)]
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Sun, 3 Mar 2002 21:46:21 +0100 (MET)

On Sun, 3 Mar 2002, Petr Baudis wrote:
>   so, now I'm trying my luck with getting something slightly larger and more
> complicated into CVS - this cleanup cleans proccess_(defender|attacker)_want()
> functions, corrects TODO appropriatelly, and renames pcity->ai.(f|a) into
> something more descriptive. Behaviour is not changed (autogames are same).

One behaviour that should be changed is the AI's inclination to build way
too many city walls and coastal fortresses, while leaving its cities
without a single defender when it thinks they are out of danger. Too many
times I've seen these cities invaded and taken over by barbarians.

>   I think it's ready to actually go in, altough I'm open to objections and
> ideas how to extend/correct it even more (I expect many hints for better and
> more comments, and possibly also for better variable names - in fact, all 
> those
> one-letter variables have usually same mean in the whole AI - but I didn't 
> i.e.
> renamed f to 'loss', but to 'bcost' here, contrary to findvictim()).

It looks ok to me.

>    bool walls = city_got_citywalls(pcity);

> +        if (walls && move_type == LAND_MOVING) {
> +          desire *= pcity->ai.wallvalue;
> +          desire /= 10;
> +        }

> +        if (move_type == LAND_MOVING) {
> +          desire *= pcity->ai.wallvalue;
> +          desire /= 10;
> +        }

Just curious: Why does the AI consider city walls here?

Yours,
Per

"What we anticipate seldom occurs: but what we least expect generally
happens." -- Benjamin Disraeli



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