[MUD-Dev] Re: Less numbers, more roleplaying.

Jon Leonard jleonard at divcom.umop-ap.com
Sat Nov 29 14:49:01 CET 1997


On Thu, Nov 27, 1997 at 11:28:04AM +0000, Richard Woolcock wrote:
> Appologies for the length of the examples in this mail...
> 
> Adam Wiggins wrote:
> > 
> > [Richard Woolcock:]
> > > > of winning.).  A T-Rex just sees 100-200 pound of fresh USDA grade A
> > > > human.
> > >
> > > So called 'Intelligent' mobs should go for the weakest opponent.
> > 
> > They should?  I consider myself intelligent, yet I always consider
> > the most dangerous opponent to be my first target in a combat
> > situation.
> 
> Hmmmm I'm not sure now.  Certainly, you'd be more worried about the
> most dangerous opponent, but equally, which would you rather have?

[scenarios deleted]

I worked out the math behind this a while back, and given some assumptions,
it doesn't matter what order.

If you assume that you have several opponents who:

1) Fight to the death
2) Always do the same amount of damage, while living
3) Do damage in proportion to what it takes to kill them

Then it doesn't matter what order you attack them in.


To see why, consider a graph of damage done over time:

(example of 2 1-unit attackers and a 2-unit attacker)

+---+         +-+           +-+
|* *|         |*|           |*|
|   |         +-+---+       +-+-+
|* *|    vs.  |* * *|  vs.  |* *|
+---+-+       |     |       +---+---+
|* * *|       |* * *|       |* * * *|
+-----+-+     +-----+-+     |       |
|* * * *|     |* * * *|     |* * * *|
+-------+     +-------+     +-------+

time ---->

Each order has 11 *'s.  This is because no matter what the ordering, opponents
will always be doing damage in the lower left triangle, and each individual
will add another triangle in the upper right.  Rearranging the added triangles
doesn't change the area (total damage).

If the assumptions don't hold, then strategy emerges.

If your opponents may not fight to the death, then killing one quickly may
cause some to run away.  Likewise, if you can flee, killing some before you
run makes the next fight easier.

If damage dealt reduces in proportion to heath, then it really doesn't matter
who you hit when -- there aren't any extra triangles as above.  If slower
or faster, then you need to kill quickly, or hit everyone, depending.

If opponents aren't all equally effective in proportion to their health,
then kill the flimier/more dangerous ones first.

For programming less intelligent monsters, I'd recommend having them pick
an opponent at random, and then try to finish them off.  This makes any
strategy attacking them risky for an individual.

Jon Leonard



More information about the mud-dev-archive mailing list