Two more AI bugs
Jim Kingdon
kingdon@panix.com
Fri Jun 28 21:22:00 GMT 2002
> The culprit was the static array apnbt_types that was introduced 18
> months ago when Stan removed the MAXUTYPES restrictions in xconq. This
> array was not zeroed
Nice catch. I've been seeing some strange building behavior in the
standard game, but it's hard to say whether this might be it.
I've been thinking of writing some automated unit tests for xconq
(sample for this bug: take a known map and set of units, then call
auto_pick_new_build_task which is somehow rigged up to return back to
the test code around the select_by_weight call (which then checks the
weights against a known answer). But I haven't had much time, and as
can be seen by this example, it can be hard to know what level to hook
the test code in at. But it would prevent this kind of regression,
which can be kind of hard to spot by just noticing that the AI seems
stupider.
More information about the Xconq7
mailing list