This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: pathfinding refueling
- From: Eric McDonald <mcdonald at phy dot cmich dot edu>
- To: Peter Garrone <pgarrone at acay dot com dot au>
- Cc: xconq7 at sources dot redhat dot com
- Date: Thu, 18 Dec 2003 23:12:33 -0500 (EST)
- Subject: Re: pathfinding refueling
OK, here are the scenarios. For the purposes of this discussion, I
have a couple working definitions:
(1) Fuel-Material: Any material which must be consumed during
normal movement of a unit.
(2) Range: The distance a unit can go, consuming a fuel-material,
before it must resupply that fuel-material.
And the scenarios are:
(1) Suppose that a unit has just finished with combat and is now
low on two fuel-materials, fuel1 and fuel2. The unit is at point
A. The unit would like to move to point B. Destination C has an
available supply of fuel1, but no available fuel2. Destination D
has an available supply of fuel2, but no available fuel1. The unit
consumes fuel1 and fuel2 at the rate of 1 per move. The unit has 3
out of 10 fuel1 and 4 out of 8 fuel2. The distance from A to C is
3, from A to D is 4, and C to D is 2.
Under your proposal, fuel2 would be regarded as the critical
fuel-material. However, because fuel1 is in a low supply
condition, either you would have to wait for the player to request
the destination again to override a safeguard (similar to the
existing behavior), or else you would have to ignore it under the
assumption that it would be replenished at the end of the turn. If
you ignored it, then you seem to suggest that the unit would be
directed towards destination D (because fuel2 has the shorter
range). However, in that case, the unit would never make it,
because it would run out of fuel1 first.
Under my proposal, I would make sure that the player was aware
of the fuel-materials situation by perhaps making him/her
re-request a destination. If given the re-request, then the
pathfinder would recognize that fuel1, not fuel2, was the most
critically needed, and would direct the unit towards destination
C, not D. The unit would arrive at C and refuel. After that, the
unit would still be in a predicament because it would have only 1
fuel2 left to reach D with, __not enough. However, it would have a
better chance at regaining mobility or just surviving because it
was able to replenish fuel1 (at least to some extent).
(2) Consider scenario 1 with the following modification. The unit
now has 6 out of 8 fuel2.
Under your proposal, the unit would attempt to reach destination
D (as in scenario 1) and would fail because it ran out of fuel1
first (as in scenario 1).
Under my proposal, the pathfinder would recognize that fuel1 was
the more critical and would attempt to reach destination C. The
unit would reach destination C, refuel, and then attempt to move
to B. Having only 3 of 8 fuel2, it would then divert to D (or
possibly a destination E, if E was within range, had available
fuel2, and was closer to B than D). There, it would refuel, and
then attempt to move onward to final destination B. In this
circumstance, my proposal is a clear win, because the unit
remains mobile and intact.
I have a few other scenarios in mind, but I am getting tired, so I
will leave them for another day (perhaps tomorrow).
Eric