The AI mechanism never ceases to amaze me.

When I first started running AI driven trains I was downright amazed at how AI drivers would want to 'shortcut' through a maze of rusty industrial sidings with a speed limit of 5 mph instead of taking the open and clear mainline route right in front of them. Being a UK pre-grouping modeller facing crossovers are rare on my lines so I don't have too many problems with the AI idiots wanting to switch tracks for no reason at all, but I still need to sow 'go-this-way-you-idiot' trackmarks at the major junction stations if I want things to run smoothly.

Very well said. This has been my experience as well. It really frosted my cookies the first time I saw my crack express passenger train head down the crooked and rusty branch instead of staying on the mainline. The issue is the driver "sees" the bad track as the shortest way between two points due to the junctions even if they don't appear that way to us.

I use Drive via and Navigate via track mark commands in those places where there are going to be issues. Placing a track mark in the beginning, just as a section begins, in the middle, and then at the end really helps. Using the Drive via, and not the Navigate via, they AI will tend to wait and the drive command is more specific. Navigate will mean they will find the shortest way between two points and do stupid things, but the Drive version means do this with no faffing around!

I do the same with wye-type junctions (triangle-junctions). Without direction the AI, the driver will take the wrong leg of the wye and end up doing a back up move that's beyond explanation. To avoid this idiot move, I place 6 track-marks. One before and after each leg on the mainline side plus one on the middle, and then one on each branch, plus one at the very end on the branch its self.

I then direct the AI to drive via track marks through the junction and they don't do the backup, reverse, get stuck, turn around, get stuck again, and then proceed after I untangle them move.

Where there are crossovers, I will either place direction markers as one-way signs to prevent the AI from randomly crossing over, and in these areas only I do the manual moves. In other places I will use the direction markers and sometimes track marks to keep the AI on their respective routes if I need them to take the crossovers to a branch or siding.

After doing this for about 16 years, I now anticipate what the AI might do in a particular area. This experience helps with setting up driver command-schedules.
 
AI will invent it's own shortest path, that AI deduces as being the shortest path, unless you block undesired paths with track directional markers, pointing them towards oncoming trains that will surely take an undesired path/crossover

You must outsmart AI, by fooling AI at it's own game
 
Last edited:
What causes "No path to selected destination" message/failure? I received this somewhat a distance away but "navigated" to a TM close by with no problem. Once at the TM I'm literally 6 engine lengths away from my original destination (a station) and I still get "No path to selected destination."
 
On my experience, the priority setting on locos stay as set even if you save many times. Only time I for sure will lose it is when the consist goes into a portal. Remember that logically what comes out of these is not the same as what went in.

One workaround for this would be to add the Priorityz driver command, with the correct priority level set, to the driver command bar immediately after the Drive/Navigate To <portal name> command.
 
1611mac - Also check for disconnected track in the vicinity of your station or industry asset. In Surveyor, the clue is often a double-ringed spline connection.
Do a lookup of your destination asset in Surveyor. If you cannot find it using the search function, then AI drivers won't be able to find it in Driver Mode as well.
Simple fix is to reconnect (or even replace) the asset properly, making sure you use the exact name-spelling of the asset as it was originally known so you don't have to rewrite existing session command strings.
 
Very well said. This has been my experience as well. It really frosted my cookies the first time I saw my crack express passenger train head down the crooked and rusty branch instead of staying on the mainline. The issue is the driver "sees" the bad track as the shortest way between two points due to the junctions even if they don't appear that way to us.

I use Drive via and Navigate via track mark commands in those places where there are going to be issues. Placing a track mark in the beginning, just as a section begins, in the middle, and then at the end really helps. Using the Drive via, and not the Navigate via, they AI will tend to wait and the drive command is more specific. Navigate will mean they will find the shortest way between two points and do stupid things, but the Drive version means do this with no faffing around!

I do the same with wye-type junctions (triangle-junctions). Without direction the AI, the driver will take the wrong leg of the wye and end up doing a back up move that's beyond explanation. To avoid this idiot move, I place 6 track-marks. One before and after each leg on the mainline side plus one on the middle, and then one on each branch, plus one at the very end on the branch its self.

I then direct the AI to drive via track marks through the junction and they don't do the backup, reverse, get stuck, turn around, get stuck again, and then proceed after I untangle them move.

