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]
Other format: [Raw text]

Re: Two more AI bugs


On Fri, 2002-06-28 at 11:23, Hans Ronne wrote:
> What exactly do you mean with "occasionally tries to build a non-air unit"?
> How do you detect this? I did a fair amount of debugging with the new code,
> and I never saw the AI try to build anything but air units. After the fix,
> that is.

I set up a two-player game, and put my side under mplayer control
(Side->AI->Mplayer; at least under tcltk).  I then watched my 1st
spaceport under survey mode, and saw that its task occasionally read
"Build infantry" or "Build armor", but only when it had a task such as
"Build mothership" did anything happen.

> 
> The reason for this is that the AI tries to build as powerful attack units
> as possible. Check out the code in offensive_worth (ai.c). Since your
> motherships are the only units in the game that can fire at a distance,
> they are deemed to be superior by the AI. If you want it to build other
> attack units, either give them the ability to fire at a distance, or take
> it away from the mothership.

The only problem with the AI using motherships that way is that they
take a long time to build.  Fighters are more useful for defense because
they move faster, and can destroy almost anything.  Of course, you need
lots of fighters if you want to attack a mothership or a city.


Looking at the code, I think that the generalized offensive_worth may be
why the AI plays games like "2200 AD" (future.g) so poorly.  Perhaps it
should be able to consider what kinds of enemy units a unit is most
valuable against in a less generalized way (e.g. don't attack a hovercar
with a defender, don't attack a defender with a sub, don't attack a sub
with a hovercar).  I don't have anything like that built into Colonizer,
but I was considering it.

> 
> Since your spaceports are advanced units that can grow in size, the AI will
> pick a spot where the material needed to sustain a big unit is available.
> In your case, it gets confused by the fact that no such material is defined
> for the spaceports. You should add a spaceport entry in the
> unit-consumption-per-size table. I guess fuel would be somthing needed to
> maintain a spaceport. Perhaps also food.

I'll try using fuel as a maintenance resource and see if that works.

> 
> The code should work as follows: no ships are built in cities that lack
> adjacent water cells. In addition, no ships are built if the adjacent water
> cell does not border on another water cell. This in order to prevent the
> building of battelships in the city pond. However, since the old code was
> broken, anything may have happened then. Have you seen this also after the
> fix?

Yes.  I saw one city with 8 dromunds, and the closest that the city came
to a water tile was an adjacent swamp.  Does the AI even understand that
dromunds are ships?


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