AI behavior

I am a Trains + user running build 123794. This build broke many of my routes. I have had to add many more track marks to prevent AI controlled trains from stopping, or worse, reversing direction. I was one of the first people to mention that its almost like a trailing train cannot see "through" a preceding train to see its next track mark. In most cases of a malfunctioning AI train this hypothesis "explains" why I am having to add so many more track marks. Things ran fine in build 122411, the previous commercial release. Build 123794 broke a lot of stuff for me. I should comment that I have no assets showing errors and have done numerous complete data rebuilds to see if that solves any of my problems - it doesn't. I am also using the "drive to " commands.
I just ran my Gloucester Terminal Electric route. I haven't had the opportunity to do much driving if at all for months since I've been working on other projects both in and out of Trainz. In this particular route, I have nearly 2-dozen active AI drivers plus two to four captive AI drivers on a mainline with no interaction with each other. In 122411, like all previous builds, I could drive for hours before I had one particular drive do something off the wall in the typical AI fashion which I need to troubleshoot someday. Usually, I just fix the AI and continue on for another few cycles before the goof up occurs again. In build 123794, after 15 minutes I had AI get "stuck". They were all staring at a signal even though the signals were green or yellow. I CTRL-right-clicked on each one and had the drivers continue schedule which they did without problem except for one. This one driver decided to crossover on to the other mainline causing a fouled mainline due to locked switches. I had to intervene and place him beyond that junction in order to get the operation working again. The other interesting thing I noticed was that there were no messages posted in the message-box regarding getting stuck. It was as if they finished their schedules and that was that.

I'll take a look at the OPs route and session tomorrow, but I have a feeling he's on to something as well. I wonder if part of this is due to the new TLR thing the developers are working on. In the process of implementing this new feature, they broke something else.
 
i 100% agree with you but the thing that makes no sense is that if i had a "missing lever" or "the direction markers facing the wrong way" the point that the first train can follow its command with no problem but the ai train behind says No path to destination is weird. and when i press continue schedule it magicly finds its path when the train ahead is a couple of blocks away is also weird.

to make it simple to see my problem i made a session on the Kickstarter County 2 route and made a edit of the route just to add the direction markers and some extra signals to the route layer. i did this setup to show the most common problems i've been having with the Ai trains since the update **route file https://drive.google.com/file/d/1OOFvk7vPOuPfPCF2i9Z_y91Birwyg_TB/view?usp=sharing
**session https://drive.google.com/file/d/1KM7kUpMW68Itbwqbig8BLqYmv8CSH_ps/view?usp=sharing

in the session i have 5 Ai trains on the track and with 3 simple commands (station - trackmark - trackmark *repeat) .the first Ai train lined up goes to the first station with no trouble and continues on to its next set of commands. the second Ai train lined up immediately drops its command and so does the third Ai train and they both say No path to destination and the "continue schedule" button wont work until it has 2 or more blocks to travel). the fourth train reverses (for no reason) and disobeys the track direction marker and the fifth train is stuck watching the party happen. eventually after spamming the continue schedule everything goes to normal but then who knows when it might happen again. i never had to spam the continue schedule to get trains to move.

After searching through the fourm i read similar problems like this but the one that stood out was this comment - https://forums.auran.com/threads/trainz-plus-tlr-phase-1-trs22-sp3-update.175710/post-1994746

The user mentions ". Trains ignore track marks and continue on their merry way on the wrong track, and then stop and back up" and "Two trains following one another in a 5 minute interval behave differently"

I gave your route a try and I solved the problem.

Other than the first driver that heads to St. Nicholas station platform 1, I gave Smiley 2 minutes wait and Dave 3 minutes since they sit behind the first driver that heads to the station.
With the minute or two, each driver now wait their turn to leave and move along towards St. Nicholas as scheduled.

The message makes sense here. The reason why Dave is posting the message and sometimes attempting to back up and go around is due to the other trains in the way. The message though is new. In the olden days, the AI would've waited but now we have it. It does make sense though, and the only time we would see this message was when the switches, or there was a broken track, or track direction markers were facing the wrong way. The AI driver really can't plot the route to the station because the path is blocked. This message change may have something to do with TLR and maybe the upcoming dispatcher update we'll see soon(tm) in beta.

With that said, this isn't saying there's not weird things occurring because I have witnessed them more often with my own Gloucester Terminal Electric route. With about 22 active AI drivers on the electric portion, I have them waiting and I need to continue their schedules. For some reason this is occurring now and this never occurred, or if it did it wasn't immediately upon starting the session. In TRS19 and even previous TRS22 and Plus versions, I could have sessions on this route run for many hours before I gave up or there was a driver issue, but by then I was tired and gave up anyway.
 
