.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > FritzBot
FritzBot A bot for Return To Castle Wolfenstein - by Maleficus Return to Castle Wolfenstein

Reply
 
Thread Tools
Can't make my routes work!
Old
  (#1)
the bindlestiff
Member
 
the bindlestiff's Avatar
 
Status: Offline
Posts: 280
Join Date: Nov 2005
Location: Washington state
Default Can't make my routes work! - 01-01-2006

I'm learning the ropes by waypointing the little map "mp_zion," and have run into difficulties making my routes work.

The dynamite objective is on either side of a door. I placed linked dynamite actions on each side of the door. The inside of the door is a perilous place and the engineers don't survive long there. There is a longer circuitous path to the outside of the door which is much safer for planting dynamite. I'd like the bots to use this path some of the time. I have the Route set up EXACTLY as described in the tutorial and as seen in other maps. The Route's target action is "4," allied only, and is linked to an Alt Roam action that is placed in an unambigous section of the safe path leading to the door. Another linked Alt Roam is on the short path. The Alt Roams are "active forever," and the dynamite actions are in Group ID 0.

The Route is placed in the spread-out allied respawn area with a relatively large radius of 600. My observation of the bots spawning shows that they are all within the coverage of the Route. No chance of them not getting the routing data.

No matter what I try, the engineer bots ignore the safe path and take the shortest path to the door -- the unsafe one. I even tried linking the Route to six instances of the safe Alt Roam action to force the randomizer to choose it, but to no avail.

My understanding from the tutorial is that a Route is mandatory for the bots -- they must choose one of the linked Alt Roams at random, then calculate a path to the selected action, and from there calculate the shortest path to the objective. This isn't happening.

My other Route is for escaping after the documents are stolen. I have the same situation there -- a relatively safe route and an unsafe, shorter one. This Route doesn't work either.

Anyone have any helpful hints for a befuddled newbie waypointer??

BTW, HAPPY NEW YEAR!!!!

Oops! This was supposed to go to the Waypointing Forum. Sorry. . .
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#2)
Denny
FritzRTCW Team Member
 
Denny's Avatar
 
Status: Offline
Posts: 370
Join Date: Oct 2004
Location: Minnesota, USA
Default Re: Can't make my routes work! - 01-01-2006

Try moving you're alt roam actions around for each path (try them at different locations on the path, etc.). The alt roam actions can be kind of picky so placement is everything. I have this same exact problem with the route system as well (especially for Market Garden) me and mal got into a pretty lengthy discussion about this one time because i too thought that the bots were refusing to take one route over another, which kind of challenges the point of using a route system (in some areas, but it's main purpose is to keep the bots from randomly wandering the level)

I think it shouldn't matter how they are placed, but that's how it goes i guess. This is another note that needs to be added to the tutorial.


FritzbotRTCW Official Waypointer & Beta Tester
Updated: 1/12/06

Click Here to view my current waypointing progress.
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#3)
the bindlestiff
Member
 
the bindlestiff's Avatar
 
Status: Offline
Posts: 280
Join Date: Nov 2005
Location: Washington state
Default Re: Can't make my routes work! - 01-01-2006

Hi Denny,
How close to the route path should the Alt Roams be? Do they need to be placed right next to nodes? How picky do I need to be? What in the code makes the placement so finicky? Knowing this might give me an insight to succeed with my routing.

I tried moving the Alt Roam along the path in increments of about 128 units (using an adaption of your "Rule of 256"). I kept the Alt Roam placements fairly close to the actual path.

