It would be meaningless to try to explain what this value of 800 represents and to define a scale with a minimal and maximal value, because the progression is logarithmic. For example, there is quasi no difference at all in practice between 800 and 1000 but there is a great deal of difference between 200 and 400. The danger factor rises very fast in the low values, and slower and slower the more high you get.
This value must be strictly positive (> 0).
It is tightly related to how the pathfinder works. In algorithmic terms it's simply the cost factor.
An A* pathfinder works exactly like the guy who pours a glass of water. The "water" starts to spread from the current waypoint in all directions and stops immediately when the goal waypoint is found. Each time the "water" (i.e, the search) advances to a new waypoint, it adds something to the cost it takes to go to this waypoint. And in order to direct the search towards the goal, the search also stores the estimated cost it thinks it WOULD take to get from there to the destination waypoint. The final cost, which determines whether the pathfinder likes or dislikes this waypoint, is then as follows:
waypoint cost = actual cost to get there + estimated remaining cost it would take from there to the goal.
The estimated cost is called the pathfinder heuristic. It's simply an estimation based on the remaining distance. In our water spreading example, it works as if the map was "inclined" towards the goal when you start to pour the water.
How fast the water advances in a certain direction is determined by the cost it takes to get to the waypoint the water (search) has currently reached. When someone in the bot's team is killed at a particular waypoint, this waypoint is weightened with the damage taken and the nearby waypoints are weightened a bit too (but less). The
danger_factor is how much this waypoint weight will be multiplied by in computing the cost to go to this waypoint.
For example if at a particular waypoint a guy died by losing 40 health in a row, this waypoint's cost during a pathfinding session for a bot in his team will be:
cost = sum of all the weights for all the waypoints that led to this one + (this waypoint's weight *
danger_factor)
that is to say,
cost = sum of the previous weights + 40 * 800
that is to say that the pathfinder will dislike this waypoint very much, and the "water" will take a LONG time spreading from this waypoint to the next one during the search. In fact the same water will be likely to touch the goal faster by another route than it will take to move from this waypoint to the next one. If the other route is VERY long (or very expensive too), then despite the very high value for this waypoint the search will have advanced and continued to the goal faster than the time it took to travel all the way by the other route, but what happens most of the time, is that when the search "forces" to advance after this waypoint, meanwhile it expands everywhere else and another route is discovered before the costy waypoint is passed.
I have uploaded a small utility that was written by Brian Stout for an article he did for GamaSutra that will make you understand how all the different pathfinding algorithms work. I recommend everyone to give it a try.
http://filebase.bots-united.com/pafi...on=file&id=106