TRS 19 AI Even Dummer?

Alikiwi

Apprentice Creator
Rather a hot topic I'm sure, some claim to have no problems and in Tane it was passable for me. BUT, TRS19!? Totally (well almost) useless, it fails 75% of the time to do a simple run around of it's own consist. It either backs out onto the mainline and keeps backing away for miles and miles, or, backs out onto main line and then drives forward passed consist, but fails to use the next junction to couple back to the front of the consist and drives for miles and miles never stopping unless I take over. Third option it has acquired, is to back out onto the main line, then come back in and take the 3rd or 4th (etc) yard which are all dead ends and comes to a stop.

However, that isn't the worst by far.

Try this, and I'd love to know if anyone else has seen this. The AI is given instructions which mostly are drive via trackmark XYZ (etc) and dutifully does so, until it (may) realise it hasn't cleared some from it's list of orders, so it stops and proceeds to drive backwards through 2 or more trackmarks until it gets to the first one it failed to clear. In an extreme example today, admittedly an aircraft but it is still a 'train,' it cleared the first 4 trackmarks off the list, but then went through ten more coming to a halt as ordered, with those 10 plus the halt train order still in the list. Go figure that one!!! :eek:
 
Agreed. From my experience, the TRS19 AI's do some really weird things. Like it approaches a signal or station at full speed then jerks to a stop at the last minute, often overshooting the target. If you ever try to stop an AI, control it manually, then attempt to resume it again, it does nothing. It just sits there and has to be re-ordered manually. The AI also occasionally passes up some signals for some reason, which I find very frustrating.

With much discipline, however, (Speed limits and signals) I'm able to get the AI to at least carry out basic instructions properly.
 
I noticed this strange behaviour in TRS 19 too, yesterday especially with a downloaded session for a TRS 12 map (build 3.6). With downloaded sessions for TANE and TRS19, I have less problems.

Regards
Swordfish
 
I don't seem to have those issues on my routes I've built in TANE and imported. Importing routes and sessions older than that, however, causes weird things to happen. I recommend recreating the session again in TRS2019 and see if that works. You can keep the drivers in place just rebuild the commands. I recommend using the Schedule Library to setup the commands because it'll save you a lot of time.
 
Er, did I not mention, I am creating the session (new) in TRS 19 ops, my oversight. There is more weirdness as well. I've run it 10+ times and one train worked perfectly, then suddenly decided to go past the siding it was to load at. I then sorted it out manually but found I could not "continue schedule" as that option vanished as did "Drive" for that engine. Then I had the same problem with another, and then sometimes the problem disappears. DBR and EDBR done many times. Flaky is the "norm" I guess. Just have to chug chug along...
 
AI is a means to an end and not a silver bullet to run our creations unfortunately little of the guidance explains that or that you need to work with AI to have it function as you would wish.

Whether a locomotive ran directly round a group of carriages/trucks or via miles of track is neither here or there to AI it did it, hopefully obeying all the signals and track direction markers etc. that you placed. But that simple operation is in fact a dozen or so discrete instructions including uncoupling/coupling, driving, stopping/starting, setting and re-setting points and so forth, and then slightly different again each time the command is used because of the different track layout, the way point have been left, other passing traffic and so forth.

As John has written most of the time AI function well but when it doesn't we need to first understand what is being requested, why it could be going wrong, then what we can do to help it along. With run-around-train AI does not like complicated junctions of complex signals but by just changing the rest direction of points or repositioning of a signal and/or the inclusion/removal of a direction marker can all help. As for the likes of passing track markers again ask what could be confusing AI, are your instructions correct, I have 40 plus trains at any one time running under AI and too often its my instructions not AI at fault when it goes wrong. However as already suggested try tweaking your layout, and double checking your instructions. Frustrating, always, feel like going back to clockwork, frequently, but most satisfying when you getting it right. Peter
 
It is heresy, but I now run routes with almost NO signals. Once the track/junctions are OK, I have few problems. Few, maybe none in most sessions. Constructing a route and signals seem to be two separate chunks of code created by different people. They seem to have only interacted when their project needed to do something with the other. Thus you will have conditions which were not tested and you suffer from that. Industry seems to be another area done by different people who only talked when they need a function.

When I was coding APIs VERY early in computer land I had to force the applications people to adhere to my logic since I could not change the electronics on a disk(c) drive. The same management seems to have been missing along the Trainz way.There was no "master code" that others coded to. Thus you get "personal" requests with no management oversight.
 
Last edited:
I have had problems with AI failing to recognize trackmarks or stations that are in the instructions, thus passing right over them. Have you copied and pasted sections of the route containing ignored trackmarks/stations from one area to another? This has caused many problems for me. I have found that deleting the "copied from" area sometimes is all you need to do. If not, try deleting troublesome trackmarks/stations, save, replace trackmark/stations with new name, save, change the instructions for that driver accordingly, save, exit game, load game. That sort of thing.
 