Where there are crossovers, I will either place direction markers as one-way signs to prevent the AI from randomly crossing over, and in these areas only I do the manual moves. In other places I will use the direction markers and sometimes track marks to keep the AI on their respective routes if I need them to take the crossovers to a branch or siding.

After doing this for about 16 years, I now anticipate what the AI might do in a particular area. This experience helps with setting up driver command-schedules.

I agree 'Drive via' is definitely the better command to use and yet the hair tearing 'Navigate via' command is the default one that appears in the driver command menu. I do all my own shunting (switching) since AI in general is hopeless at it and lacks any kind of precision with placing and coupling up to rolling stock. So because of that I can lock out any sidings and crossovers that might give trouble with direction markers since I'll be the only one using them.
I do want to try out the invisible locomotive flagman that I've read about recently here on the forum since I think that would be really ideal in a couple of locations on my GER Norfolk layout.
 
I agree 'Drive via' is definitely the better command to use and yet the hair tearing 'Navigate via' command is the default one that appears in the driver command menu. I do all my own shunting (switching) since AI in general is hopeless at it and lacks any kind of precision with placing and coupling up to rolling stock. So because of that I can lock out any sidings and crossovers that might give trouble with direction markers since I'll be the only one using them.
I do want to try out the invisible locomotive flagman that I've read about recently here on the forum since I think that would be really ideal in a couple of locations on my GER Norfolk layout.

I also do my own shunting as well; it's a lot saner.

I added in the Drive via/to commands to my list. Why that has been hidden by default is beyond me because that used to be the default.
 
I have been playing around with AI for quite some time now, and have to workaround the following scenarios.
If a train approaches a junction without any directives, it will take the left track. (Use feathers to correct)
If a train is held at a signal for excessive time, it will start looking for a way around the signal. (Direction markers are partially successful in resolving)
If a train is in push mode, it often has trouble following directives (Attach invisible loco to the train rear).
If a train is desperate to find its way around an issue, even track direction markers won't stop it!
Establishing train priorities does not necessarily mean that a Priority 1 train will over-rule a Priority 3 train!
The end result is that AIs can usually be made to follow a desired schedule, but it is not straight forward! Regards. Colin.
I have a push-pull set on my early period BR layout and I was having trouble with the driving compartment coach leading the consist so I fitted an invisible loco into the driving coach as an invisible bogie. The invisible loco has no sound files except a whistle file and I had to adjust it's engine spec maximum speed to the running speed of the push-pull set or else the train engine gets into a push-O-war with the invisible locomotive bogie. The extra braking from the invisible loco is very useful too as the push-pull coaches are quite heavy and the ex-LNWR 2-4-2 tank engine that operates the set has fairly weedy brakes.
 
Last edited:
I have a push-pull set on my early period BR layout and I was having trouble with the driving compartment coach leading the consist so I fitted an invisible loco into the driving coach as an invisible bogie. The invisible loco has no sound files except a whistle file and I had to adjust it's engine spec maximum speed to the running speed of the push-pull set or else the train engine gets into a push-O-war with the invisible locomotive bogie. The extra braking from the invisible loco is very useful too as the push-pull coaches are quite heavy and the ex-LNWR 2-4-2 tank engine that operates the set has fairly weedy brakes.
Sounds good ... but there already exists one (SGLM Secheron invisible) on DLS! Cannot fault your creativity though! :)
 
One workaround for this would be to add the Priorityz driver command, with the correct priority level set, to the driver command bar immediately after the Drive/Navigate To <portal name> command.
1st) I have been doing that for years. 2) At the start of a schedule AI drive, I always use these commands to set what I need for that particular consist. It works.
 
I agree 'Drive via' is definitely the better command to use and yet the hair tearing 'Navigate via' command is the default one that appears in the driver command menu. I do all my own shunting (switching) since AI in general is hopeless at it and lacks any kind of precision with placing and coupling up to rolling stock. So because of that I can lock out any sidings and crossovers that might give trouble with direction markers since I'll be the only one using them.
I do want to try out the invisible locomotive flagman that I've read about recently here on the forum since I think that would be really ideal in a couple of locations on my GER Norfolk layout.

Just now I'm building a route with some large marshalling yards containing many, many junctions, track marks, sidings and a turntable. After a lot of experimentation, I discover that the AI works best in such a yard if there are no signals at all other than those controlling entry and exit to the yard! As long as there are sufficient track marks and the track work design is unambiguous (not too many paths to the same place) the AI will work to shunt and couple/uncouple as required, even if a turntable operation or two is also inserted in the driver's command list. Use of the commands to couple to a named item of rolling stock or to couple-at-trackmark seem to work best. Couple-ahead works sometimes.

