.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Common Questions (http://forums.bots-united.com/forumdisplay.php?f=51)
-   -   danger_factor - what is this exactly? (http://forums.bots-united.com/showthread.php?t=1681)

KWo 16-05-2004 13:35

danger_factor - what is this exactly?
 
In the podbot.cfg file I can see some description about dange_factor parameter:

# The setting below specifies the danger factor with which the bots
# will weighten any waypoint where they have been killed in the past,
# in order to avoid it later. The higher the value, the more the bot
# will care about these waypoints and pick other routes instead.
# Progression is logarithmic. Warning: higher values require more CPU.
danger_factor 800

What exactly is this meaning? What exactly will I see the difference in bots behavior when I put 100 or when I put 10000 for this parameter? What is the correct range for this variable? http://forums.bots-united.com/images/icons/icon4.gif
I understand - if bot is killed in some place once, according to this parameter - next rounds bot will try to find another way to go - if parameter is set to max_possible_value - bot will go never this way (if this is possible). If this prameter is set to min_possible_value - the collection of experience is like without this collection (like collectexperience off) - so bot doesn't care about the past. Or maybe I'm wrong (for sure...)? ???:(

Before posting by some coder to this thread, maybe somebody not-coder try to say, what did he understand from the description from podbot.cfg about this parameter. Maybe only for me this is not so clear? Maybe simply I'm too stupid to understand this...
I know - coders don't want to write 50MB descriptions, but it's much more better give one or two examples than write 50MB description...;)

sPlOrYgOn 16-05-2004 14:46

Re: danger_factor - what is this exactly?
 
okay...
I'm not a coder :D
danger_factor affects how scared they are of a place when their friends die there.
so if you give the danger_factor a low number, the bots would be less scared of places where their friends have died in the past.
if you give it a high number, the bots will be really scared and try to avoid taking that path as much as possible.
When they are scared of a certain place they will choose a different path to reach their destination.

if you had a danger_factor.. I'd say it's probably set at over a million...
because everytime someone says something that is against what you say you seem to think they hate you and you try to avoid them :D

>BKA< T Wrecks 16-05-2004 15:15

Re: danger_factor - what is this exactly?
 
Awwww, c'me on, sPlO... that's a thing of the past. You read that stupid old thread, didn't ya? Because recently I haven't seen anything that justifies your remark.
Let's better stick to the topic here: So bots are not only affected by their own death at a certain point, but also by their teammates dying there, right? Just want to make sure I got this right...

sPlOrYgOn 16-05-2004 15:27

Re: danger_factor - what is this exactly?
 
you must haven't read the other threads..
that 50mb thing justifies it..
and no coder thing too.

and yes any death on their team including their own affects the area.

KWo 16-05-2004 15:57

Re: danger_factor - what is this exactly?
 
Quote:

Originally Posted by sPlOrYgOn
okay...
I'm not a coder :D

Yes - in this case You are a liar :D (don't get this too serious, please http://forums.bots-united.com/images/icons/icon10.gif)

Quote:

Originally Posted by sPlOrYgOn
danger_factor affects how scared they are of a place when their friends die there.
so if you give the danger_factor a low number, the bots would be less scared of places where their friends have died in the past.
if you give it a high number, the bots will be really scared and try to avoid taking that path as much as possible.

OK... Until this point all is clear for me. But I still don't understand what can I see the difference between value for this parameter 100 and 100000? I need an example like this:

danger_factor 0
Bot was trying to go by some "critical" point everytimes during 100 rounds (they don't care about this)

danger_factor 100
Bot was trying to go by some "critical" point 20 times during 100 rounds.

danger_factor 1000
Bot was trying to go by some "critical" point 1 times during 100 rounds.

danger_factor 100000
Bot was vever trying to go by some "critical" point during 100 rounds.

The example like above will be much more clear than that description.
I know - maybe it's impossbile exactly write how many times..., but I want to see only a scale of changing bot's behavior according to this parameter.???:(

Quote:

Originally Posted by sPlOrYgOn
because everytime someone says something that is against what you say you seem to think they hate you and you try to avoid them :D

I simply try to be nice, but I understand that only me I have many problems here and only me I ask about something - so maybe people can have enough this. It seems like nobody has so many problems like me. Some persons here have not so much patience like You. After too many my questions/asking they start to be a little bit more nervous. So I try to avoid this.
http://forums.bots-united.com/images/icons/icon5.gif

sPlOrYgOn 16-05-2004 16:08

Re: danger_factor - what is this exactly?
 
it's not your questions that are making people like this..
you saying no 50mb description or coders is pointing exactly at someone you don't want to reply...
And your scale is wrong.
damage_factor doesn't change the value that they try to avoid something.
it changes the danger value of a waypoint that is added when they or their friend dies there.

so 0 would mean no danger is added when a bot dies there.. so the bot doesn't care at all if they or their friends have died there in the past.

and as you increase the value the more "danger" value will be added to a waypoint.

so with 100000000 damage_factor, if even 1 guy dies there they'd be scared as fuck and almost never go there again. But since that value is so high and the only other route someone dies there too.. they'd start getting scared of both routes but the route with more danger value will be used less.

so take for example..
in de_dust.. a Terrorist bot decides to lead the whole team through the underpass...
the whole ct team has awps and is all around the underpass...
the whole T team dies.
The Terrorists will almost absolutely go the other way the next round... depending on the danger_factor value.

KWo 16-05-2004 16:51

Re: danger_factor - what is this exactly?
 
Quote:

Originally Posted by sPlOrYgOn
it's not your questions that are making people like this..
you saying no 50mb description or coders is pointing exactly at someone you don't want to reply...

No - You are wrong. Look simply here:

http://forums.bots-united.com/showpo...33&postcount=6


Quote:

Originally Posted by sPlOrYgOn
it changes the danger value of a waypoint that is added when they or their friend dies there.

So there is another extra virtual flag like "danger" and this is written to pxp files. And this is the same like in old pxp (collectexperience on) system.

Quote:

Originally Posted by sPlOrYgOn
so 0 would mean no danger is added when a bot dies there.. so the bot doesn't care at all if they or their friends have died there in the past.

And this was clear for me since begining.

Quote:

Originally Posted by sPlOrYgOn
and as you increase the value the more "danger" value will be added to a waypoint.
so with 100000000 damage_factor, if even 1 guy dies there they'd be scared as fuck and almost never go there again. But since that value is so high and the only other route someone dies there too.. they'd start getting scared of both routes but the route with more danger value will be used less.

Yes - I understand this all... - my question is - if on some map there is only one way for bots and every round they should go by this way (because I prepared this pwf especially for this strange test) and one round somebody were killed, next round they shoud go this way because there isn't another way - what is a difference in this case - if I put 100 or if I put 1000000 for this parameter? In these both cases bots have to be careful the same (some of them was killed there, but there isn't another way). So what can I see a difference between their behaviors? What is meaning "scared" more (they will throw grenade first and after go or what?).

How much less they will use the way (route) between 100 and 100000 value of parameter? For example 100 rounds - first case - 10 times, second case - once or how?

Quote:

Originally Posted by sPlOrYgOn
so take for example..
in de_dust.. a Terrorist bot decides to lead the whole team through the underpass...
the whole ct team has awps and is all around the underpass...
the whole T team dies.
The Terrorists will almost absolutely go the other way the next round... depending on the danger_factor value.

So this means some probability of go by another way in the case of some death. Continuing Your example - after 30 rounds there are about 100 waypoints with this "danger" flag in pxp file. So where can bots go in this case? What is a difference after 30 rounds if I put 100 or 10000? Maybe after 1 hour 30% of waypoints on the map have this "danger" flag. I need to know how many times will they try to go (plus/minus) by these waypoints after 1h? Or maybe this is the number of collected waypoints with danger flag? After 1h bots can forget some waypoint danger before (for example 55 min ago) and they remamber only last 100 (if I put 100).

OK - this is maybe difficult to answer. I'll try ask simply - why is the default set as 800? What is meaning exactly this value? Why there is not 200 or why there is not 1000, but there is 800????:(

Plaese - more patience for me - I want to know only what can I suppose to see if I change this value from 0 to 100000. Maybe this is not so much important, but if there is a parameter to change I want to know how to use it.

sPlOrYgOn 16-05-2004 17:23

Re: danger_factor - what is this exactly?
 
they will choose the path with the least danger value.
so even if all the danger values are very high they will choose the path with the least danger value.
and each round the danger value for each waypoint is decreased. I dunno by how much tho..
if there is only one path then they have no choice and therefore danger value is almost useless since there is only 1 path.
just play around with the value until you find a good value that you think most humans are like.

KWo 16-05-2004 19:07

Re: danger_factor - what is this exactly?
 
OK - Now I understand much more than before starting this thread. Correct me if I'm wrong - every bot's kill near some waypoint add some value (maybe this danger_factor) and this is accumulated (if next round next bot or the same is killed near the same waypoint) - this value is increased. But if one round nobody (no one bot) is killed near this waypoint - the value for this waypoint is decrased (probably by the same value - danger_factor).

sPlOrYgOn 16-05-2004 19:09

Re: danger_factor - what is this exactly?
 
yea I guess it's something like that.

KWo 16-05-2004 19:37

Re: danger_factor - what is this exactly?
 
Quote:

Originally Posted by sPlOrYgOn
yea I guess it's something like that.

OK - Now need only ask PMB why the default is 800 and what exactly is meaning this 800, because this is still not clear for me. Probably he made some tests and after these tests he gave this value as default. I' ll wait.

sPlOrYgOn 16-05-2004 19:45

Re: danger_factor - what is this exactly?
 
well he probably thought 800 was a good value...
I think so too..
I've played de_dust for about an hour and saw after about 5 or so bots die in one area the rest of the living bots start running the other way :D
this is what happen..
there are 30 bots..
15 T, the whole team, goes through underpass.
5 of them get killed and the other 10 start running back up the stairs and going to hall.. :D
at least it works pretty well...

Pierre-Marie Baty 16-05-2004 23:05

Re: danger_factor - what is this exactly?
 
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

KWo 17-05-2004 02:45

Re: danger_factor - what is this exactly?
 
1 Attachment(s)
Thanks a lot for this explanation. I hope I will more understand from this tomorrow, because now - after my 6h tests with botskill parameters - You can see results here: http://forums.bots-united.com/showpo...1&postcount=15

- I 'm simply too much tired to try understand this explanation at this time (2:45AM).

Once again - thanks a lot PMB.:)

EDIT

OK - I used a dictionary and I hope now I understood all.

You said :

Quote:

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).
This means for me some strange situation. If there is a place on the map with a some waypoint and near it "fire in the hole" was, and each from 5 bots from one team took 99 damages , but no one was killed, the cost of this waypoint is not changed. But the same waypoint, the same situation - each 5 bots took 20 damages and everyone was killed - the cost of this waypoint =5*20*danger_factor. This is a little bit distressing.

I hope this alghoritm can calculate the same way on these two examples at my attachement. Imagine, that there is a map 100m x 100m and at first You have waypoints every 10m (10wp x 10wp), at second (the same range) You have waypoints every 16.67m (6wp x 6wp). S is a started waypoint , G is a goal waypoint, K is a waypoint where the bot was killed (the same damage on both maps), A is a wypoint nearby K, W is a wypoint not affected by K. In both situation I set danger_factor at the same value.
I hope that the distance beetwen two waypoints (between A and K) is affected to how much less the waypoint nearby are weightened, too. This should be logarithmic , too (I hope). Because if not - if the same "less" value have at both maps (but the distance beetwen 2 wp is longer at the second map) - this danger_factor can't be constant at both these maps to give the same result (the same path calculated to go). In this case the danger_factor should be depanding of "density" of waypoints on the map. The red line I showed the way for bots after taking "a kill" at K point. The blue - I think is the optimal way (between to A) and both way from S to G (across only the red lines and across the red and the blue) should have the same cost like this red - in this case probably the danger_factor is optimal. But it's depanding of people - how big area they want to avoid after killing bot. This should be showed at the table - danger factor aaa, damage 100 = distance to avoid bbb meters. In this case all will be clear to all people wanting use/change this parameter (danger_factor).

Once again thanks a lot of for explanation. http://forums.bots-united.com/images/icons/icon5.gif

/EDIT

KWo 17-05-2004 14:49

Re: danger_factor - what is this exactly?
 
Sorry for double posting, but this "edit" function prefered by all here doesn't change the date and time stample of the post, so nobody can see I wrote something more. http://forums.bots-united.com/images/icons/icon10.gif

@$3.1415rin 17-05-2004 15:39

Re: danger_factor - what is this exactly?
 
the water comparision is only true for water which is somehow attracted by the goal :) otherwise it'd be BFS

on http://www.lampel.net/johannes/joebo...XPDoc-beta.pdf on page 13 you can also find a short description of A*. but for further information, check the links at botman's site or maybe even those at gamedev.net

Huntkillaz 17-05-2004 22:39

Re: danger_factor - what is this exactly?
 
Quote:

Originally Posted by KWo
Sorry for double posting, but this "edit" function prefered by all here doesn't change the date and time stample of the post, so nobody can see I wrote something more. http://forums.bots-united.com/images/icons/icon10.gif

actually if u write

edit:


and that means what follows was edited part if it's in the mid just use like quote

edit:
hi:)
/edit