My test routine was to move the Alt Roam, save the Nav file, restart the map, and watch my team of six engineers to see where they went. None ever ventured down my route. All chose the shortest route to the objective. The Route Action is linked to six instances of the Alt Roam action number so it should have been picked regardless of random choice. And its target action is definitely the dynamite objective (#4).

While snooping around in Depot as you suggested in the tutorial, I found three Axis routes that were pointed to "Aim" actions (#3). The three Allied routes went to dynamite objectives. I thought that routes could only be used for dynamite, steal, or escape objectives. Is this an error or some sneaky waypointing trick?
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#4)
Maleficus
Member
 
Maleficus's Avatar
 
Status: Offline
Posts: 1,054
Join Date: May 2004
Location: Planet Earth
Default Re: Can't make my routes work! - 01-01-2006

They only can use dynamite, steal and deliver for routes. If they were pointing to aim, that prolly explains why the axis never take the sewers to the field ops, but the allies will on MP_DEPOT. This is a pathing bug, not a bot bug.

All of the dnyamite actions should be linked together - are they? If not, the code will mistakenly pick one of them (the first it reaches), and treat that plant action as THE plant action for that particular goal. This would explain why your routes are ignored: the action on the other side of the door isn't "seen" by the code. By linking the actions together, you let the bot know there are ALL valid actions, for one target, and the bot will pick which to go to. And the code will intelligently know how to handle the actions when its completed.

Route placement IS very important.

Think of it this way: the bots always want to take the shortest route to their goal. If you want them to take a longer way to the goal, you need to have the route placed in such a way that by the time the bot reaches that roam action, the shortest way would be the path you want it to take.


Look at the attached pic below for a simple example:



The red dot is the bot.
The blue dot is the location where the bot wants to go.
The white lines are the possible routes to the goal (2 routes possible).
The green dot is the alt route action.


As you can see, to just take route 1 to the goal would be the fastest, and if left up to the bot, that is what they would prefer. But maybe you want them to take the longer way (maybe its safer), you will have to place the green dot in such a way, that by the time the bot gets there, taking route 2 is now the shortest route to the goal (going back to where it was before and then going on route 1 would be longer).

If you moved the green dot too close to the red one, the bot would just go to it and then back track to where it was then continue to take route 1 to
the blue dot.

If you move the green dot too close to the blue one, just taking route 1 to reach it is still faster, and route 2 is ignored again.

You have to position the green dot in such a way, that going your route (number 2) is the better choice once the bot gets there - and thats why placement is important.

I hope that helps. I'm not really good at documentation, and I know it sometimes causes some confusion for you guys, but I'm really pleased with what your all doing, and I encourage you to continue working on paths, and I will try to help you as best I can.

Cheers!
Attached Thumbnails
Click image for larger version

Name:	route.jpg
Views:	401
Size:	9.0 KB
ID:	800  


Dum Spiro Spero


  
Reply With Quote
Re: Can't make my routes work!
Old
  (#5)
Maleficus
Member
 
Maleficus's Avatar
 
Status: Offline
Posts: 1,054
Join Date: May 2004
Location: Planet Earth
Default Re: Can't make my routes work! - 01-01-2006

Quote:
Originally Posted by Denny
(in some areas, but it's main purpose is to keep the bots from randomly wandering the level)
The bots never wander aimlessly - they ALWAYS have a goal of some kind. And they always try to get there with as direct a path as possible. The route system is there to make them take alternate routes to their very important goals, and nothing else.


Dum Spiro Spero



Last edited by Maleficus; 01-01-2006 at 10:11..
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#6)
Denny
FritzRTCW Team Member
 
Denny's Avatar
 
Status: Offline
Posts: 370
Join Date: Oct 2004
Location: Minnesota, USA
Default Re: Can't make my routes work! - 01-01-2006

Quote:
Originally Posted by the bindlestiff
While snooping around in Depot as you suggested in the tutorial, I found three Axis routes that were pointed to "Aim" actions (#3).
Hmmm....Interesting, if that is true i'll fix it but it isn't intentional.

P.S. - That is a really good explination of the route system btw Mal.


FritzbotRTCW Official Waypointer & Beta Tester
Updated: 1/12/06

Click Here to view my current waypointing progress.
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#7)
Maleficus
Member
 
Maleficus's Avatar
 
Status: Offline
Posts: 1,054
Join Date: May 2004
Location: Planet Earth
Default Re: Can't make my routes work! - 01-01-2006

Quote:
Originally Posted by the bindlestiff
My understanding from the tutorial is that a Route is mandatory for the bots -- they must choose one of the linked Alt Roams at random, then calculate a path to the selected action, and from there calculate the shortest path to the objective. This isn't happening.

My other Route is for escaping after the documents are stolen. I have the same situation there -- a relatively safe route and an unsafe, shorter one. This Route doesn't work either.
Yes, if you specify any routes, they MUST use them - IF they are going to the action the route points to. The route node points to the action - make sure yours are pointing to it.

Also - alt roams can be disabled, in the script or at startup. Make sure the group num of the alt route action is not -1. It doesn't matter what number it is, as long as its not -1.

Cheers!


Dum Spiro Spero



Last edited by Maleficus; 01-01-2006 at 11:49..
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#8)
Denny
FritzRTCW Team Member
 
Denny's Avatar
 
Status: Offline
Posts: 370
Join Date: Oct 2004
Location: Minnesota, USA
Default Re: Can't make my routes work! - 01-01-2006

Quote:
Originally Posted by Maleficus
Also - alt roams can be disabled, in the script or at startup. Make sure the group num of the alt route action is not -1. It doesn't matter what number it is, as long as its not -1.

Cheers!
I thought alt roams can't be turned off once activated?


FritzbotRTCW Official Waypointer & Beta Tester
Updated: 1/12/06

Click Here to view my current waypointing progress.
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#9)
CrapShoot
A Monkey
 
CrapShoot's Avatar
 
Status: Offline
Posts: 386
Join Date: Jan 2005
Default Re: Can't make my routes work! - 01-01-2006

Action #3 on Depot is the dynamite action on the Allied Field Ops. Maybe the action number got confused with the action type.

The routes look to be set up correctly to me.

IRT Bindlestiff:

You may want to double check the route_team setting on your routes.

Last edited by CrapShoot; 01-01-2006 at 18:48..
  
Reply With Quote
Re: Can't make my routes work!
Old
  (#10)
the bindlestiff
Member
 
the bindlestiff's Avatar
 
Status: Offline
Posts: 280
Join Date: Nov 2005
Location: Washington state
Default Re: Can't make my routes work! - 01-01-2006

Thanks for the pointers, guys. Here are the settings that I have in the game:

1. The two dynamite actions on either side of the door are linked to each other. They work properly when the dynamite goes off whether planted on the inside or outside (while testing the game, I have personally set it off from outside the door since my bot engineers won't go there)

2. Route #0 at the Allied spawn points to the dynamite action (#4) and Route #1 at the Documents points to the extraction point (#32).

3. The alt roam Group ID numbers are all 0 and they also are set to be "active forever."

4. The route_team is set to Allied (#2).

I just now fired up the map and rechecked those settings to be sure!



Mal, your explanation of the route system was very clear to me and explains fully how the system works. Let's throw some math at it to see how picky the alt roam placement really is. Using Mal's example:

Let D1 be the short route from the bot to the objective (red to blue)
Let D2 be the longer route via the alt roam (red to green to blue)
Let f be the fraction of D2 that extends from red to green

There are two cases to consider:

CASE 1: the alt roam (green) is too close to the start (red).
The bot will travel to the alt roam then turn around and go back past the starting point and take the short way to blue. To keep this from happening, the following inequity must be satisfied

D1 + 2* f*D2 > (1-f) * D2

solving for f,

f > (D2 - D1) / 3*D2


CASE 2: the alt roam (green) is too close the the finish (blue). The bot will take the shortest route to the alt roam (which in this case is via the short route through the finish and on to the alt roam) then turn around and go back to the finish (blue). To keep this from happening, the following inequity must be satisfied

D1 + (1-f)*D2 > f*D2

solving for f,

f < (D1 + D2) / 2*D2


So we have the following conditions placed on f (it must lie somewhere between the upper and lower limits)

(D2 - D1) / 3*D2 < f < (D1 + D2) / 2*D2

Let's put some numbers in to get an idea of how critical things are: start out with a large difference in route lengths, say D1 = 100 and D2 = 200. A quick trip through the calculator yields

0.1667 < f < 0.75

So the alt roam must be at least 33.3 units away from the start (red) and not closer that 50 units from the finish (blue). This leaves 116.7 units available -- plenty of latitude available for placing the alt roam.


What if the routes are almost the same length? Try D1 = 100 and D2 = 101. We get

0.0033 < f < 0.995

The alt roam in this case must be at least 0.33 units away from the start and not closer than 0.505 units from the finish. This is much less critical than where the route lengths are considerably different.

The most stringent situation is where the long route is much, much longer than the direct route. In this case, the limiting valuse are

0.33 < f < 0.5

So you can use a rule-of-thumb that the alt roam must be placed at least a third of the way down the long route and not more than halfway. Put it at 0.415 from the start and you should never go wrong. Now all we need is a way to measure the path lengths accurately!

Please check my reasoning and my math, because my conclusion is that the alt roam placement shouldn't be picky as long as you stay away from each end of the route.

The experiment that I did last night of placing the alt roam at short intervals along the route should have worked if the above reasoning is correct.

NOTE: what I'm seeing is that the engineer bots run directly to the dynamite point by the shortest way. They do not travel down the long route to the alt roam and then turn back. They do not go through the finish to the alt roam and then turn back (they can't in this case because there's a door in the way). The longer route is simply ignored.

I must have something else wrong (and I'm going to feel real stupid when it's pointed out to me)!



THIRTY MINUTES LATER:
I thought that I'd try to measure the length of my two route paths to see what they really were. My "measurement" technique was to use a stopwatch to time how long it took to run each route, including descending a ladder on each one and climbing some boxes on one. When I got to the "long, safer" route, I needed to disconnect a couple of branch-offs. After doing that, my engineer bot refused to leave the spawn point. Uh Oh! There must be a break in the path. Sure enough, I found it at the long ladder descent -- I only had an upward node connection! I'd seen bots climbing it but hadn't noticed that they never went down.

P.S. The "long" safe route is one second FASTER than the supposed short route.

I said that I was going to feel stupid . . .
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com