I have had problems with AI failing to recognize trackmarks or stations that are in the instructions, thus passing right over them. Have you copied and pasted sections of the route containing ignored trackmarks/stations from one area to another? This has caused many problems for me. I have found that deleting the "copied from" area sometimes is all you need to do. If not, try deleting troublesome trackmarks/stations, save, replace trackmark/stations with new name, save, change the instructions for that driver accordingly, save, exit game, load game. That sort of thing.

This has always been the case even back before TS12. If a station or track mark is moved from its position after the schedule has been created, the asset is ignored. From what I gather, this has something to do with location references done within the route and objects file and tracked in the name-table. In a way this makes sense, at least to me. In order for the program, meaning the AI to know where an asset is, the information has to be stored somewhere and not searched for on the fly. When an asset such as a track mark, station, or other industry is moved, the AI still refers to the old location in the schedule and then goes looking for it.

I put the two and two together after I adjusted some track and moved a track mark. Even though I moved the track mark back to its previous location, the AI were still confused. By editing their schedules and putting that track mark back in, the AI was then able to complete the schedules as required.
 
This could be funny if it wasn't seriously annoying. But Wilts 747 said "As for the likes of passing track markers again ask what could be confusing AI, are your instructions correct," ! Seriously how does that make sense? How simple is "drive via", how could that possibly confuse the AI on some occasions and not others? Only if the basic coding has serious flaws (it probably does as hinted at elsewhere).

Re "
Have you copied and pasted sections of the route containing ignored trackmarks/stations from one area to another?". No, never. These issues are in Built-in routes and to a lesser extent my own. Given this issue of passing over trackmarks without deleting them goes back to TS12 or even earlier, we are clearly stuck with it - except - I never had that problem in T:ane.

Re "When an asset such as a track mark, station, or other industry is moved, the AI still refers to the old location in the schedule and then goes looking for it." That I can understand because I've seen it when I've accidentally deleted a multiple industry, trying to delete something else, but those things hog up a large area around themselves which is another unrelated problem. (and there was a trackmark on the industry)

My conclusion is these are mostly old problems which have surfaced or gotten worse with TRS19. The instructions I have given the AI are simple and straightforward, and I keep trackmarks to the minimum, but you can't reduce them too much or the AI fails to move or runs on the wrong track or into sidings whenever they get the chance! It seems the balance is harder to get in TRS19. Give me a thumbs down please lol.

 
Hi All
If you have an example of the AI not functioning as expected in TRS19, when it did work correctly in TANE, then please submit a report to our bug report form at https://n3vgames.typeform.com/to/xRdryu

Please ensure to include an example session that works as expected in TANE, but then fails in TRS19, so that our team can investigate it fully.

Regards
 
Unfortunately your frustration 'Alikiwi' at some point has likely been shared by us all, not that it solves your problem. When I wrote are your instructions correct I didn't mean to imply that they were wrong but had you like I have many time selected the likes of track marker East 01b incorrectly from a list when I actually wanted perhaps East 01a or have managed to name two track markers the same believing I'd already deleted one .

However what may not be clear is that there is little if any intelligence of AI, the term has been misused by as all from day one. There is an algorithm(s), a list of rules and/or instructions as in any program which basically says do this or that as and when instructed following a list of set conditions. For example, when instructed to drive from A via B to C, it locates B and plots a path to it and drives there. At B it does the same, locates C likewise plots a path and drives to it. Use the command 'Drive to' and complying with the conditions for the command the train will slow and stop when it reached the appropriate track marker, industry, station etc. Use the command 'Drive via' and the train will not break and stop but look for the next command to follow and so forth. If there is no command to follow or the destination cannot be found or the path to it plotted the train will eventually roll to a stop govern by the pre-determined physic of the train and terrain.

There has been much debate over the years regarding the definitive definition of the terms 'Drive' and 'Navigate' and I'm still not sure its finally resolved or ever will be. However reality is that once a path has been decided unless instructed otherwise a train will take the most direct route. Unfortunately, and here is the contradiction, I'm not sure anyone knows how Trainz determines the path between any two points. Too frequently as you have found to your frustration a train will appear to be routed miles to travel a few yards, which begs the questions; a) Has it got lost? b) Has it been blocked from completing its path, perhaps by following traffic? c) Has it just missed that specific point and carried on going initially knowing it was somewhere along this path?

I don't know the answer and I'm not sure anyone actually does. I do know however that as Trainz have developed and got more complicated such 'quirks' have got worse. Even if such issues are resolvable it probably wouldn't make financial sense to do so when the time taken would equate to the development of a few new marketable routes, particularly when the issue is unlikely to be reproduced on another machine. That said as suggested do fill in a report it may just be your incident that leads to a solution.

In the mean time and to retain your sanity perhaps try developing another aspect of your route if for no other reason to say you have successfully created something working and haven't lost your touch. In the mean time the break from this issue my well provide the inspiration to resolve it another day. Good luck, Peter
 
