[freeciv-ai] Problems with unit_desirability()
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
First of all, there is a bug in ai_unit_defence_desirability:
if (unit_types[i].move_type != LAND_MOVING
if (unit_types[i].move_type != SEA_MOVING
Now, I came across slightly strange situation when a Stealth Fighter is
selected as a city defender. This is quite ridiculous. A Mech.Inf. is a
better defender and cheaper too.
The problem mostly comes from
desire += get_unit_type(i)->move_rate;
line in ai_unit_defence_desirability.
The root of all evil is, of course, in allowing process_defender_want to
choose flying units at all.
There are situations when a Stealth Fighter is a good defender, even if
the only one, e.g. when a transport-load of howitzers is sailing towards
you. But this is a rather exceptional case and should be only considered
when we have organized a proper feed-back from the danger-assessing
For now I suggest we take flying units out of the simple_ai_unit list.
And remove this += move_rate from defense desirability.
- [freeciv-ai] Problems with unit_desirability(),
Gregory Berkolaiko <=