Help, please: AI is mysteriously balking at just one junction.

JonMyrlennBailey

Active member
It just started doing this two days ago after playing with this route for months trouble-free. What is the reason this maintenance-of-way truck is waiting for beyond the switch lever? What the devil is it stopping for? There's not another train for miles around. Also note that the yellow AI lock symbol is not showing at the lever which is odd so who is controlling the lever? Reinstalling Trainz 2012 as well as XDR has not fixed this. Reverting to an earlier version of the route from a month ago does the same thing as well. All I have been doing lately was making scenery and rolling stock additions without changing the track work whatsoever. What is the issue and how can this be fixed? There are several other junctions on the main line like this and the AI has no trouble with those switches, just this odd one. Even with a green signal placed right before this switch, AI balks at it. There is not a break in the track as I can drive across this switch by hand without derail. Using different engines and drivers for diagnosis is no help. They all do the same thing: act scared of this one special switch. What is special about it remains a mystery.

21mvwr8.jpg
 
Last edited:
Well, my earliest revision is now working again normal like it did a month ago. This just started happening after an Extended Database Repair following running MalwareBytes, CCleaner, Spybot Search & Destroy and Microsoft Security Essentials is now half-way through its malware scan. I did have to re-download some content that was corrupt following reinstalling it back Trainz 2012 from CDP such certain rolling stock dependencies missing. This is a common task that I have to do always following a Trainz clean reinstall. Trainz reinstalls and/or malware/virus scans are usually necessary when the AI mode breaks down after some time has passed and commands get balked at. AI (artificial idiocy) is central to most Trainz troubles when running Sessions but vital to my Trainz driver enjoyment. One simply can't have a bunch of trains running at one while controlling them all at the same time by hand. AI/autonomous computer control is very important on modern physical model RR layouts as well. I'm going to let MSE finish its scan, reboot the PC and try my latest revision of the route again where the trouble was first observed. My latest edition has some added things that the first edition did not as well cars, intermodal scenery truck trailers and sound objects I made as "All aboard!" and "a man yelling driver commands to stagecoach horses along the route". Perhaps malware on the PC can cause Trainz to act nuts too. This game drives you up a wall trying to troubleshoot it at times. I do always save up to five revisions of any route that's worked on in Surveyor.

The invisible signals weren't necessary just beyond this lever as there has always been a visible signal about 1,500 feet beyond the lever.

There was a jinx in the software or on my PC and it looks like there may be signs that the junction-balking spell MIGHT be lifted. It's looking more promising so far...
 
Last edited:
Well, my earliest revision is now working again normal like it did a month ago. This just started happening after an Extended Database Repair following running MalwareBytes, CCleaner, Spybot Search & Destroy and Microsoft Security Essentials is now half-way through its malware scan. I did have to re-download some content that was corrupt following reinstalling it back Trainz 2012 from CDP such certain rolling stock dependencies missing. This is a common task that I have to do always following a Trainz clean reinstall. Trainz reinstalls and/or malware/virus scans are usually necessary when the AI mode breaks down after some time has passed and commands get balked at. AI (artificial idiocy) is central to most Trainz troubles when running Sessions but vital to my Trainz driver enjoyment. One simply can't have a bunch of trains running at one while controlling them all at the same time by hand. AI/autonomous computer control is very important on modern physical model RR layouts as well. I'm going to let MSE finish its scan, reboot the PC and try my latest revision of the route again where the trouble was first observed. My latest edition has some added things that the first edition did not as well cars, intermodal scenery truck trailers and sound objects I made as "All aboard!" and "a man yelling driver commands to stagecoach horses along the route". Perhaps malware on the PC can cause Trainz to act nuts too. This game drives you up a wall trying to troubleshoot it at times. I do always save up to five revisions of any route that's worked on in Surveyor.

The invisible signals weren't necessary just beyond this lever as there has always been a visible signal about 1,500 feet beyond the lever.

There was a jinx in the software or on my PC and it looks like there may be signs that the junction-balking spell MIGHT be lifted. It's looking more promising so far...


Ok, my MSE finished its scan and no threats were found. My Windows 7 was updated as well as my graphics card.

I ran my latest version of my route and the same AI troubles cropped up again. Balking at the same switch.

I did notice that the route had two errors: two UNKNOWN assets. in Surveyor I ran the tool that is supposed to delete any missing assets.

I did that also to the earliest version of my route too and afterward it ran AI normal again.

Now, I am going to try running Ext. Db. Rep. again and see what happens.

The trouble seems to happen in later revisions of the route with the wellcars and intermodal scenery trailers added.

Can certain content corrupt Driver operation?
 
Ok, my MSE finished its scan and no threats were found. My Windows 7 was updated as well as my graphics card.

I ran my latest version of my route and the same AI troubles cropped up again. Balking at the same switch.

I did notice that the route had two errors: two UNKNOWN assets. in Surveyor I ran the tool that is supposed to delete any missing assets.

I did that also to the earliest version of my route too and afterward it ran AI normal again.

Now, I am going to try running Ext. Db. Rep. again and see what happens.

The trouble seems to happen in later revisions of the route with the wellcars and intermodal scenery trailers added.

Can certain content corrupt Driver operation?

Nope. Did not fix my latest revision.

I'm going to try different things like remove the wellcars from the route and work back to previous revisions.
 
Nope. Did not fix my latest revision.

I'm going to try different things like remove the wellcars from the route and work back to previous revisions.

It wasn't the well cars either.

Going back to my second to latest revision fixed the AI issue.

Something got corrupted in the data of the latest revision somehow.

Case closed. :D


PS - I am now going to make it habit to back up ten revisions of a route instead of just five for double good measure.
 
I've had that happen before for some unknown reason.

Sometimes deleting and rebuilding the junctions has fixed the balky places.

I did have an odd bug though once which finally got fixed and it's somewhat related. I had directed the AI to drive via some track marks to their various destinations. For some reason the drivers would skip a particular track mark, ignore the junction and go down the wrong track. Other times if the junction was set, they would take the route as requested. After firing my balky drivers twice after blaming them for having more than tea and soda at lunch, I decided to dig into the route a bit. That particular route has trolley wires on it that I had to remove first in order to dig at the track and track marks underneath. This is before I used layers for the trolley wires.

This is the interesting part....

As I pulled down the wires, the track mark and some direction markers moved with the wires! No wonder the AI didn't see the markers - they weren't really there for them to see! I moved the markers to the tracks from the wires, and everything was fine and reported this as a bug, which was fixed shortly afterwards.

The problem was simple. This was during the transition when splines were now to be made as track, but use the tag isroad 0. For some reason isroad was ignored so that these non-tracks were 'tracks" and track objects, trains, and other things could actually attach to them, including track too. Fun stuff!

And yeah, all drivers were rehired and all continue to work today.
 
John:

After I got the balky switch lever issue fixed, AI would suddenly slow down by 5 to 13 MPH at one particular "waypoint" (DRIVE VIA) trackmark about 200 feet head of it. There was also a speed limit sign close to it but no speed limit sign close to any other such track mark so I suspected that this might be the culprit. When diagnosing a bad spot on a line I try to figure out what's different about the way this particular spot is constructed. Can certain trackside content interfere with AI performance? So, for fun I moved the trackmark down the line about 200 feet further away from the speed sign and now AI only drops trainspeed by about 3 MPH when crossing this mark as it does all the other track marks.

I also shortened the default 20 m range of my "waypoint" track marks to just 1 m hoping there would be less trainspeed loss at the trackmark. No, the trainspeed loss is about the same still. AI has this un-graceful habit of suddenly braking over a trackmark while executing the "Drive Via" command but a drop from 21 mph to 18 mph is not too bad when viewing a train line-side: you will hear the diesel engine RPM drop suddenly and then rev back up again at the track marks but visually it does not appear the train is braking too hard.

I hope for a more advanced AI for Trainz in the future in which AI will drive trains in accordance with real-world physics: trainspeed, acceleration and braking and not make any trainspeed changes crossing over track marks. AI, while executing Drive (or Navigate) Via should just keep its hand steady on the throttle as it is reading the next command on the schedule by default. Imagine if your autonomous car slowed down suddenly on the highway every time it passed a GPS waypoint on its pre-programmed trip plan.

AI should also be improved to follow signals more accurately too. AI should not even "see" a yellow signal unless the train is fairly close to it and, then again, reduce train speed gradually as if a real human were driving a real very heavy train. At what real-world distance ahead can a human loco engineer first observe a signal upcoming? 500 feet?
 
Last edited:
I do the same. It's part of the forensic process I suppose in figuring out what caused the actions I'm seeing now that didn't occur before. The AI have always slowed down when crossing track marks for as long as I can remember. They're not as bad with TRS19 and T:ANE, but truly awful in TS12.