Last edited:
What you say Peter makes sense, and I understand. But in one example I'm experiencing there are only two commands give. Navigate to (industry) Brea Produce, and Load. What no-one has commented on (am I really the only one to see this), is the disappearance of the commands "Drive" and "Continue Schedule". There is clearly an issue of some sort as this is linked to being unable to get the AI to follow a schedule. This happens when it fails to follow a schedule manually imputed, and one has to stop the train and drive it one-self.

For Zec, given this is a new session, it doesn't exist in Tane, but as said I haven't seen these issues in Tane although others seem to have done so. The failure to clear trackmarks off the list after passing them seems to be more likely on long routes or any where a large number of trackmarks are required. Note I say REQUIRED because any fewer means the AI drive comes to a halt and can't seen the next trackmark even if there is not a single junction anywhere.

I suspect it falls into the too hard basket and may not be resolved or even looked into, but if it continues to get worse, then it may eventually get to be a case of fix it, or sink?
 
From what was said ages ago from the devs, the AI will use the shortest distance as determined mathematically between two points. It may not appear to be the shortest distance, but by the turn of a junction angle, or the path down the slowest tracks through a yard, will end up being the shortest distance between the two points.

To avoid this situation, I found we can never assume the AI will do what we think they should do. From my nearly two decades of Trainzing, I have found I end up anticipating what the AI might do, and place track marks at the beginning, middle, and end of avoiding lines so that the AI is directed via that path in those locations and does not have a chance of going elsewhere.

The difference between Navigate To vs. Drive To, and also applies to the via commands of the same name:

Drive means the AI will take the direct route and will wait for junctions to be set.

Navigate means the AI will continue to seek out a path to their destination even if it means backing up and going down a different track to take alternative path.

This information is found in the Developer Blog posts from some years ago.

The signaling system has changed and so has some behaviors of the AI. The signals now require the locomotive to be forward facing at all times to change the aspects of the signal. This means we have to change the direction of the green-arrow on the locomotive regardless of which end of the locomotive is driving so that that green-arrow faces the direction of travel. In the past, this wasn't an issue and I don't know what this was changed for the worse in my opinion.

The AI behavior in yards and other complex track locations changed in TANE SP2. There was a push to make the AI better, but unfortunately, this broke things with the code. The end result was the hot-fix that followed to revert the AI back to their less-broken level of SP2. This issue coincided with the introduction of the new file format we now have. According to N3V, this will be fixed at some point, but as we were told in the post the AI logic needs a rewrite and that will take a lot more time than what they have to do it at the moment.
 
Alikiwi, you write that the commands 'Drive' and 'Continue Schedule' have disappeared but can I enquire where from. On the pop-up menus between the drivers command on the bottom right hand side of the screen when a train is running under AI I have all the commands I previously selected from the Driver Command List plus 'Stop' when the train is running and 'Continue Schedule' when I have manually stop it. I've just checked T:ANE SP3 but other than the order of the commands it doesn't really look that different. Have I missed the point? Peter
 
The commands disappear from the problem loco (not all locos) when you right click on the engine. Drive should be the first option, but when that vanishes you see "Abandon Schedule" first. I have a feeling (not tested yet) that if you drive the train manually for a few miles it may resume it's schedule by itself. Doesn't happen often enough (unless I'm in the Cornish route) to test thoroughly.
 
The commands disappear from the problem loco (not all locos) when you right click on the engine. Drive should be the first option, but when that vanishes you see "Abandon Schedule" first. I have a feeling (not tested yet) that if you drive the train manually for a few miles it may resume it's schedule by itself. Doesn't happen often enough (unless I'm in the Cornish route) to test thoroughly.

I've seen that a couple of times in TANE as well as TRS2019, but never put my finger down on what was causing the problem. Without a definitive cause and effect, it's difficult to report the problem.

When it occurs in 'TRS19, does switching to manual mode through the driver controls then back to driver schedule-mode fix that?
 
I've never used the right mouse button on a loco to access this menu previously, but tried it last night on two different machines both running TRS19 and T:ANE but fortunately/unfortunately never got it to fail. Tried it on 20 or so locos on each program/machine, 80 plus in all and managed to stop/restart each which I appreciate must be most frustrating for those who experience it constantly. I would imagine this would be a horror to try to resolve. Peter
 
The problem is, it never is a problem at the start. It only happens (sometimes) when you notice the AI has run passed it stop and you have to manually take over. On attempting to restart the schedule or entering a new schedule, that's when these commands vanish. Horror is correct and due to the complexities of the game (programming) it may be too hard to track down. Might just have to live with it.
 
On a semi related matter (I don't want to start another thread), I have a problem - only in TRS19 - with some driver commands. In the set up if I tick the box for "Wait for Trigger", and then attempt to add it to an AI driver, when I move the mouse arrow down to it, it goes from white to greyed out and can't be selected! Damn! It just did yet another CTD!!! I believe (can't check this instant cause it crashed), "Couple" also has the same problem. I also tried "Wait for" and get the same results. Anyone else have this daunting issue, and/or is there an existing thread you could point me to.
:confused:
 
Back
Top