[freeciv-ai] Re: Question on find_boat
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 1 Apr 2003, Per I. Mathisen wrote:
> On Tue, 1 Apr 2003, Jordi Negrevernis i Font wrote:
> > I'm programming the code required to transport an army ( or part )
> > from a continent to another to attack a city. I'm having difficulties in
> > finding the right way to use find_boat, as done in settlers.c. The ships
> > full of troups flip-flop going out of the city and entering afterwards.
> >
> > I looked to the code of that function and it seems that is not
> > checked if someone is allready using that ship!!!
> >
> > Which is the way to use boats with no passengers?
>
> I wish I could tell you, but this top secret code :-)
>
> I don't know how it works, and to be honest, I kind of doubt that even the
> guy who originally wrote it knew exactly how it worked.
>
> This is _the_ really big hurdle now for making significant progress on the
> AI. The correct thing to do is to throw out the existing ferry code and
> write a new one.
>
> Sorry, but I really suggest that is where you start. I and Greg have been
> talking a little about how to implement such a new ferry system, but
> neither of us have produced any working code. This should change now that
> pf is in.
>
> Greg - have you given this topic more thoughts since last time we spoke
> about this?
I have thought a little. I know how to create a land-sea-land map but
for it to work we need a function estimating waiting time at the port of
departure. This function is a plug-in module, the path-finding code
itself wouldn't depend on it.
So the questions are:
1. How to make this function.
2. How to manage existing boats.
3. How to make sure new boats are build if there is demand.
Also I don't know where to start since if we break at least one component,
the whole thing will collapse. Maybe debugging find_boat will help?
Jordi, could you provide a savegame of sorts?
G.
|
|