Talking about AI behavior i see an improvement since Tane, less mistakes from bots and they seem more mature than previous versions. In Tane mainly i was using a lot the navigate to and drive to orders but in Trainz 22 so far i only use the drive option ,which works better in this version, for some reason i do not know if this had to do with Tane content but i could not find locations under the drive to and navigate to command. Recently i saw that there are locations in other routes under those command.
 
I have also solved some of my AI issues by issuing a wait command of several minutes on trailing trains. I am more convinced that trains following to closely to one another require many more track marks.

I just downloaded the "Harvard Sub" route from the content store. It basically uses no track marks but uses only "navigate to" a station, load, and then "navigate to" the next station. In the downtown area of Chicago, it goes through some very intensive switching as it leaves the terminal area. I ran the route using AI for about two hours, and it ran without a hitch. So, the AI issue seems to be more than just adding more track marks.
 
I have also solved some of my AI issues by issuing a wait command of several minutes on trailing trains. I am more convinced that trains following to closely to one another require many more track marks.

I just downloaded the "Harvard Sub" route from the content store. It basically uses no track marks but uses only "navigate to" a station, load, and then "navigate to" the next station. In the downtown area of Chicago, it goes through some very intensive switching as it leaves the terminal area. I ran the route using AI for about two hours, and it ran without a hitch. So, the AI issue seems to be more than just adding more track marks.
That is how I run my routes. I have some somewhat complex terminal areas and use Navigate to and Drive to commands along with track marks to route the trains in and out of the terminals and out on the mainline to their destinations. In the past, this worked flawlessly.

I use wait commands all the time. They are very helpful for industries, and for allowing AI to exit from terminals and complex areas without getting in each other's way, and for use between Copy Commands from commands when stringing them together.

Now, there seems to be something else, I agree, that's causing problems. and I can't quite figure out what it is. As I said in the post earlier, I have a feeling this is related to the new TLR, and maybe due to the upcoming changes for the dispatcher control.
 
That is how I run my routes. I have some somewhat complex terminal areas and use Navigate to and Drive to commands along with track marks to route the trains in and out of the terminals and out on the mainline to their destinations. In the past, this worked flawlessly.

I use wait commands all the time. They are very helpful for industries, and for allowing AI to exit from terminals and complex areas without getting in each other's way, and for use between Copy Commands from commands when stringing them together.

Now, there seems to be something else, I agree, that's causing problems. and I can't quite figure out what it is. As I said in the post earlier, I have a feeling this is related to the new TLR, and maybe due to the upcoming changes for the dispatcher control.
Dispatcher control what this means exactly? I red a few words in a recent N3V email. First time i met this in Canadian Rocky Mountains River Basin which actually makes you the dispatcher of AI trains, this works fine for me so i add my train and i have despite driving my consist the duties to check the AI trains, give them priorities depending the situation. This mode of session for me is the best and i see that it is something of becoming a standard in Canadian Rocky mountains routes, which make me think seriously to buy at the next discount the three Canadian routes i am missing for this mode of sessions. So concluding is this dispatcher control something similar?
 
Last edited:
Dispatcher control what this means exactly? I red a few words in a recent N3V email. First time i met this in Canadian Rocky Mountains River Basin which actually makes you the dispatcher of AI trains, this works fine for me so i add my train and i have despite driving my consist the duties to check the AI trains, give them priorities depending the situation. This mode of session for me is the best and i see that it is something of becoming a standard in Canadian Rocky mountains routes, which make me thing seriously to buy at the next discount the three Canadian routes i am missing for this mode of sessions. So concluding is this dispatcher control something similar?
There's a new update coming out for TLR and that includes dispatcher-control for the AI drivers. I'm not sure how this is going to work, so we'll have to wait and see. This is much different than the dispatcher session where the AI are under automatic schedule control as usual.
 
I gave your route a try and I solved the problem.

Other than the first driver that heads to St. Nicholas station platform 1, I gave Smiley 2 minutes wait and Dave 3 minutes since they sit behind the first driver that heads to the station.
With the minute or two, each driver now wait their turn to leave and move along towards St. Nicholas as scheduled.

The message makes sense here. The reason why Dave is posting the message and sometimes attempting to back up and go around is due to the other trains in the way. The message though is new. In the olden days, the AI would've waited but now we have it. It does make sense though, and the only time we would see this message was when the switches, or there was a broken track, or track direction markers were facing the wrong way. The AI driver really can't plot the route to the station because the path is blocked. This message change may have something to do with TLR and maybe the upcoming dispatcher update we'll see soon(tm) in beta.