Mind, there can't be too many locos shunting at the same time in the yard - but as long as they're in separate parts of it, two or three will operate in there without issue under full AI control.

If I put in lots of disc signals and direction arrows, things become more problematic. The AI is pernickety about having exactly the right number of signals and direction arrows on a path from A to B. One teeny-weeny error and it stops everything. Without signals and direction arrows it just gets on with it.

For realism the junctions (turnouts) are all those showing a manual lever. Sadly there don't seem to be any that include a yard worker (or several different ones) to throw those levers.

Lataxe
 
Yes I found much the same thing with my goods yards even though the amount of AI involvement in doing anything in them is very small since I'm one of those people who enjoy shunting. So like you I have just the exit and entry signals at the entry point to the goods yard and nothing else. I work on the principle that any shunting moves needing to be controlled are are done by a flag man or a yardman with a lamp if the visibility isn't so good.
I do agree though that it would be nice to have manual points that had a yardman to work them.
 
Sounds good ... but there already exists one (SGLM Secheron invisible) on DLS! Cannot fault your creativity though! :)

I had another look at how I set up the driving coach Col. I didn't use the bogie after all, - what I did was use the invisible loco's engine spec file to make the driving coach a locomotive. The engine spec I used was <kuid:69593:1064> by Pendolino. It doesn't create an especially powerful faux locomotive, but that's not the object of the exercise.
I also set up a 4 wheel luggage van as a faux locomotive using the same script for use on a steeply graded quarry branchline where the workers coaches are always propelled uphill ahead of the train engine.
 
I am running a TS12 layout which started life in the 1[SUP]st[/SUP] gen. of TRAINZ. I too have had many heated discussions with the AI as to why it acts as an 'artificial Incompetent' (AI). These are my observations and how I get around the AI.

Always lay track in the direction you intend to run trains. (Use a red destination marker dropped in the spine section to check)
Only signal when necessary. Don't signal on bidirectional single track as you will get a head to head situation without fail. Use rules if you absolutely have to.
Signal in both directions even if track will be unidirectional. Use invisible signals if this is not aesthetically pleasing. (AI looks backwards as well as forward for possible paths).
Use 'Navigate via' destination marks to force trains down certain paths. Use 'Navigate to' to stop trains at signals when triggering complex path rules. (It is easier to stop a stopped train)
Use 'Directional' markers to prevent trains backing up when it simply needs to wait for track to clear. (Not 100%)
Use 'Priority' markers with matching train priority. (Not always successful). Some locos reverts to default after exiting a portal. Use rule 'Prioritz' in the command line to fix.
Pay careful attention to the default setting for all junctions (See theory)

