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


On Sat, 2002-07-20 at 18:11, Hans Ronne wrote:
> Actually, the whole concept that cities have "exploratory" plans etc. is
> kind of flawed, and makes the AI code extremely complicated (take a look at
> how plan_exploration_support etc. actually work). What we would need
> instead is a PLAN_BUILD, and a unified building code for the AI. Kind of
> how it already works for the acp-independent units.

Maybe what we want is a strategic-level exploratory plan that figures
out what areas need to be explored.  If any units are in range to
explore it, they could then do so.  Otherwise, a nearby city/town could
build an exploratory unit that could explore the area.

> 
> Exploration, like all other activities, is divided into theaters. Which is
> sometimes good and sometimes bad. Within a theater, I think it would be
> difficult to come up with an algorithm that works better than random walk.
> One could of course try to write some kind of "lawn-moving" algorithm, but
> since each theater has a unique shape, this would not be easy.

On a mostly-water map, a random walk would probably be good for naval
units but bad for ground units.  The opposite would probably be the case
on a mostly-land map.  Maybe there should be some way to do both?

> 
> This is as it should be. When the infantry cannot reach it target, it will
> call for a transport. That part of the transport code usually works (if
> there are any transports around). The problem comes when the infantry has
> been picked up. Instead of heading for the target, the transport goofs
> around, and then heads pack to pick up another unit. At which point the
> first infantry usually disembarks.

What I meant was that if the infantry could figure out that it would be
unable to reach its target *before* it tried to move there, it might be
able to get a transport (a bomber or troop transport) a little more
easily.	Of course, that still wouldn't guarantee that the transport
would take the infantry where it needs to go.

> 
> As for the maze etc., the pathfinding algorithm could certainly be
> improved. Somebody (I think it was Ed) had some ideas about this last year,
> but they were never implemented.

I know that Freeciv uses a pathfinding algorithm that always gives the
shortest possible route and determines if the destination is
unreachable.  Of course, Freeciv uses a square map that results in quite
a few more shortest possible routes than a hexagonal map, so the
algorithm probably can't be cut and pasted into Xconq as it is.


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