With that said, this isn't saying there's not weird things occurring because I have witnessed them more often with my own Gloucester Terminal Electric route. With about 22 active AI drivers on the electric portion, I have them waiting and I need to continue their schedules. For some reason this is occurring now and this never occurred, or if it did it wasn't immediately upon starting the session. In TRS19 and even previous TRS22 and Plus versions, I could have sessions on this route run for many hours before I gave up or there was a driver issue, but by then I was tired and gave up anyway.

Thank you for checking it out. I have added a good amount of wait commands on my other route session that i have, but for the example session that i posted was to show the typical errors that the Ai encounter since the latest updates. the wait command is very good but with the bugs thats going on at this very moment its more of a bandage solution. one thing we gotta remember is that one of the current bugs is that Ai will sometimes drop its schedule completely if they pull up to a block that's occupied and will require a manual click of the "countinue schedule". meaning that even if you gave the wait command to the other two drivers behind the first driver and with the current bugs going on is equivalent to me seeing the bug "no path to destination" then waiting for the first driver to move a couple blocks up then clicking the "continue schedule" . because eventually a train will meet a occupied block and the "no path to destination" and the Ai stopping its commands bugs might happen. before the updates a Ai train at a red light would simply say that the block is occupied and would simply wait at the red light no matter what (unless you used the navigate command then it would look for a way to its path even if it has to go into reverse). the point that Ai trains are having trouble seeing paths occupied by a train at a red signals is truly weird since the latest update. like you said " In TRS19 and even previous TRS22 and Plus versions, I could have sessions on this route run for many hours before I gave up or there was a driver issue".
 
Last edited:
There's a new update coming out for TLR and that includes dispatcher-control for the AI drivers. I'm not sure how this is going to work, so we'll have to wait and see. This is much different than the dispatcher session where the AI are under automatic schedule control as usual.
Roger John thank you for the information!
 
Thank you for checking it out. I have added a good amount of wait commands on my other route session that i have, but for the example session that i posted was to show the typical errors that the Ai encounter since the latest updates. the wait command is very good but with the bugs thats going on at this very moment its more of a bandage solution. one thing we gotta remember is that one of the current bugs is that Ai will sometimes drop its schedule completely if they pull up to a block that's occupied and will require a manual click of the "countinue schedule". meaning that even if you gave the wait command to the other two drivers behind the first driver and with the current bugs going on is equivalent to me seeing the bug "no path to destination" then waiting for the first driver to move a couple blocks up then clicking the "continue schedule" . because eventually a train will meet a occupied block and the "no path to destination" and the Ai stopping its commands bugs might happen. before the updates a Ai train at a red light would simply say that the block is occupied and would simply wait at the red light no matter what (unless you used the navigate command then it would look for a way to its path even if it has to go into reverse). the point that Ai trains are having trouble seeing paths occupied by a train at a red signals is truly weird since the latest update. like you said " In TRS19 and even previous TRS22 and Plus versions, I could have sessions on this route run for many hours before I gave up or there was a driver issue".
The wait command is definitely a bandage here. We deal with a lot of workarounds with Trainz. When driving my Gloucester Terminal Electric route last night. A route with many trams running a 12 km (7.5 mi route) plus branches, I witnessed the AI turning around instead of waiting for other trams to move out of a station and also when encountering a red signal. What's interesting is some work fine but others following the same schedule do not. It's as if those drivers that turn around are thinking, I'm not going to wait for this bloody &%)^! and turn around. When they turn around, they get stuck and sometimes turn themselves around and go forward again as they ping-pong back and forth. Unfortunately, due to the nature of this route being a tram line, this is double-track with crossovers that will send the trams down the whole length of the route, totally and absolutely lost as they will wander down freight sidings and sometimes on to a freight line.

Before people think I'm using the Navigate To command here this is not. I'm using the Drive To command at these specific locations to force the AI to wait in line at a terminal before heading back the other direction on the correct side of the line. As I said, this worked fine before. I used to run this route for hours at a time and usually quit before anything occurred like this.
 
