[freeciv-ai] Re: (PR#6567) AI has too many boats.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6567 >
Joshua,
A very good effort! It is really appreciated!
However, there are many problems with the patch and you will need to fix
them before the patch is committed.
1. Read the style guide:
http://www.freeciv.org/lxr/source/doc/CodingStyle?v=cvs
It is very important that everyone follows the style guide.
2. Make the patch smaller. This is important so that I can easily check
it and commit.
3. Make sure you debug it well. An example: oldboss variable. What is it
doing there?
This is what I suggest:
Patch #1:
Make city_has_other_boats function which checks, well, if a city has
other boats, so our one can go off exploring. Use this function to send
the boat exploring even if it's in a city. This will help solve current
and future clustering problems.
Patch #2:
Introduce need_boat field. Comment it (see CodingStyle for directions).
Add your "looking for a city that needs me" code to ai_manage_ferryboat.
Patch #3:
Change the rest of ai_manage_ferryboat to introduce the while loop. It is
a good idea, but it can wait, it only makes sense if a boat needs to
deliver more than one passenger in one turn -- a rare if not
currently impossible situation.
When you know your way around the code a bit better, your big patches will
get committed. But it's better to start with small things.
Please continue to help us,
G.
P.S. I believe I fixed 6935 with a different patch a couple of days ago.
But it might not have gone through the system yet...
On Sun, 1 Feb 2004, Guest wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=6567 >
>
> Fixed a little bug in that last patch (wrong-way comparison).
> Also, added a better way to tell which city needs a ferry.
> (needs_boat added to ai.choice). I have been observing the behavior
> of this code in ferry managing, and these are my results.
>
> Ferries now request bodyguards, but don't get them yet
> (some other code may be missing).
>
> Ferries no longer get stuck forever in cities. However, they tend
> to cluster in *some* of the cities that are building offensive units
> to attack oversea. Sometimes, four or five transports can be seen
> moving unloaded together.
>
> Anyway, this behaves alot better than it did before. - Joshua
- [freeciv-ai] Re: (PR#6567) AI has too many boats.,
Gregory Berkolaiko <=
- [freeciv-ai] (PR#6567) AI has too many boats., Guest, 2004/02/01
- [freeciv-ai] Re: (PR#6567) AI has too many boats., Gregory Berkolaiko, 2004/02/02
- [freeciv-ai] (PR#6567) AI has too many boats., Joshua Hudson, 2004/02/08
- [freeciv-ai] Re: (PR#6567) AI has too many boats., Gregory Berkolaiko, 2004/02/09
- [freeciv-ai] (PR#6567) AI has too many boats., Joshua Hudson, 2004/02/12
- [freeciv-ai] (PR#6567) AI has too many boats., Joshua Hudson, 2004/02/14
- [freeciv-ai] Re: (PR#6567) AI has too many boats., Gregory Berkolaiko, 2004/02/19
- [freeciv-ai] Re: (PR#6567) AI has too many boats., Gregory Berkolaiko, 2004/02/21
- [freeciv-ai] (PR#6567) AI has too many boats., Joshua Hudson, 2004/02/25
|
|