Rules
There are 2 main types in my opinion.
Signal based, 'Trigger multiple signals', 'Set signals' etc based on triggers of various radii from min to max. Use these first as they are usually implemented at session level.
Switch based 'Control junction' and 'Release junction' etc Some go in the command line for each and every AI train others at session level.
Each has a niche and some experimentation is necessary. (Waring! overlaying multiple rules can lead to a world of pain trying to troubleshoot when they don't work.)

A theory.
This is probably totally wrong but I use the 'Least Cost Routing' method to figure out ‘dives into the yard’ type problems. The figures used are just my best guess. I place a cost of 0 for each spline traversed in the direction it was placed and 1 in reverse direction, 5 for a junction needing to be switched from default. 25 to reverse direction or run a ‘Direction’ marker. A blocking train is a temporary discard and track end a permanent discard. I then 'cost' each possible path I can see and the lowest cost is usually the AIs choice. Play around with the figures if you like.

Finally, my rig appears to have a 16 second cycle in which AI tests for all possible paths for all AI trains. If AI needs to select & switch a junction for a path, AI needs 8 seconds for a 50% chance of getting it done before it is too late. This is my theory why AI does not switch junctions fast enough sometimes. The train continues on the default path till the next cycle where AI recalculates a backup is now needed. This also why I think AI will pick an alternate path when a preceding train just clears a section ahead of a close following train. The '0-16 second window'.

Remember, this is a game, no lives in the balance (sanity maybe), and expecting the AI to be perfect is unrealistic considering the uncountable number of combinations and permutations possible.
 
Don't signal on bidirectional single track as you will get a head to head situation without fail.

I'm afraid I don't understand why you say that since I have fairly lengthy sections of single line track on two of my Uk pre-grouping era layouts that are correctly signalled with semaphore signals and it all works just fine.
 
Hi KotangaGirl, I will try to explain.
2 tracks converge into single track and then some distance latter, diverge back to 2 tracks.
Signals protect the convergence at each end only. Note: left hand running on dual tracks.
Junctions are set against entry to the single track at each end.

This is my observation and interpretation on what happens.
Simultaneously, trains A and B approach the signals from either end. At distance, each train sees a red signal. As each closes on its signal, each train switches its closest junction to enter the single track. At this point, each train will ‘see’ the other as occupying the next section so each continue to get a red signal and proceed to stop.
To solve this contention, the AI then selects one train, ‘A’ for example, and attempts to find a path around ‘B’. The AI releases ‘B’s locked junction and switches it back to default and locks it. ‘A’ now has a yellow/green and proceeds, ‘B’ still has a red. This is done on a 16 second cycle on my rig as I mentioned in my previous post.

What happens when 2 new signals are placed on the single track? (Facing in opposite directions in the middle.)
Each train sees red at distance. Each switches the closest junction. Each now see an unoccupied section, and each proceeds past its junction on yellow to the middle reds.
Reason: The AI only tests for the next free section on the path and little else.

What happens when only one signal is placed in the single track section?
‘A’ approaches and switches the closest junction and ‘sees’ an unoccupied section through the far junctions’ default position (NOTE: NO middle signal). ‘A’ proceeds. Moments later, ‘B’ arrives and switches its junction before the AI locks it for ‘A’. ‘B’ sees the immediate signal as yellow and proceeds. Middle signal is red.
Reason: AI selected the path on a ‘default’ junction setting and only later did the AI attempt to lock it. This allows trains to sneak through in the ‘unlocked’ window.

The AI only does what is immediately necessary to keep things moving. Locking default junctions is a ‘do it later’ event as is testing much past the next signal or junction. I can get around this with scheduling/rules but I prefer a more chaotic approach as it makes for more interesting interactions. Playing with default junction settings simply causes variations on the theme.

Hope this helps.
 
Ah yes I see what you mean now. This is exactly how I run my single line route on my layout. The stations have passing/platform loops that are properly signalled, but nothing that the AI can read as a permissive signal or calling on signal is placed on the single line of track itself between stations. This does mean that I can't use outer home signals as the prototype does since the 'Artificial Incompetence' hasn't read my now very old British signalling book and doesn't know what they are.

I enjoy running single line routes even if they can be a lot of work and can take a bit of fiddling about to get them to operate smoothly.
 
Signaling will work on bi-directional operations if the modern scripted signals are used. For US routes these are those signals made by RRSignal and Jointed Rail for example. The older simple unscripted signals do not work as expected and we can end up with Mexican Hat standoffs and cornfield meets, which are the bane of AI driving. I don't know if Elstoko or someone else has made single-track signaling possible, but I do know he was working on a token system at some point, which may be what you are looking for in your case.

With passing loops (passing tracks and sidings across the pond here), I use directional markers to force the AI to travel on a specific track. I also put a dual-headed diverging, or a triple-headed interlocking signal ahead of the double-track where the track goes from single to double, and place two opposing absolute signals pointing towards the single track from each branch on the double-track.

Using this setup, I generally have little issues with the AI taking the wrong track or getting stuck. Over the years of route building, I have found that the KISS method is best with AI drivers, and with experience I have learned to anticipate what they may do in a given situation and plan accordingly to get around that.

Kotanga Girl - That's a great workaround for AI not backing up a branch. That's an issue that has plagued us since TS2010 when something changed in the AI logic where suddenly they didn't want to drive a cab-car (driving trailer) and insisted on going through great lengths to reverse directions on any chance they have.

According to N3V, track direction has nothing to do with AI operations and is a myth. The only thing that track direction affects, according to these experts is track-objects. For your sanity and speed when placing signals and other track side objects, it's best to lay the track in the direction of travel if possible to eliminate the extra step of flipping around the objects. Not mentioned by N3V is the track direction does affect how the track bends. I have found that laying the track in the direction of travel helps when setting spline points and straightening track along the line, otherwise, odd kinks occur making straightening track difficult.
 
Back
Top