[Freeciv-Dev] (PR#8993) Stop ferries from yoyo-ing between cities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8993 >
Forwarding a digest of our discussion to RT:
---------- Forwarded message ----------
Date: Fri, 11 Jun 2004 14:14:19 +0000 (GMT)
From: Per Inge Mathisen <per@xxxxxxxxxxx>
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Stop ferries from yoyo-ing between cities
I noticed that ferries tend to yoyo between cities that need them for
their future production, causing these cities to shift between producing
ferries and their actual production every other turn. This patch fixes
this.
---------- Forwarded message ----------
Date: Sat, 12 Jun 2004 18:42:09 -0500 (CDT)
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxxx>
To: Per Inge Mathisen <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: Stop ferries from yoyo-ing between cities
I don't think this patch fixes anything broken. If ferry's present
location needs a boat, the ferry will stay there. The only case when it
will go for another city is if this other city is about to finish its
build (and thus has a higher priority).
If this behaviour is unwanted, it can be fixed by removing some of the
checks in the body of the function.
I tend to think that yoyoying is a consequence of the city production
yoyoing. However, if the yoyoing has a constant period, there might be
deep bugs inside.
G.
---------- Forwarded message ----------
Date: Sun, 13 Jun 2004 09:53:05 +0000 (GMT)
From: Per Inge Mathisen <per@xxxxxxxxxxx>
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: Stop ferries from yoyo-ing between cities
The reason the patch is fixing something, is that the weighting in
ai_ferry_find_interested_city() is rather weird, and makes ferries way too
eager to travel around to find the supposedly "optimal" place to be.
Another patch might actually be
- if (turns >= turns_horizon) {
+ if (turns + pos.turn >= turns_horizon) {
UNIT_LOG(LOGLEVEL_FERRY, pferry, "%s is NOT suitable: "
to punish travelling more.
As of now, taking 30 turns traveling over half the world to stay in a city
that will finish its ferry in 31 turns rather than staying in a city that
will finish its ferry in 32 turns is a possible result. What will happen
is that both cities will buy the ferries before 30 turns because they need
it and the ferry they already have will be smack between the two cities,
leaving the player with 3 ferries, one too many.
This example does not really explain the yoyo-ing that I've seen, though,
so I suspect there are more issues here.
- Per
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#8993) Stop ferries from yoyo-ing between cities,
Gregory Berkolaiko <=
|
|