Vexing AI Problem


Been here since UTC!
I am building a branch line that features a number of stations and industries that require the use of a loop so that the loco - usually a small tank loco, can run around the train and go back whence it came. What happens is this. The run around is executed OK, but instead of the train now going in the direction it is suposed to - loco first - it pushes the train back to the end of the turn loop (protected by buffers, and just sits there.

In some instances it tries to use the bypass loop to achieve the desired direction, or sits and tells me it's waiting for track clearance. On one or two occasions, whilst sitting accross the loop junction, the points have changed and derailed the train.

I have tried all sorts of combinations of signals and what-nots, but nothing seems to make the train obey the commands.

Is this just a failing of the AI, or have I missed something obvious?
Any help would be appreciated.

It's a quirk of the AI (I don't say failing because it can sometimes be exploited), where it looks for the quickest route in the direction it is facing. In effect it is trying to go along the loop. I don't know what causes it, but when I relayed some track on my own layout it stopped misbehaving. Puzzling.
Maybe it has something to do with the actual direction you "laid" the track in ? Also I"ve found that the AI is much happier if there is an Invisible Signal in front of Bufferstops if it has to drive towards them as it does regard bufferstops as a signal so it says the track is unsignalled.Have you tried adding a track direction marker to the side of the loop you want the loco to run round on?
I have had this problem once or twice, and have usually found the problem to be with the track. ( a section not properly joined, although it appears to be OK.)
Try relaying the area in question, and most of the problem should disappear. The odd invisible signal can also make a big difference.

AI,s arnt the brighest creatures, try after run round wait for 30 secs or whatever you fancy. they seem to respond to that.
AI,s arnt the brighest creatures, try after run round wait for 30 secs or whatever you fancy. they seem to respond to that.

I try not to use runround command anymore , its open to to many posibilitys, The way I go now is

set track marks/triggers
uncouple the engine
wait min 10 sec
drive to track mark (name1)
Wait min 10 sec
go Via Track mark ( midway in loop)
Drive to track mark (name2)
wait min 10 sec
couple at track mark ( name3)
wait min 10 sec
drive via trackmark ( name4) direction of depart required
drive to trackmark ( set no more than 2 train lengths from departure point)
continue with instructions
your load or unload instruction will be placed depending if you do the action before or after the rub round
but always put a wait of 10 sec min between movements this gives the AI time to clear the last command and interprete the next.

the invis signal just before the end buffer is also a good point, that I have used aswell, but normaly I used the Dummy buffer ( not reconized as a stop ) and a short bit of invisible track going on from the end of the siding with a invis signal here to
then with a little bit of trial and error you can place a marker close to the buffer so engines will stop with say only 2 meters till the buffer, as most engines have different breaking requirements, use a speed control to bring the engines speed down to around 6/7 MPH on the siding going in, if using invis speed signals set them for around 8 MPH, they dont respond to figures under 6 MPH and always go slower than indicated, at least I have found this,

have fun

There are two things you could try one use the change direction command or two use the load command again. When you do the run around this does some time happen because the engine is still traveling in the same direction that it coupled at and the consist is still under the stations control. An alternative is to use a second engine from a siding to couple for the return trip. Ive built a station that uses both versions without any problems.

Thanks for the pointers all, the one I did not try was the invis signal, so that will be my first try. I did relay the track so that is was in the direction that I want the train to exit, and even arranged it so that after the run-round the loco was facing the correct way, neither of which worked. I put a track marker down so that on exiting, I could do a 'go via' command, and experimented with it both before and after the junction of the loop with the main line. The begger still insisted on going backwards. The change direction command just confused it, and it sits and does nothing, even the continue schedule command gets no response. No good using direction markers, 'cause that would prevent the loco performing the run-round in the first place. I even tried to shorted the spur that the loco uses for the run-round, but this just makes it not go far enough to clear the junction - in some cases it goes backwards and forwards.
Next question then; can you alter the stopping distance to a marker or track end, or does this depend on what is built into the loco config?

Thanks all.
Bob48 without a diagram I don"t understand why you can"t use Direction Markers.If your Train arrives on the Platform Line of a Terminus and the Bufferstops are ahead of it then the Loco can only run in the opposite direction to which it arrived so the direction marker would point in that direction?I had a similar problem to yours with a Runround loop on my prototypical route where the Loco would simply career through the bufferstops as if they weren"t there.Nothing worked-lengthening the Headshunt , putting signals in -it ignored them.The eventual solution was to put a 5 MPH speed restriction between the uncoupling point and the bufferstops.This meant the Loco couldn"t build up speed and the AI had time to "think" so it behaved itself after that.
OK, the train runs into the terminus with the buffer a bit further on. It has to decouple and run forward to cross the junction for the return loop, so you cant put a direction marker there or the loco will not enter the loop and thus not run round the train. I too found that an Invisible signal at the end just makes the train run off the end of the track. The other point is that the AI is suposed to find the shortest path to its destination, in this case a track marker back down in the direction it has come from, but it is doing is the exact oposite. By pushing the train down towards the end of the track and the turn loop junction, it is actually picking a longer route than just simply going forwards to the marker.
There has to be a junction between the train and the buffer stop to allow for a return loop, or you cant run round the train.
However, I will certainly now try your speed restriction idea, as the whole thing is now drivin' me mad.
Well...I"m not trying to wind you up, but I just set up a Terminus test track with a run round loop and fairly basic signalling and it worked first time ! At the moment my PC is refusing to post Screenshots, so what I"ll do is write down how it works and post it here.
No thats fine. It may well be that there is something that I am (or not) doing, so any help would be appreciated. S'funny, but it seems to work ok with non steam loco's...........or am I just getting paranoid!

