This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: AI in Old Empire


Hans Ronne wrote:
> 
> The problem is with plan_exploration. In half the cases, the army starts
> out with an offensive plan (because there is an adjacent independent city
> that is visible on turn zero) and things usually work fine. Inspection of
> plan_exploration reveals that it calls capture_useful_if_nearby and
> capture_independent_if_nearby before executing any pending tasks, which it
> should not do, I think. Commenting out these two calls solves the problem.

Setting a breakpoint on do_capture_task reveals a simple explanation
for the bug - filling in side and type in the capture task exposed a latent
but obvious mistake in capture task execution.  I just checked in the fix.

With the fix, the AI does OK with Old Empire.  Playing against no opposition,
it still takes too long to capture the other side's city once it's discovered
though.  I notice a lot of disorganization in transportation though,
important since the sides start so far apart.

Whether the opportunistic captures should still happen is a separate
question.  They basically make sure that units don't get so intent on
their main goal that they don't take advantage of opportunities.

> Another related problem that I mentioned last week is that New Empire is
> completely broken (never works even with a nearby independent city). In
> this case, the single first city gets stuck in plan_random for some reason
> and oscillates between differen tasks. Haven't beem able to figure that one
> out yet.

I'm not too concerned about New Empire.  The original intent was to
emulate the big Unix Empire games, but the game definition is a long
way from being finished, so not yet much point in making the AI handle
it well.

Stan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]