Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2001:
[Freeciv-Dev] Re: Wrong sequence of defending units (PR#796)
Home

[Freeciv-Dev] Re: Wrong sequence of defending units (PR#796)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Christian Knoke <ChrisK@xxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Wrong sequence of defending units (PR#796)
From: Thue <thue@xxxxxxx>
Date: Tue, 5 Jun 2001 00:48:59 +0200

On Tuesday 05 June 2001 00:28, Christian Knoke wrote:
> Version: CVS of 04 June 2001
> System:  Linux i386 GTK+
>
> When attacking an AI city, the AI sometimes chooses
> a bad sequence for the units to defend the city. I've
> seen it before, now i caught it.
>
> Reproducible. Savegame is here:
>
> http://www.enter.de/~c.knoke/bugs/bad-defense.sav.gz
>
> Login as chris and attack finnish city of Pori with a
> battle ship. city defends with 1. musketeer, 2. diplomat,
> 3. ironclad.
>
> --------
> 3: attack:180, defense:45, attack firepower:1, defense firepower:1
> 3: attack:180, defense:0, attack firepower:1, defense firepower:1
> 3: attack:180, defense:40, attack firepower:2, defense firepower:1
> --------
>
> Christian

This looks like an obvious bug at first, but looking closer I am not so sure 
it should be considered a bug.
What happens is that the algoritm determines that none of the units have any 
chance of winning, so it just feeds the units with the lowest value (build 
cost) first. Since an ironclad is expensive it gets to defend last.
If it is going to choose defenders for me I think I prefer that it stays as 
it is. :)

That said, the algoritm is somewhat simple, and I had not thought much about 
this consequence when I wrote it.

-Thue


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