[Freeciv-Dev] Re: old/bad code in autoattack.c (PR#351)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Apr 29, 2000 at 09:39:42PM +0000, Nicolas BRUNEL wrote:
> It's really too crude. I'm afraid the same formula is used when a town is
> defending itself. I saw many warriors wasted in an attemp to destroy a
> phalanx on a mountain. It would be better to build a more powerfull
> attacking unit. One day someone will have to rewrite the code responsible
> for that.
The autotattack deficiencies were noted before the 1.10.0 release,
but none of JJM, DWP, or myself have done anything about it. (Who I think
were the participants in the conversation)
The "Pearl Harbor" scenario rules are also done wrong, and that was
also noted at/before 1.10.0. For anyone looking for a quick project, this
shouldn't take too long to rewrite better than it is now.
The AI Diplomat management that I contributed for 1.10.0 also
doesn't do a few things like Poison City. That should be an exercise in
cut-and-paste programming, with a little bit of logic for appropriateness.
(city size greater than 1 ? other reasons?)
> Instead of using asses_defense and assess_defense_quadratic, we can calculate
> the number of turns the town will survive. Now, AI spends too much money
> building units in a hurry to defend itself. Any improvement in this code
> will speed up AI science developpement.
It doesn't spend too much money anymore.
ai_new_spend_gold() was fixed to reserve much more cash a few weeks
ago. This is a change in CVS that is not in any release version.
> I don't know how AI selects the city to attack. I suggest
>
> - (1) Try to destroy enemy capitals.
> - (2) Try to take usefull wonder. ( A republic without JC cathedral is
> less powerfull )
> - (3) Try to capture cities which produce many shields. They will be
> easier to defend and will produce soon new units.
The AI doesn't consider any of these. Adding them is a little bit
non-trivial, especially point 3. Also remember that Production+Population
is the trigger for Pollution, which the AI does not manage particularly
well.
> - (4) Try to build easy to defend zone. It's better to take five
> cities on one island than one city on five islands.
AI does consider this.
> To sum up, AI can be improved. :-)
Yes. :) Production decisions really need to be made at a higher
level than the individual city, for one thing.
--
Anthony J. Stuckey stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
-Robyn Hitchcock.
- [Freeciv-Dev] Re: old/bad code in autoattack.c (PR#351),
Tony Stuckey <=
|
|