The wait command is definitely a bandage here. We deal with a lot of workarounds with Trainz. When driving my Gloucester Terminal Electric route last night. A route with many trams running a 12 km (7.5 mi route) plus branches, I witnessed the AI turning around instead of waiting for other trams to move out of a station and also when encountering a red signal. What's interesting is some work fine but others following the same schedule do not. It's as if those drivers that turn around are thinking, I'm not going to wait for this bloody &%)^! and turn around. When they turn around, they get stuck and sometimes turn themselves around and go forward again as they ping-pong back and forth. Unfortunately, due to the nature of this route being a tram line, this is double-track with crossovers that will send the trams down the whole length of the route, totally and absolutely lost as they will wander down freight sidings and sometimes on to a freight line.

Before people think I'm using the Navigate To command here this is not. I'm using the Drive To command at these specific locations to force the AI to wait in line at a terminal before heading back the other direction on the correct side of the line. As I said, this worked fine before. I used to run this route for hours at a time and usually quit before anything occurred like this.
I agree with all of what you said 100%. At this point I don't feel comfortable running 15 or more Ai drivers that I usually have in a session (something I use to do in trainz a new Era, trainz 19 and the old builds of trainz 22 with no issue's). In the past The best feeling was seeing a Ai train doing some silly things and simply fixing the problem with a simple track marker to guide them a bit more along their path and if they were still stubborn you would put some direction markers so they won't even try to take no other paths and some other stuff like the wait command we were discussing. But at this point it's the latest build of trainz 22 that's truly making the Ai drivers bug out.
 
I agree with all of what you said 100%. At this point I don't feel comfortable running 15 or more Ai drivers that I usually have in a session (something I use to do in trainz a new Era, trainz 19 and the old builds of trainz 22 with no issue's). In the past The best feeling was seeing a Ai train doing some silly things and simply fixing the problem with a simple track marker to guide them a bit more along their path and if they were still stubborn you would put some direction markers so they won't even try to take no other paths and some other stuff like the wait command we were discussing. But at this point it's the latest build of trainz 22 that's truly making the Ai drivers bug out.
I agree too. I'm not updating my sessions or routes to make the AI work in this version because that may change down the road. There's an upcoming beta for the TLR and I have a laundry list of bugs from this version I'm submitting to N3V developers to address. Some may have already been addressed, which is a good thing, but we were never told if they have been or not, so I'm handing them the list anyway.

It really is the best feeling seeing the AI going about their business while I was off switching freight cars and doing my deliveries with the AI passing by. It was this freedom that drew me to Trainz because unlike the old MSTS at the time, the sessions were locked and got boring. From my very first "serious" driver session I created, I always set them up for AI to do one thing while I did something else.

Occasionally needing to untie them is typical due to AI but for the most part, my routes will run for hours without and that is a rare event. This took a very long time working these routes and sessions to get the AI behave using the usual extra track marks and direction marks as needed.

On another route I have, there are two very complex passenger terminals. They both handle commuter traffic in and out in the mornings, oh by the way passenger platforms such as the VSR high-level platforms have issues too I found out recently where you can't change the parameters for more passengers, etc., when the commuters are heading to off the route locations. With these complex stations, I don't need AI backing up randomly and tying up the flow of traffic. These places took more than an hour or two to work out the traffic flow and I'm definitely not touching them at this point.
 
I've found a temporary solution to get the Ai running good again, and to my surprise it seems to be working really good,

in the pic shown below the Track Profile UI says the train has been running for almost 302 miles! :LOL: they've been running for around 2 hours with no problems.

to achieve this i got this "auto drive" command from the download station. it can't change the track levers along the route (since it's only a simple drive command) but it makes the Ai follow all the signals and the destinations that i assigned it to with no problem.


I then added some interlocking towers along the route and gave each Ai train a command to tell the the interlocking towers which path it would like to take using the "IT SetPath" command as shown in this photo.


i really tried to avoid using any of the built in drive to, drive via and navigate commands since they are moving buggy since the latest update. so i put the "drive to" command right after the "auto drive" command when the Ai was really close to a passenger station or industry so that the "drive to" command would only be used for 10 seconds or less. then load or unload then right back to the "auto drive" command to the next station as shown below.

So far no problems, i'll see how much more hours they can run like this:). but truly i hope they drop a patch soon so i don't have to do all this work to get them running good. in total i have 10 interlocking towers with many paths:ROFLMAO:
 
I still got my session running , it's been around 19 hours and i have achieved 1190 miles per train, new record for me.
like i said before, i really tried to avoid using the buggy built in drive to, drive via and, navigate commands. if i really have to use them it's only for a short time and i really mean a short time. in the video below you can see the "drive to" command only being used for a couple of seconds then switches up to the load command and boom right back to auto drive to its next trackmark.

normally it would not be a problem to use the built-in drive to, drive via and navigate commands but the way the Ai is interacting with them since the update is a big no. With the 19 hours that went by in the session (and using the Auto drive command for most of my track marks ) i never got "no path to selected designation" i never had to click " continue schedule " no Ai trains was reversing, it went all good. especially on a map this size
 
The AutoDrive command solved my problems. I can now run a train for an hour or more without it stopping or reversing direction. Where I was having problems were long stretches of track between junctions which were heavily used. I had to keep adding more and more track marks between these junctions to keep all the trains moving without stopping, or worse changing direction. Now I just use a Autodrive command between the junctions. This eliminates the need for track marks along the way. It took some time to convert one of my routes, but it now works as expected. At the end of the day this may actually be a better solution then adding a bunch of track marks.

The question is whether N3V is aware of the problems created with track marks with the upgrade to build 123794. Even if they are aware, will they try to find and fix the issue. This has broken many routes/sessions that worked before.
 
The AutoDrive command solved my problems. I can now run a train for an hour or more without it stopping or reversing direction. Where I was having problems were long stretches of track between junctions which were heavily used. I had to keep adding more and more track marks between these junctions to keep all the trains moving without stopping, or worse changing direction. Now I just use a Autodrive command between the junctions. This eliminates the need for track marks along the way. It took some time to convert one of my routes, but it now works as expected. At the end of the day this may actually be a better solution then adding a bunch of track marks.

The question is whether N3V is aware of the problems created with track marks with the upgrade to build 123794. Even if they are aware, will they try to find and fix the issue. This has broken many routes/sessions that worked before.
I'm less inclined to alter anything until I find out if the break in sessions is permanent. I have some very large routes with many drivers and I definitely don't want to change anything until I find out. AutoDrive works well for long distances but what about those areas with lots of junctions? This is the area where the AI starts backing up when it needs to navigate through a yard or terminal. One particular route has a few large passenger stations and some large terminals with complex tracks and I'm afraid the change will be for naught. These areas used to work fine in the previous versions.
 
I'm less inclined to alter anything until I find out if the break in sessions is permanent. I have some very large routes with many drivers and I definitely don't want to change anything until I find out. AutoDrive works well for long distances but what about those areas with lots of junctions? This is the area where the AI starts backing up when it needs to navigate through a yard or terminal. One particular route has a few large passenger stations and some large terminals with complex tracks and I'm afraid the change will be for naught. These areas used to work fine in the previous versions.

that's understandable, i would wait too but i just can't have a ghost town in my sessions. like i said i have 10 interlocking towers with many paths to handle the places with lots of junctions. kinda annoying because that's something i never had to do to get Ai to work and it's a bit complex. why hasn't a hot patch been dropped to fix this? i know were waiting for the second phase of TLR to get released, but the Ai are really bugged out in the latest builds. i shouldn't need 10 interlocking towers and a command from the download station to get the Ai running good. its okay to babysit a Ai train train sometimes, especially when its on a new route that you built. but you know when you have all track marks correct, no missing junctions no broken tracks the Ai usually runs for hours flawlessly. that's not the case in the latest builds.

even this user noticed the Ai problems all the way back in the beginning of december of last year. https://forums.auran.com/threads/is-there-a-way-to-revert-trs-2022-to-sp1-in-steam.176117/

"SP3 brought breaking of AI traffic. This time AI may change direction if it cannot proceed due to red signal. So, it just goes backwards ignoring Direction Marker (Yellow) and breaks the entire session. "

that's why i'm truly shocked no patch has been dropped to fix this. waiting for the second phase of TLR to get a (maybe) fix feels like torture.
 
Last edited:
I agree, we shouldn't have to go through more hoops to make the AI behave the way the used to prior to the updates. I'm going to go out on a limb here and say that perhaps the developers are not aware of this issue due to it not being reported. During the last few betas, I haven't been available to do any reporting at all due to family, health, and other reasons outside of my control. I'm sure others have faced this as well. This is the issue I have with public-only testing that many companies are doing today. If the issue was reported, then it may have been fixed.

The annoying part about this company is the developers do not use the program at all. The lead developer even said so. This to me is a no-go right off the bat because he should at least test everything together rather than just looking at his snot-sized lines of code. In the olden days, Greg Lane made the developers build their own routes for testing purposes. It didn't have to be anything terrific but at least they tested what they created.

Making everything pretty, and containing new trinkets and pretty things, only goes so far if it doesn't work.

We need to come up with a laundry list, a new post is helpful, for bugs that need submitting and then submit them using the bug reporting system, not the helpdesk, but the actual bug reporting system using Type-form.

 
Back
Top