and even the the post date n stuff don't change atthe botttom of the post it says

'last edited by kwo on blah date blah time' so ppl will know and there's no need to post..double see (down here \/ )

>BKA< T Wrecks 17-05-2004 23:15

Re: danger_factor - what is this exactly?
 
Quote:

Originally Posted by Huntkillaz
actually if u write
edit:
hi:)
/edit
and even the the post date n stuff don't change atthe botttom of the post it says
'last edited by kwo on blah date blah time' so ppl will know and there's no need to post..double see (down here \/ )

Yes, that's true. But will the thread / forum be marked as having a new post inside? I think that was what KWo was getting at.
If nobody posts anything new in the "common questions" forum, and only KWo edits his last post, will I see this yellow symbol next to the "common questions" forum that tells me: "hey, there's a new post in here"?

Ok, now I
EDIT
my post... :D just read your stuff, KWo, and I think this time it's ME who's too tired ;) . Anyway, I think this mathematic example is fine, but most waypoint systems on real maps are far more complicated. Besides, on a real map there is not necessarily a connection between two waypoints that are theoretically close enough to be connected.
But in general, I agree with two of your main arguments:
a) that in an ideal case, it would not be a bot / player death (it could have been a bot with just 3 HP left) that causes a higher danger value, but the inflicted damage measured in hit points - whether it kills someone or not. Maybe even stronger if it has killed someone.
b) that "nearby waypoints" are not defined as waypoints that are one connection away (no matter if this connection is 100 or 250 units long), but as waypoints which are inside a circle around the center waypoint (where the danger was caused), with the diametre of the circle depending on the inflicted damage - the higher the damage, the bigger the circle.

Ok, but let's leave theory aside for a moment: (1) the waypoint matrix is not two-dimensional but three-dimensional, (2) there are obstacles like solid walls or (think of the 3 dimensions!) floors and ceilings inbetween, and (3) it's all VERY dynamic. It would be a hell to calculate all this shit AND take into consideration if the "danger radius" is blocked by a solid obstacle etc. etc.
After all, the main purpose of this function is to get bots to use different routes, and I think that works fine the way it is. And if I get a sufficient result with a not-so-exact calculation, I don't think you have to break a leg to think of a super-accurate calculation that will eventually lead to a result that's equally sufficient, but not noticeably better. Well, just my opinion, of course. 9_9


All times are GMT +2. The time now is 07:31.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.