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: pathfinding refueling]


On Wed, Dec 17, 2003 at 11:54:47AM -0500, Eric McDonald wrote:
> On Wed, 17 Dec 2003, Peter Garrone wrote:
> 
> > I propose that only one material per unit type be considered for
> > refueling control during pathfinding.
> 
> Why only one? In the case of Bellum, c is every bit as important 
> as f1 or f2. A unit will become paralyzed without c.

Because when I am ferrying units about in standard, and bellum,
aircraft run out of one thing generally, fuel. The aim is to avoid
the clickathon.

> 
> > The pathfinding is helper-ai, not "refereed" code, so we try to keep it out
> > of the GDL. 
> 
> 'material-to-move' and 'consumption-per-move' are part of GDL. I 
> see no reason why the pathfinding should not pay attention to 
> those very important tables, even if the referee must as well.

Your assumption that I am ignoring these parameters is incorrect.

> 
> > 1) The storage of that material is greater than zero
> 
> Does this include treasury storage?

Its not a fuel if it is not consumed every turn or hex.

> 
> > 2) The consumption per move, or base consumption, is greater than zero
> 
> Fair enough.
> 
> > 3) The distance that the unit can receive the material is zero.
> 
> How is this a relevant criterion?

Because if distance is greater than zero, generally a unit gets resupplied
by the general resupply code at the end of a turn, and there is not
usually a problem such as with aircraft of continually moving it to a
point of resupply.

> 
> > I cannot see any units that require more than one type of fuel. In
> > bellum for example, the "c" material is not a fuel because it has a
> > send/receive distance greater than zero. 
> 
> A unit is not guaranteed to receive more "c" just because the 
> 'in-length'/'out-length' happens to be > 0. "c" is just as 
> relevant as "f1", IMO. Any refueling path heuristic should not 
> assume some hypothetical supply of a material; all calculations 
> should be done with material in hand.

OK you thought up c and you are taking it personally that I am assigning
it less consideration than fuel, right.
But if I am ferrying aircraft around, they run out of fuel, not c.
Your c represents the attention span and loyalty of the pilot I presume,
which is less than one tank of fuel? Are you attempting to simulate
reality or what?

With the algorithm I plan to implement now, c and f are treated
identically. If c has a distance of 0, then it would be considered a
fuel, but f would receive priority, because it would imply a shorter
range. But if c were set up to have a shorter range, then that would be
the critical fuel. If c and f were identical in range, and had different
supply unit positions, then it wouldnt work and the planes would crash,
but it would be a stupid game anyhow and I doubt I would bother playing
it.

> 
> > The main reason only one material can be a fuel are as follows:
> > - To be within range, a final untaken trip is calculated to a supply
> >   point, and having multiple supply points makes it all too difficult.
> 
> One can always choose to be greedy, meaning that when a unit stops 
> to resupply one material, it also tries to grab any others 
> relevant to its journey.

You miss the main point here. It is possible in the GDL to have
different units at different positions supplying different materials.
It is not possible to terminate such a path so as to guarantee
that a unit will be able to have enough fuel to travel to multiple supply
points. An infinite loop results if more than one fuel type at more than
one resupply point.

You are suggesting a "greedy" algorithm, which of course I imply in my
carrier fuel and ammo example. I dont see how you can suggest this but argue for
multiple material types in the pathfinding. You are trying to ride two
horses.

> 
> Also, if the journey is sufficiently long, then one must indeed 
> have multiple supply points, even if for one material.
> 
> > - It would require a variable length array to be added to pathfinding
> >   structures, making it a bit cumbersome.
> 
> I hope this doesn't sound too harsh, but I would prefer 
> correctness over not doing something because it is a "bit 
> cumbersome".

Harsh? A bit naive perhaps. But you could be right, though I dont see
how. I am inclined to identify the fuel type giving the shortest range
for a unit, and only pathfinding for that fuel type. This leads to
neater code, which is an important consideration when dealing with a
language like C. When an idea is "correct", the code is usually neater,
when its incorrect, it gets cumbersome.

> 
> > task. So an aircraft carrier could be assigned a refueling task to
> > support an invasion. It just sits there doing nothing while aircraft
> > automatically go to it, refuel, get ammo, and return to the attack.
> 
> OK. That is somewhat appealing.
> 
> > I would add some code to take ammo as well if refueling.
> 
> Sure, might as well.
> 
>   Regards,
>     Eric

You have not advanced any convincing arguments as to why more than one
fuel type should be taken into consideration when pathfinding. Unless
you can convince me that it is important to do so, and also address the path
termination problem, I will develop for one fuel type only, the fuel giving
the shortest range for a particular unit type.

Peter

----- End forwarded message -----


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