AI drivers not using main line

jimbursch

New member
I have a large route that has hundreds of junctions, and I'm now working on signaling and speed signs to get the AI drivers to select paths across the route that bear some resemblance to reality.

My thinking is that the main line is denoted primarily by speed, and I can keep the AI drivers on the main line and out of my yards by setting slow speeds in the yards and fast speeds on the main line, assuming they are selecting the fastest path from one point to another.

Am I correct in my thinking?

Are there any guidelines/tips for debugging AI driver path selection?

I know I can force a path with drive-to trackmarks, but I want to minimize such forcing and make the signalling system work to aid the AI drivers in path selection, as much as possible.
 
AI drivers will always selected the shortest path, regardless of the speed limits.

There are three techniques that are commonly used to redirect the "thinking" of AI drivers - Track Marks, Direction Marks and Priority Marks. Track marks require the use of "Drive via Trackmark" or "Drive To Trackmark" driver commands. Direction markers are "one way" traffic signs. Priority markers (an often misunderstood term that has nothing to do with train "importance") allocate a "priority level" to both consists and track segments. These only affect AI controlled trains.

Information on all three can be found on the Trainz Wiki at:-

How to Use Track Markers
How to Use Direction Markers
How to Use Priority Markers
 
That's great info that pware provided. In simplest terms you set track marks and instruct the AI trains to "Drive via" the track mark. You can learn a lot by finding a Route that uses AI successfully and then check how the creator did things by examining the session rules and placement of the "guidance" tools (Markers). I learn best by seeing what other do. Your experience may vary.

Start small, obtain success, and then work up to more complex.
 
I find making sidings and yards low priority will keep the AI trains on the main unless they have a really good reason to go the other way.

The path finding I believe starts with the shortest path, then calculates all of the 'penalties' of that path (like the track priority). the idea here is to make non-main track low priority so that the ai will notice the penalty and stay off that track unless there is no better way.
 
That's interesting how it works and is similar how other path-finding algorithms work such as those used in Cities Skylines where the AI need to calculate trips between one point to another.
 
That's great info that pware provided. In simplest terms you set track marks and instruct the AI trains to "Drive via" the track mark. You can learn a lot by finding a Route that uses AI successfully and then check how the creator did things by examining the session rules and placement of the "guidance" tools (Markers). I learn best by seeing what other do. Your experience may vary.

Start small, obtain success, and then work up to more complex.

This works very well and I've done this for years.

I found the best place to put the track marks is in the middle of the path to force the AI to be too far to turn around. If the path is going to be super long, I'll place some at the beginning, middle and end to keep the AI moving along.

For wye setups, I also place a track mark before, middle, and end to force the AI to remain on course and not play little tricks by going down each leg an either getting stuck, or backing up and going coaches forward instead of locomotives.
 
I've used markers for train guidance ever since I started playing but the main disadvantage is having to enter trackmark names into the AI area, and with hundreds it can become confusing.
Track Priority and Direction markers are great too.
 
I've used markers for train guidance ever since I started playing but the main disadvantage is having to enter trackmark names into the AI area, and with hundreds it can become confusing.
Track Priority and Direction markers are great too.

Direction markers work well to prevent the AI from going down sidings and tracks that we will drive. I do that all the time as well to prevent dumb moves by the AI. While I agree having a lot of track marks can be an issue, I find the irreplaceable Schedule Library and Copy Commands From combo to work well for this. The driver commands are entered once into the schedule library and placed as needed via the copy commands driver command. This works extremely well when there are many drivers that use the same setup.
 
Thank you for these excellent replies/suggestion. My plan is to give my main line a priority of 2 (matching default for the trains) and give my yard leads a priority of 3, which should keep the strays out.
 
Back
Top