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: AI (was error handling)


>I haven't looked at the AI code yet, but from the discussion, perhaps
>it's overly deterministic.  Perhaps adding some randomness and feedback
>would improve things, and make it more capable?
>
>For example, rather than choose one best answer, perhaps having it score
>the top 4 or 5 uses for a unit, and assigning them to those plans based
>on the weights for those uses rather than trying to pick the best plan
>always?  I know in Alpha Centauri and Civ II I sometimes use offensive
>units as explorers either because their survival chances are better, or
>because they don't have a good use other than exploring at that
>particular time.

This is how the AI works in most cases. A unit typically has a 10% chance
of doing something unexpected. Still, I would argue that the colonizer is a
special case. Every colonizer that does not build a city is a wasted
colonizer. There is a lot of game testing, particularly in the advances
game, to support this. The side who wins in an AI vs AI game is almost
always the side that expands mosty quickly and builds most cities early in
the game. The determining factor is usually the terrain rather than the AI
code, which is the same for all sides, but the principle is still valid.

>Another, probably harder, change would be to add "furtur worth"
>calculations to the process of selecting plans.  I.e.; for money, if I
>believe I can get a rate of return of 4% on an investment, then $1000
>now is worth about the same as $1480 in 10 years.  It's been quite a few
>years since my course on "rational decision making and risk management",
>but from the discussion threads I've been reading on this list, the AI
>was designed to make the best immediate decision, rather than managing
>risk, and ignores future risk/benefit analysis entirely.
>
>Longer term, a GA feedback system to evaluate the unit values assigned
>by the designer would be nice, and a GP system would be even more
>desirable.  And a lot of work.  I've been taling off and on with a
>friend that's into AI off and on about it (He's a teacher in CS over at
>University of Houston).  I have too many current Xconq projects to work
>on to do anything serious about it right now, but maybe I can work on a
>gplayer for Xconq 8.0. :-)

That would be very nice indeed. The AI is a part of xconq that can use a
lot of improvements. The action-reaction code did make it more responsive,
but the latter is still a hack grafted on the old mplayer. I've been
thinking about writing a new AI from scrath myself, but haven't had time
for that yet. I think the biggest problem with the mplayer is that it
analyzes the game in a static way. The whole world is divided into theaters
or AI regions, and the mplayer then focuses on clearing one theater after
another from enemy units. What does not work well is reassignment of units
to new theaters. It will happen eventually, but only after every single
enemy unit has been cleared. So the AI fails to follow up on early gains by
sustained attacks deeper into enemy territory.

I think an AI that identifies attack vectors (main directions of enemy
units) and throws all offensive units in that way would be a much tougher
opponent. This is how the AI in civ seems to work.

Hans



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