[freeciv-ai] Re: (PR#6935) AI sends transports with settlers off explori
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[freeciv-ai] Re: (PR#6935) AI sends transports with settlers off exploring
"Per I. Mathisen" <per@xxxxxxxxxxx>
Tue, 2 Dec 2003 04:52:17 -0800
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6935 >
On Mon, 24 Nov 2003, Gregory Berkolaiko wrote:
> > I might add that it already takes care of a very related situation:
> > Reservations of tiles for city building. I have used this system to keep
> > track of reservations for the new settlers system successfully, and it was
> > not very forgiving about lost reservations.
> There is a crucial difference here. Settler going to build a city has
> (1) special AIUNIT_BUILD_CITY role and (2) has a spot reserved. There is
> no (1) without (2) and vice versa (in ideal code).
> But there is no AIUNIT_GOING_BY_BOAT role.
But it does have a punit->ai.ferryboat reservation id tag. As long as it
has this, it should be snatched up before ai_manage_military grabs it, and
managed by gothere. If it cannot proceed there, then we can clear it.
We should never give a unit a boat reservation and then ignore the boat
(or vica versa). AFAIK we only assign a unit to a boat when we really
need it, and only change this in the next iteration of ai_manage_unit.
I don't really understand how it could be otherwise. The entire ferry
system you (re)wrote, Greg, is based on remembering passenger and ferry
numbers. Even the 'find new captain' code depends on it, and fails now due
to the arbitrary clearing of passenger info.
Just in case this was not clear: The problem is that the ferry _returns
home with a valid passenger with a valid destination_. This should not be
> So yes, one can do all boat clearings through
> ai_unit_new_role(punit, AIUNIT_NONE, -1, -1);
> which needs to be issued in the very beginning of ai_military_findjob.
This is a regression. This was how it was done back in the old day, when
the AI was unable to carry out missions over more than a single turn. Is
this really the way we want to go?
Maybe it is - so far only diplomats do it otherwise, and hunters to some
extent do it too (though they are not yet in cvs), and diplomats may still
have some problems due to it - occasionally getting blocked and becoming
deadlocked - a very rare occurance but still a problem that would be
solved if they would fully recalculate state every turn.
- [freeciv-ai] Re: (PR#6935) AI sends transports with settlers off exploring,
Per I. Mathisen <=