I believe I've found the solution to balking at switches in AI mode.

JonMyrlennBailey

Active member
This had troubled me for sometime before I figured it out. It happened in TS12 and even in T:ANE SP3.

I would start a new session from scratch and initiate the trains on the main line that were to be driven regularly on AI schedules.

There would be one or more junctions on the main line which would cause AI to balk at it. Some junctions caused this balking but not others.

A given freshly-started AI train might be the first AI train to approach a certain switch on the main line. It would then stop short of the lever

for no logical reason and wait. I would read the message from the driver and it would state something like "waiting for the track to clear ahead"

though there was no train ahead for perhaps miles. After about a month of pulling out my hair, I tried something.

Whenever the train makes this balk stop at the troubled junction, I would then issue the command STOP TRAIN. I would then take the controls by hand

and slowly drive the train myself over the junction to get passed it and then give the command CONTINUE SCHEDULE and the driver would go back to the AI

mode again. Since this is on a model Trainz layout with a line that loops in circle, when AI came back around for the second lap, it would no longer balk at this switch and keep on going around

the loop with no more balking behavior at this switch or any other switch on the line. All other AI trains that followed would also travel around the loop balk-free.

All I had to do was "prime" the initial train that came to the questionable junction "like a pump" by driving it over this switch by hand then putting the train back into AI control to cure this for good as long as the session continued and/or was saved and restarted. It's kind of like having to dismount a horse or burro and lead him across a narrow bridge on foot that makes him spook and balk at it. AI acts likes it's afraid to cross a certain junction initially until I lead him across gently by hand only once to show him it's nothing to be scared of.

If the session were saved, exited and restarted or if the ongoing session was saved as a new increment or state under a new name, exited and restarted, no more would AI ever balk at the switch or switches that were otherwise troublesome at the beginning of a new session that was started "from scratch" such as loading the route/session from CDP or stating an initial session after modifying a route or session. When the new session is started from zero, the initial state it was as created in Surveyor, the "priming" process for one or two balky switches on the route is necessary once again but no big deal.

This is one of those software engineering mysteries that puzzles me.

Sometimes when a saved session is restarted, I find myself (sometimes) having to manually shut off loco bells that are ringing when they shouldn't be.

I also have to restart the engines of flying helicopters to make the blades turn again when reopening a session in progress.
 
Last edited:
You have not set up track, signals and turnouts correctly

Perhaps I'm no master of setting these things up. But my little "priming" trick seems to do the trick and I'm quite pleased with it.

If I haven't set my junctions up correctly then I can't understand why trains balk at only two of these junctions. My main line has at least ten of them and each
and every one of them is set up exactly the same way. There is some fault deep inside the software coding, perhaps a piece of corrupt data in the route file causing this.

When this route is imported from TS12 to TANE the balking at junctions occurs the same way as it did in TS12 and my "priming" method still cures it.

Of note, I occasionally get a little "bug" icon on the screen while driving. I've tried to read what it says but it makes no sense to me. I have to just delete it off my screen.
 
Last edited:
When you say balk does that mean stop or pause? I find lots of situations where the train stops at a signal for many seconds and then continues. Since there was only one train on the route I see that either as a problem or a foolish attempt at injecting realism. Sometimes if I use the Straighten command that fixes that particular junction.
 
When you say balk does that mean stop or pause? I find lots of situations where the train stops at a signal for many seconds and then continues. Since there was only one train on the route I see that either as a problem or a foolish attempt at injecting realism. Sometimes if I use the Straighten command that fixes that particular junction.

Exactly, just as an animal balks or fails to do something he is supposed to do otherwise (think of a stubborn mule at a narrow bridge), and for no apparent or logical reason and for an indefinite amount of time unless I take intervention using manual controls to get the train moving again. And all my junctions are straight when constructed by using Straighten Track.

Using a procedure called "priming" (an analogy to priming a water pump to initiate operation) as I have explained in my OP works for me and I have no complaint about having to do this. I just find it fascinating that the AI behaves as weird as it does. It's the computer science behind this that sparks my curiosity. What machine code instructions are telling the train to stop at the switch for no apparent reason? Why is AI partial to some switches while it behaves as normal at other similar switches? I'm just a software end user and not a theorist in computer science. I wonder if computer science hobbyists have ever tried to take the machine code for Trainz apart and analyze it bit by bit. Then again a corrupt Route file could be the culprit for hit-and-miss behavior: a ONE or a ZERO in the data that is incorrect.
 
Last edited:
Usually, when I get this problem, is because there is a set of points far in the distance that are not aligned to the path of the consist. It stops in front of a red signal and does not switch that point It may not be exactly what you describe because I note the anomaly in front of a signal. 3 things you can do: One is what you mention Two, If you hover the mouse over the red signal it may take you to the offending points I say "may" because sometimes it does not. Last, eliminate the signal. The consist will continue until it reaches the vicinity of the misaligned point and switch it (some times may not and you may have to take manual control of things) If your consist stops in front of nothing, you may have to examine carefully what is hidden at that location.
 
I figured out my "priming" method totally by intuition and sleuthing.

I have to prime a fresh new Session with AI Schedules by taking a little manual intervention the way you have to use manual pump to prime a stubborn diesel engine after it runs dry and is refueled before things run smoothly on their own. It's one of the many idiosyncrasies of this Trainz product. Something of a Sherlock Holmes of Trainzing I've become.
 
Last edited:
So, the AI system does not operate correctly all the time without human intervention. This is something that many of us have known since the AI arrived in Trainz 2004 (????) and it has not changed since then. In that respect it is the same as AI systems in the real world, they all need a human "in the loop" if only to press the big red STOP button.
 
If you can find the problem switch, you could place a trackmark just beyond it. Also if there are a large number of switches between it and the destination, it can take quite a while to work through them. I usually just move the loco through the switch and it continues happily.
Cheers,
Mike
 
The "Waiting for track clearance" message is a blanket message from the AI that should read "Hey dude, I'm confused! There are too many choices ahead and I don't know which one to take".

To get around these situations, you need to place a track mark, as Mike says, somewhere in the middle to force the AI past the junction(s) and lead them along. Once the path-marks are followed, you'll find the AI will work quite well.

On some of my routes, I've had the AI running 4 to 6 hours before I gave up to sleep and they were still going about their business with nothing amiss. These operating sessions, however, took a long time to work out the timing, routing, and junction controls for the AI so they don't interfere with each other and don't get confused.
 
I have no problem with AI ... All my track has track directional markers, where AI would get confused ... Proper signaling also helps guide trains along this pre-specified path of track directional markers ... I can hit "Drive", and my trains run from one end of my route, all the way to the other end of my 300 mile long route... navigating thru complex interlockings that have predetermined switch lever positions, and track directional markers pointing towards a thru path ... If you are having problems with AI, you should learn how to lay track, signals, directional markers, and setting switch lever positions for the normal thru paths
 
Last edited:
Back
Top