[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]
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
|
|