OK Starting at the start of the Test Track we have a Bufferstop and an Invisible Signal then a Red Trackmark.Approaching the Terminus we find a Home Semaphore.After that there are the South Points which are "Normal" (green arrow left) for the Platform Line.After this there is (the back of) a Home Semaphore, providing protection for the Points when the Train returns.Next (near the far end of the platform) is a Yellow Track Direction Marker facing the Terminus Bufferstops.Shortly afterwards is a Red Trackmark "Platform End" and then a Home Semaphore.After this there are the North Points also st "Normal" for the Platform.Then, (the back of) a Home Semaphore.Finally there is a Red Trackmark "Buffers" , an Invisible Signal , and the Bufferstops.Returning via the Loop Line we find a Yellow Track Direction Marker facing back to make the Loco Runround , then a Home Semaphore protecting the South Points......We instruct the Driver to drive to Trackmark "Platform End".Then instruct him to "Run Round Train". The Track Direction Marker he has just passed over prevents him trying to reverse along the Platform Line.He then drives along the Loop past the South Points and reverses at 4 MPH to couple onto his train and can set off on his return .The only odd thing he does is to ignore a Red signal when he is reversing to couple onto the train. However in "real life" he wopuld pass the Home signal arm at Danger and recieve a "subsidiary" arm since the platform was already occupied so this actually realistic.
Thanks for taking the time to set that out. I'll give it a go tomorrow and see what happens - I've had enough tonight!
Just a thought though, are you using T06 (I am) or T04? not that it may make any difference. The only other point is that I usually use the 'drive to' (station/industry) command rather than to a track mark. In addition, the actual run round bit works fine. The problem only happens once the loco has coupled back onto the train ready for the return trip, and the signals are set up pretty much as you describe. Still, I'll certainly give it a go.
I"m using 06. All of my stations have at least 2 platforms so I normally name each platform by attaching a Trackmark to the track e.g. Pallion Up and Pallion Down then tell the Driver to drive to (each station on the Up Line) and wait 30 seconds at each.
? are we useing passenger active stations to drive to or trackmarks to drive to. They both act in a different way when it comes to direction of travel when leaving. A train arrives at trackmark and that is the end of the command. A train arrives at station but is still under the influence of the station script until it leaves.
The amount of track for runaround needs to be 2 grid squares longer than the engine from lever to buffer. place invisible speed control of 5mph between station and the junction. place the buffer with an invisible signal placed behind but as close as possible to the buffer. place invisible speed control on the return track 15mph to speed train up.
If you cant sort it i would be willing to look at what you have and see if it can be made to work as i have several ares where this sort of operation works well.
I use active stations and industries only. So does that mean that the 'active' length of the station/industry track as some influence then?
If that is the case, I will try your method - maybe I have not been allowing sufficient track for the AI to work.

Many thanks
I have found that sometimes the station does have an effect on the consist when you are changing directions. I have several terminal stations with both runaround and switch engines. In both cases i use the terminate passenger command in place of load/unload. Then after the runaround i use the load command before return travel starts. The only signals i use are at the exit of the station and none at the terminal end.
Done a bit of experimenting, with some interesting results. Using the 80m basic station, tank loco and 2 coaches, it worked like a dream. Substitute the UKBL 'Private Coal Mine' change coaches for coal wagons to give an equal length train, and back to the old problem. Runround works fine, but train reverses rather than exits. The 'active' bit of the mine is much shorter than the station - so there is obviously a answer here somewhere.

I am not sure if this was ever resolved but I have found an odd bug in TRS2004 when using a reversing loop. I had a reversing loop in my layout. I had it set up for trains to go right at the loop junction, go around and then come back out through the left side of the same junction. To help things along I had 3 trackmarkers, and I gave my driver the drive via command so it would go right hit TM 1 then TM 2 then TM3 and out the loop with a drive to. After doing this the first time everything looked great, he drove through TM1, TM2 and TM3 but right before he hit the junction coming out of the reverse loop, the train would just STOP, then it would start going backwards at a slow rate of speed. So I tore up the track, laid it down again and got even odder behavior, Just as the train would hit the loop junction, the switch would go to the left and the train would just stop and sit there.

SO I created a quick blank layout and laid this out again from scratch and got identical behavior on a reversing loop. Its weird because its almost like the behavior you would get in a real HO layout when doing a reverse loop so I attacked it similarly. What I did was create an invisible spur using invisible track and an invisible lever with the switch defaulted to opening to the spur somewhere on the loop. So now after the train passes that invisible switch it throws it back to the spur, effectively breaking the 'continuity' of the reverse loop (its now two tracks instead one that goes all the way around). Once I did this the train went in one side of the loop and out the other with no more weird behavior. I'm not sure if there is something out on the DL station that could do this more easily(I hate that you can still see the 'invisible junction' arrows in driver) but it fixed a problem that had me banging my head against my monitor.
Last edited: