Re: [ADMIN-CODE] Track code theory question.

From: Chris Gilbert (
Date: 05/09/00

Pure Krome wrote:
> Hello again.
>     Another question that has been on my mind for a while was the use of the
> TRACKING code that comes with circle.
> I'm using it for mobs that HUNT DOWN people in it's MEMORY LIST. Eg. u hit a
> mob, and it remembers, then hunt.
> The other coder and I were talking about how the stock code handles the
> *finding the shortest path* the victim, and basically he we agreed that it
> has to parse through all the rooms.
> Well, we have over 15,000 rooms. So if we apply this to a few mobs (lets say
> 50, if there were around that many annoyed mobs and nearly that many
> players), wouldn't this get a wee bit CPU intensive?
> Wouldn't there be a better method to FIND the shortest path to a victim ?
> And secondly, what about terrain? can that be thrown in to the equation? eg.
> WEIGHTS to get their now - sorta like the Travelling salesman problem way
> back in the uni days .. *cringe and smile*

I'm probably missing something, but it does a breath first search.  so
it finds the shortest route (yes in the worst case that hits all the
rooms (ok so to start with it hits the whole room array to clear a flag,
so in theory it takes O(n) to clear the flag and then O(n) in the worst
case all the rooms have 1 exit to the next room)


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT