Complete.Org: Mailing Lists: Archives: freeciv-ai: February 2003:
[freeciv-ai] Re: Patch Army

[freeciv-ai] Re: Patch Army

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv ai <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: Patch Army
From: Jordi Negrevernis i Font <jorneg@xxxxxxxxxxx>
Date: Thu, 20 Feb 2003 21:46:50 +0100

En/na Gregory Berkolaiko ha escrit:

Quoting Jordi Negrevernis i Font <jorneg@xxxxxxxxxxx>:

I read it.  I am impressed by quantity, but not really impressed by quality.


Design could be much better.  Cycling through all army units every time you need
to know the number of units in the army is, to put it mildly, wasteful.  And the
patch is full of it.

Yes, maybe is not a good design but it ins't a waste of time and resources.Look at the time to process the AI handling code for units and the time in the army patch.

I tested it too, in a couple of games.  When it works, it is nice. :) Most of
the time it didn't :(  There were two main problems:

1.  There was no path to the selected target, so the army would march out of
it's base and then march back in, ad infinitum. This can be fixed rather easily by clever use of path-finding.

The flip-flop of the army can be because i use the real_map_distance instead of warmap and because every ten turns the ai reevaluates the objectives and, maybe, does choose a far away one.

2.  There were not enough units willing to join the army.  However, there were
many units on the continent doing brave solitary attacks.  Also the units who
did join the armies, were split between two armies with the same target, base
and everything.

The second is the more fundamental problem.
Yes are right. This is a problem. I did not want to mess the ai unit handling code, so there are units attacking on it way.

Hopefully this will increase modularity of the AI.  Please comment on this
general design and on how it could be split into "projects".  Then we can put
tenders on the projects ;)

So, which is your idea? You want to modify the patch and have a new c file or just modify the general ai code?

Personally, I would first clean up and sort the code responsible for calling
different advisors and merging their opinions.


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