Certain track objects can interfere with each other and with interactive industries. I have found through experience that having signals too close to rail crossings, and both of these too close to stations can cause the AI to roll right through as if they don't exist. The crossings aren't as bad in that regard, but they do bother stations. With signals too close, it's okay with a single AI train, but if you have trains following each other, such as on a trolley line for example, they will get confused. The signal at the entrance to the platform will show a yellow and cause the following AI to pull in while the exiting train is just leaving the station. This causes the following AI not to slow down and he ends up skipping the station stop.

The road crossing too close to stations cause the stations not to always work as the crossing is interfering with the station. It took some tweaking but I found the distance is about 20 meters, or two squares, away from the station to work properly. There are other triggers and things as you've found out that cause this such as speed limit signs being too close to the track mark causing confusion. From what I gather from reflecting on this, I think it's not so much the assets are interfering with each other, but more with the command queue that the AI driver needs to work through. The AI script needs to process the various events quickly and if there are too many things happening at once, something gets lost in the flow.

The yellow signal and or switch lever issue has always been a problem, but is it?. You have to keep in mind too that driving a train requires lots of stopping distance and a yellow signal means to operate at half speed of the posted speed in order to prepare to stop at the upcoming red signal. On a real railroad, the engineer would initially see a flashing yellow telling him that he needs to prepare for an upcoming slower speed. If the Trainz signals are setup properly, the signals will work in this fashion.

The AI have "telescope eyes" and seem to be able to see way down the track at the junction or yellow signal. The only way around that is to place intermediary signals such as approach or distant signals - the ones with the signs below the heads - to keep the AI moving along and prevents the closest signal from being red or yellow for the full distance the AI driver travels. In reality this is how the real signaling systems work, and the Trainz signaling system is based on ABS or Automatic Block System operations. The AI "seeing" these signals in the distance like this is similar to having an advanced warning or cab signal setup in a real locomotive cab.
 
Yes, AI sees these long-distance yellow signals and hits the brakes as it were a Toyota Corolla about to run into a brick wall 50 feet ahead on an interstate.

It cracks me up how a mile-long freight is going 50 mph then suddenly drops to 25 mph in about two seconds flat as soon as the HUD display indicates Yellow ahead.

There is a rural section on my 7.10 mile-loop layout about 3.5 miles long and away from junctions. This is the section of my model trainz layout where I open my AI-driven trains up to 50 MPH tops. Passenger trains can easily hit 50 mph because they are relatively light. The 50 mph zone is about two miles long and my heaviest freight with six SD40's can only get up to 49 mph. The other 3.50 mile urban section has yards, stations, customer sidings and crossover junctions so it's a slow zone of 25 mph tops. Trains tend to go about 20-22 mph even under yellow in the slow zone so yellow signals here don't adversely slow the train down. I have signals spaced 1,000 feet apart in the fast rural section so it's unlikely a yellow signal will be seen while the train is doing 50. As the train draws nearer to the urban section, there is a 40 mph buffer (mid-range speed) zone that's about a mile long before it hits the 25 zone. So braking/acceleration is less dramatic and more naturally gradual as trains transition in and out of fast zones and slow zones.
 
Last edited:
I still recommend putting in some intermediate distant signals, aka permissive signals, in between the absolute and other signals. If an AI driver sees another consist ahead, it will automatically run at caution speed, i.e. half the posted limit as it prepares to stop in case of an emergency.

Freights take a long time to get up to running speed, and rightly so due to coupler slack and drag. If a train were to accelerate too quickly, the couplers would snap as they have in real life and in sessions where coupler breakage is enabled. The train needs to pull along slowly to get into motion and once in motion it will take a very long time to slow down in real life. The AI aren't so realistic here and I agree it isn't prototypical that AI will suddenly slow down. In real life they would take their time slowing down to avoid the hard braking. Hard braking will cause the trailing freight cars and passenger coaches to bunch up, and this can cause derailments if this occurs too hard and too fast. This is why there are derailments a lot of times when a heavy freight goes into emergency. The driver hits the emergency stop and the trailing heavy coal cars, for example, will continue moving at their previous speed even though the front of the train has stopped. This will accordion the train and push it off the tracks. This is what happened with the coal train derailment in Maryland a few years ago where the engineer put his heavy coal train into emergency because some teenagers were on the tracks. Unfortunately his train derailed and the kids were killed anyway from the crush of the coal and engines.

