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: Revised exploring_worth function


>However, I have not yet tested it enough to be sure that it works
>correctly.  I do see that the AI still will assign a short-range unit
>(e.g. a fighter) to explore an area that it couldn't possibly get to,
>but that probably means that there's a similar bug somewhere else in
>either the AI code or the planning code.
>
>Any comments?  I'm not (yet) completely familiar with the AI code, but
>as far as I can tell, this is an improvement.
>The new code is:

> range2 = um_storage_x(u, m) / ( um_consumption_per_move(u, m) * velocity );

Try multiplying by the velocity to get the range instead of dividing by it.
Otherwise, your code looks OK. I would be happy to include it when you have
tested it some more and are sure that it works as expected. The worth
functions are a very important part of the AI code that could be improved a
lot.

On the general question of exploration, I agree with Bob that it is
important, not only in the early phase of the game, but also later in order
to locate both independent cities and enemy units. The current AI code is
not very good at exploring, particularly in games where the terrain is
seen. This is because the exploration code only tries to explore unseen
terrain. I have been considering changing this for some time, so that it
also would look for enemy units. One of the fixes I checked in recently
(mplayer_decide_plan) assigns units that cannot fight to exploration even
if all terrain is visible. However, this is just a hack. It would be better
to fix the exploration code.

Hans

Hans Ronne

hronne@pp.sbbs.se



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