AI Driving Problems.....

Stewartbf6

New member
I know this is a common thread but a search of the forum isn't forthcoming. I am new to TS, my first year, but have had a lot of experience with modifying the packages routes, building onto DEM baseboards, and now starting from scratch with my own DEM baseboard. I have licked AI driving and routing problems before with track marks, well placed direction markers, priority, etc. NOW I have been thrashed by the AI!!

I am having trains on clear stretches of track no one in front or behind, stop, and reverse direction, had one go all they way back to the portal and derail! I have tried a lot of the techniques, no go. Strangely if I take over and manually drive for a bit, usually the next signal the ai can taker over again. The strange thing is a following AI driver does NOT do the same thing, drives on through smooth as sow's ear. Does track laying direction have that big of an impact?

Any tips on how AI can be tweaked would be helpful, if there is an appropriate thread already a link would be appreciated.
 
Have you tried the built-in Autopilot or Autodrive driver commands? Both of these will only move the train in a forward direction.
The junctions are not changed automatically so the path needs to be set ahead of the train. To reverse the train use a driver command: Change Direction Command.

There are several ways of setting a path. One is using Path Rule which needs to be set up in Surveyor mode to specify whatever paths you want to define. Then a driver command Path Command selects the path you want, and Autopilot takes you to a trackmark at the end of the path.

Another way is to use Check Trackside rule to check a trigger or trackmark and set the junctions ahead. This can be made to set different paths depending on the locomotive name or what wagons the train is carrying.

Another useful driver command is Control Junction which can set an individual junction anywhere on the map if it is not already in use. The junction needs to be released by the driver command Free Junction to allow other trains to access the junction.

I have modified the script of Control Junction to automatically release the junction after the train leaves it, thereby reducing the chance of forgetting to free the junction. The modified command is not available on the DLS

The biggest problem with the built-in Navigate command (IMO) is that it tries to find a path no matter where the destination trackmark is on the map. A limited version that only succeeds if the destination can be reached if the target is ahead of the train would be a great improvement as it would prevent apparently stupid moves by the AI drivers. This is not an easy task as I have tried to do it and am not satisfied with the results yet, although they are improving as time goes by.

Hope this helps

Trevor
 
Last edited:
Supposedly track direction does not matter and we were told it's an urban myth that it does matter. Many of us will beg to differ on this. anyway outside of using rules to get the trains to move, how is your signalling? This can make a difference in how the AI drivers interact. I generally place signals every 3000-ton US coal train length. When I get to junctions with sidings, the distance maybe a bit closer, but overall I keep this distance. This allows trains to follow each other should there be another one on the same track. The following train will receive yellows instead of a highball, but at least he'll keep driving.

You might want to try trackmarks and have the AI drive to them. This helps set some guidance points in between the two end points and works quite well, particularly when there are lots of junctions in between.

If you could possibly post a diagram of your route, we could probably help you come up with a solution.

John
 
I have had this problem on several occasions.
I get around it by putting in an extra trackmark a short distance past where the AI stops and reverses.
Telling it to navigate via that trackmark works for me.
Frank
 
Trackmarks and lots of them if Ai's being thicker than normal.
Start the session and when you spot one being a real Ai (idiot), go back into surveyor and plonk another tm down especially if there's a x over. It's a bit like a donkey and a carrot on a stick in an obtuse sort of way:o
 
I do not have a route diagram, unless there is a way to create I am not aware of. I am basically modeling the Cajon Pass from Colton crossing to Victorville area (Portals), and Palmdale cutoff from Colton Yard to a portal north of the summit. Using TIGER data and all the mapping programs and have stuck to the track plan pretty close for crossovers and mainline sidings. Haven't done all the auxiliary track work as yet. Of course minor adjustments to accommodate TS12 have been made. I will just have to keep tweaking, tighten up the route options, I think it is too wide open now. AI drivers get halfway to someplace and then think, Hello, there is another way to go,, let me back up to take it

 
Based on what I know when it comes to AI is that I heard they use the shortest route possible even if that means on the wrong side of the tracks. Am I right about this?
 
Hi

I always use one of the Path rules coupled with the Autodrive rule as mentioned by Trevor above. This gives you complete control over the AI as the route is set for it and it just has to drive to the relevant trackmark. Since using this rule I haven't had any problems with the AI at all. On the prototype the driver doesn't have to set the route so we shouldn't expect the AI to have to do so either.

Regards

Brian
 
Last edited:
Lately, I've been having the same trouble as the OP. I have a brand new route with a single-line running between two portals around five miles apart. Only 1 portal (East) generates trains. The other portal (West) eats them. I can see the train being generated but once it gets near the mouth of the portal it will move back and forth a meter or so and then back into the portal and derail. I've added signals and they all tell me the block ahead is clear all the way over to the West portal. Track has been laid from East to West exclusively. The consist inside the East portal has a driver assigned and a command of "Navigate to West Portal". I can manually drive an engine from one portal to the other.

Any ideas?

Bill
 
It's not an incline leaving the portal is it? Reason being it will slowly slip back into the portal and derail.
Can you place a consist the same as the portal emits and drive that towards the west portal.
 
No, and yes. The route happens to be totally flat. I amended my post to include the line: "I can manually drive an engine from one portal to the other." I used the exact same consist that is supposed to be emitted from the portal.

Bill
 
Try a track mark about a mile from the portal to give it something to aim at and remove any signals and points/switches (or check they are aligned towards the west portal).
 
Turnouts have been eliminated between the two portals. There is a trackmark roughly in the middle marked "middle". There are now no signals. The command chain now contains two commands:

1) navigate to middle
2) navigate to West Portal

EDIT: Same results if I command "navigate VIA middle to West Portal".

Bill
 
I've had issues too with portals. I wonder if there's a flaky bug that's hard to track down.

What used to work before, I'm not sure now if it does or not so maybe this is worth a try, is to put the portal on its own baseboard and give the AI plenty of time to wake up before they hit the mainline. When the AI-portal track finally hits the mainline, there are signals just like any route should have. Like I said this used to work. Recently I haven't done much portal configuring because I've been busy placing buildings and stuff on my route.

John
 
It could be a portal issue, try portal basic, kuid 30501:22006, it's the one I'm using at the moment with no problems (2010 build 44088) used with either the schedule library or the emit train rule.
 
When I used to see AI drivers do this reversing thing, I would set a signal facing backwards and put a direction marker right behind it forcing the light to stay at a permanant red. This seemed to give the AI the idea that running against the grain was no longer an option for them and they would either remain in the foward direction or stop and release control of the throttle/brake control panel. At this point all I had to do was start scooting foward manually until The AI realized the intended marker really was in front and self resume the run. Now I use the ASB DTT payware from Boat to do all my navigating, and all the AI behave better than children at the end of an episode of Super Nanny.
 
Back
Top