For AI operation, this is another reason why the permissive signals are helpful because they give the AI more advanced warning of upcoming track conditions such as signals and junctions. With other trains operating on the same tracks, they will help keep the trains moving along smoothly as one train leaves one block section and enters the other.

I do the same with the speed limits and have done this since I started with TRS2004. This gives the AI a chance to slow down methodically rather than suddenly like car drivers do when they reach a radar-patrolled road through some hick town in the middle of a cornfield. (I've been through a few towns like that in the Midwest. 65 on the road approaching, 25 mph in the town with a cop on the corner, and 65 on the road outside the town limits).

If you have lots of yellow signals in your yard and busy track areas, set the switches mainly for the main line through the yard and this will keep the speed at the fullest it will go through there and will prevent the AI from stopping at any upcoming red signals unless it's necessary. It also helps to put in an avoidance track where the trains are routed around the busy yard using strategically placed track marks such as the beginning, middle, and end.
 
Actually, I don't run AI in the yard at all, just the mainline. The yard is where it is fun to run an engine by hand.

I don't have any yard lead or assembly/disassembly tracks. The main line with entrances, signals and crossovers at either end is used for this purpose.
Part of railroading is ironclad patience! Hurry up and wait!

AI mainline trains will be held up by signals at either end of my yard or by rolling stock parked on the mainline and I will give them both the Stop Train command so they let go of the mainline levers
so I can have complete control of yard entrance and crossover switching. A very long train might take me 45 minutes to break up and put in the yard while pulling other rolling stock for another long freight
out of the yard to trade places. I may have a broken intermodal long consist of well cars in the yard and want to swap that out with my long unit tank train on the mainline using the same locomotives, head and intermediate helpers. A complex yard switching maneuver indeed. One long freight trading out for another.

My main line runs parallel along the side of the yard with entrances to yard ladders and mainline x-overs at either end.

When I am done with my yard marshalling operation, the AI riders on the mainline waiting will be given Continue Schedule to get them rolling again.
 
Last edited:
Actually, I don't run AI in the yard at all, just the mainline. The yard is where it is fun to run an engine by hand.

I don't have any yard lead or assembly/disassembly tracks. The main line with entrances, signals and crossovers at either end is used for this purpose.
Part of railroading is ironclad patience! Hurry up and wait!

AI mainline trains will be held up by signals at either end of my yard or by rolling stock parked on the mainline and I will give them both the Stop Train command so they let go of the mainline levers
so I can have complete control of yard entrance and crossover switching. A very long train might take me 45 minutes to break up and put in the yard while pulling other rolling stock for another long freight
out of the yard to trade places. I may have a broken intermodal long consist of well cars in the yard and want to swap that out with my long unit tank train on the mainline using the same locomotives, head and intermediate helpers. A complex yard switching maneuver indeed. One long freight trading out for another.

My main line runs parallel along the side of the yard with entrances to yard ladders and mainline x-overs at either end.

When I am done with my yard marshalling operation, the AI riders on the mainline waiting will be given Continue Schedule to get them rolling again.

I have a similar operation setup on my smaller branch line routes such as the Gloucester Terminal Electric, which is a rework of George Fisher's Gloucester Terminal, but with an additional continuous operation of trolley cars and outside connections. The Gloucester yard has a wye interchange with the Boston and Maine Rockport branch. This is for real since the route is based on a DEM from the Cape Anne area located about 30 miles from my house. The Gloucester Terminal part and the rest of the operation is purely fictional but plausible. On my version of the route, Rockport and Boston are portals which spit out periodic freight and commuter trains. For the most part, they continue on their merry way to and from either portal with the commuter trains making their respective stops at West Gloucester and Gloucester, as they do for real, on their schedules. Freight service was never a big player on this line even in real life, and today it's non-existent thanks to Pan Am Railways, but..., but being Trainz we can remedy that and make this a busier line than ever. :)

I do all the switching in and around the yard and industries and when I'm done the chores, I will put the interchange freight up on the the wye to wait for a Boston bound freight to pick them up. Occasionally there will be a constant parade of outbound commuter trains and maybe a single long freight for Rockport, but nothing for Boston so the cars sit there. When a Boston bound freight comes along, I will break the engines off and send them to my engine house for servicing while I interchange freight on the mainline. This can take some time and I need to work my crossing over and switching in between the outbound - Rockport bound commuter trains. While this is happening, there is now a parade of stuck AI drivers waiting for access to the Boston bound track, which I have stopped for the same reasons you do. In the meantime, the trolleys are running their schedule and whizzing by on their parallel track and running up and over the Gloucester yard and wye on the concrete overpass.

