Complete.Org: Mailing Lists: Archives: freeciv-ai: February 2004:
[freeciv-ai] Re: (PR#6567) AI has too many boats.

[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]
To: undisclosed-recipients: ;
Subject: [freeciv-ai] Re: (PR#6567) AI has too many boats.
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxxx>
Date: Sun, 1 Feb 2004 16:04:07 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: >


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:
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,

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: >
> 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

[Prev in Thread] Current Thread [Next in Thread]