Once everything is interchanged, I then move my switchers out of the way and direct the AI drivers to couple on to the head of the freight and continue on to Boston. Once this freight has cleared the crossovers past the Annisquam drawbridge, I will let the other traffic loose and watch the parade of commuter and freights heading towards Boston.

This scenario can take anywhere from 15 minutes, if a Boston bound freight comes along sooner, or a couple of hours. It's great fun when the AI cooperate and do what they're supposed to do and I don't have to chase after a stuck trolley. The trolleys are supposed to run a continuous circuit, almost endlessly once the route starts up, but tor some reason the AI always play up when I need to do some tasks as though they are 3 year-olds looking for attention!
 
Did you ever have a very complex interlocking, on a 4 track mainline, that has a slolum path of turnouts (L,L,L,L L, Double Slip, L), or a complex yard ladder with many closely laid turnouts, and AI drives at 1/2 speed, or hunts and pecks along at 5, 7, 3, 9, 2 mph, or comes to a stop in the middle of the interlocking, with a message: "path can not be found", "signal Passed at danger", even though you have placed more than enough BNSF50 Invisible Signals throughout the path ?

I have installed a special spline point circle just 3 RR ties prior to the first turnout spline point, and then I laid BNSF50 Invisatrack well off to the side, on the shoulder ... then go back and measure each and every track spline point height, and transfer that same height to each and every of the adjacent cooresponding BNSF50 Invisatrack spline point(s) ... Then when done, you carefully slide all the cooresponding BNSF50 Invisatrack spline points, so that they are in eclipsing in register, directly overtop of the real track spline points, all through the turnout path.

This way when you place a trackmarker on the BNSF50 Invisatrack, ie: "Sang Hollow Power Plant", the train cruise's along at a steady desired smooth full speed, snaking it's way through the complex slolum path interlocking, or complex yard ladder. This way it encounters only straight through track, and encounters no wrongly aligned turnouts, nor stop signals.

So in effect the BNSF50 Invisatrack is using the real track as a fake scenery track.

I use "Drive" or "Just Drive" allot, to cruise along uninterrupted at a smooth steady speed of 48 mph throughout the 300 mile long path from Pittsburgh/Conway terminal, all the way to Harrisburg/Enola PA terminal ... although it will not throw turnout lever directions ... You may prefer to manually set all your junctions, like a dispatcher does, all the way down the line.

So I mostly use: "Drive To", or "Drive Via", or "Naviigate To" to the BNSF50 Invisatrack path trackmarker.

I have also locked my crossovers using 2 Track Direction markers, each pointing facing both ways, then an AI train can not make up it's own invented "shortest route" path.
==================================
I only use tracking cameras, as when I mix in static cameras, they keep flicking back and forth, even though the cameras are several miles out of range.




 
Last edited:
I still get this

I've had that happen before for some unknown reason.

Sometimes deleting and rebuilding the junctions has fixed the balky places.

I did have an odd bug though once which finally got fixed and it's somewhat related. I had directed the AI to drive via some track marks to their various destinations. For some reason the drivers would skip a particular track mark, ignore the junction and go down the wrong track. Other times if the junction was set, they would take the route as requested. After firing my balky drivers twice after blaming them for having more than tea and soda at lunch, I decided to dig into the route a bit. That particular route has trolley wires on it that I had to remove first in order to dig at the track and track marks underneath. This is before I used layers for the trolley wires.

This is the interesting part....

As I pulled down the wires, the track mark and some direction markers moved with the wires! No wonder the AI didn't see the markers - they weren't really there for them to see! I moved the markers to the tracks from the wires, and everything was fine and reported this as a bug, which was fixed shortly afterwards.

The problem was simple. This was during the transition when splines were now to be made as track, but use the tag isroad 0. For some reason isroad was ignored so that these non-tracks were 'tracks" and track objects, trains, and other things could actually attach to them, including track too. Fun stuff!

And yeah, all drivers were rehired and all continue to work today.

When I try running an AI stops before a junction saying "waiting access to track", what solved the issue?
Thank you!
 
Back
Top