Errant AI trains

parryjc

Member
AI = Agreeably Insane...............

My track literally pear, or lollipop on a stick shape with a station. My AI is coming in, up the "stick" drives two thirds the way around the "lolly" to the station and stops. It is then SUPPOSED to continue without change of direction and depart down the "stick".
Like as heck will it do this so simple task.
Every time it comes in stops as required and then reverses back the way it entered the loop. No amount of track direction marks, priority codes, signalling, simple track marks, drive to, drive through, drive via, AI insists on driving his way, and it's driving me Insane.............
I placed spurs of track for no other reason than to break up the circle, set turnouts this way and that, AI laughs in my face, gives me a :p and goes about it his own way.
How do I make this errant AI behave?
 
It is always a mistake to assume that the "I" in "AI" stands for "Intelligence".

My first thought is to manually drive a loco around the complete loop to see if it either derails or "bumps" (like passing over a road hump). This would indicate a broken track connection and could explain the reluctance of the AI not to go that way.
 
I can tell you now the AI is not very intelligent, period. It can do basic tasks like driving on a mainline. But the instant you put it in a yard or switching scenario, it is like "wait, what do you want me to do exactly!? Oh! You want me to go the complete WRONG way to get to my destination, okay :p!" I am honestly very annoyed that the AI is so incompetent at almost everything! People say the AI is better in T:ANE, I don't believe this statement at all. If someone could prove that the AI can do reliable switching in T:ANE, in a complex yard, like the Newcastle yard on ECML Kings Cross, by only using the built-in commands, then I will be impressed. If it cannot do that, I hope the AI will be overhauled in TRS2018 (also known as Trainz: Next).
 
I hope the AI will be overhauled in TRS2018 (also known as Trainz: Next).

Be careful what you wish for.

I agree that the AI has always been an "Artificial Idiot" but it was never intended to be a perfect replacement for a human driver. Even in real railroads the "train orders" are never a replacement for the problem solving ability of a human and they have to be interpreted in light of the actual situation on the ground (e.g. the hoppers are not where they were supposed to be, that track has just now been closed because of a safety issue, etc).

I only use the AI for very basic tasks where there is no other traffic that could possibly cause a conflict and it works perfectly for that.
 
That was a bus and was standing still when the truck backed into it. Not the fault of AI.
Cheers,
Mike

My point exactly, the AI did nothing wrong, it was some other outside intervention that corrupted it.. let's say an errant asset, the semi truck driver.

The AI could have backed up to avoid the confrontation. In the next few years the AI will be able to handle this situation. It will get better as time marches on, and so will Trainz.
 
To the OP.
If you are using a reversed loco (e.g. tender forward for a steam loco) to pull your train, then AI will have a preference to reverse direction if there are two roughly similar length paths to the next navigation point - at least in my experience. To overcome this, I place an additional track marker along the path I want the train to take (further around the lolly in your case) and add a Drive via Trackmark command before the Drive To / Navigate To... one. That forces the AI train to take the desired direction.

John
 
I love switching cars in yards, etc. However, it can get tedious and stressful when you are trying to build a large train in a limited period of time. That is why I want the AI to, essentially, work. I mean, I think it is rather odd and stupid that the AI can't flip 1 switch and go to the trackmark I want them to go to. This happens every time I try and send a train to either of the arrival/departure tracks or any siding and it is just a simple yard ladder that it has to go through; it's not rocket science. Why can the AI not route properly to a trackmark that is basically right in front of it and there is nothing obstructing it?
 
Many thanks to all who replied, this is a simple run around ring with one entry/exit to main line. Track has been laid in the preferential direction of travel and yes has been checked out for continuity, manual will do exactly as I want, just needs me to change the one switch.
And I did mention
Every time it comes in stops as required and then reverses back the way it entered the loop. No amount of track direction marks, priority codes, signalling, simple track marks, drive to, drive through, drive via, AI insists on driving his way, and it's driving me Insane.............

I have even tried turning my locomotive around so it runs tender first, but no AI is still having the last laugh...........(Now on another part of the project I have a complicated maneuver for AI which it completes no hassle.)

Just had an idea come to mind ........ Use Library. After AI comes to its allotted stop on the loop, get next commands to continue from library.
So then there would be a complete split in the operation.
With a directional mark and a named signal set at stop placed behind it then Alistair would not, correction should not, be able to go the way he wants but follow the intended direction to the next track mark :)............. or not! :(

Thanks again everyone, I'll let you know how Alistair and friends are performing, after I try the library stunt on them.
 
Hi

Return loops such as this have often caused problems in the past. Have you tried putting a junction in half way round the loop using invisible track? You could then place a trackmark in each section and the invisible junction should help the AI to work out its route better because, as it looks ahead, it will see two different junctions instead of the same junction twice.

Regards

Brian
 
MTH_ELECTRIC TRAİNS

One of your problems ECML Newcastle, could well be missing levers to switches. Found this problem within a number of routes especially in yards like Newcastle.

Any and everything to do with Alistair and friends HAS to be perfect. A computer as you well know does not make mistakes, it just follows precisely instructions applied. Sometimes we just can't see the wood for the trees, like my little run round loop problem. All you and I can ever do is ask the community for their "eyes" to take a fresh look and sometimes that's all it takes..........

Regards, happy (trouble free) trainzing my friend,
John P.
 
Thanks Brian for that thought although I'm ahead of you on that one. My penultimate sentence original post
I placed spurs of track for no other reason than to break up the circle, set turnouts this way and that, AI laughs in my face, gives me a :p and goes about it his own way.
 
I have had a share of this problem for ages. Based on experience, here is what I found: Make it simple. You have a spur, and a train should, by AI commands you made, go to a place in the mainline and reverse into the spur. It gets to the place at the mainline, stops to reverse and then starts forward running to infinity! Why? My solution is to make the train go to the trackmark at the mainline and have the command to drive (reverse) to spur trackmark, but this time, set the mainline trackmark further ahead of what was before. It appears that the distance of the last car to the spur points before reversing have something to do on this problem. If you do a "run around train" and observe how the loco uncouples, moves forward, reverses, runs on the parallel track and gets to the next set of points, you'll notice that the distance to the points is quite large before reversing. Sometimes the loco goes way past to the next set of points before going back. Now do a 'couple at trackmark"; If the car to be coupled is very near a set of points, the loco will not couple and will sit there waiting forever. Set that car far away from the points, and the loco will couple. Proximity to points seems to be an invisible factor, and it has nothing to do with points radius. I bet some of your problems are somewhat related to this.
 
Thanks for your time and lengthy explanation, but I rather think you misunderstood my problem. there is no uncoupling no reversing required no run round.

Simple drive in drive around the loop and back out.
Like a capital letter Q come in at the bottom ..... go around and exit. The only addition to that is a stop require two thirds the way around the loop.

I much appreciate your time, and whilst not of immediate benefit to myself others reading this post may well find your explanations very helpful, especially the point about points. (Sorry I pointedly had to write it that way :hehe: ) Good point.

My kindest regards
happy trainzing friend

John P.
 
Last edited:
I was just using the Newcastle yard as an example. I actually have been testing the AI in the Bakersfield yard on the Mojave Desert.

I also have the switcher pull a consist way down the WEST end's yard lead and it still doesn't go the correct direction to a trackmark on a siding after waiting for 20 seconds. It is not even close to any of the yard ladder's switches and there only one on the lead that goes to an engine depot I made.
 
Anything and everything can be be a problem for Alistair.......... and sometimes nothing at all.

Any way enjoy your holiday:cool:
Regards
John P.
 
I can tell you now the AI is not very intelligent, period. It can do basic tasks like driving on a mainline. But the instant you put it in a yard or switching scenario, it is like "wait, what do you want me to do exactly!? Oh! You want me to go the complete WRONG way to get to my destination, okay :p!" I am honestly very annoyed that the AI is so incompetent at almost everything! People say the AI is better in T:ANE, I don't believe this statement at all. If someone could prove that the AI can do reliable switching in T:ANE, in a complex yard, like the Newcastle yard on ECML Kings Cross, by only using the built-in commands, then I will be impressed. If it cannot do that, I hope the AI will be overhauled in TRS2018 (also known as Trainz: Next).

The AI are truly not intelligent and are only as "smart" as the logic you apply to them. Do they get confused sometimes? Yes, but that's due to other factors and not actually the AI carrying out their commands.

It's sad to say this and be so unkind to say that Harry, Ami, Alan, and the rest of the AI drivers we've grown to love (and hate) are nothing more than bots created to move our virtual trains. Without telling them what to do, via the commands we place in their schedules, they will sit there awaiting instructions. Like any other programmed device or script, the commands need to be logical. When you are giving the AI commands, they are being programmed. They can't read our minds and sometimes what we are thinking our intention is for them doesn't match what we tell them to do.

When programming devices, or in the case of AI drivers, we need to keep things as simple as possible. Yes, that famous KISS saying applies here 100% of the time. This also means that your track must be simple as well. You can have a gazillion tracks laid out in the prototypical fashion, however, you need to ensure that the AI can still navigate the track. To make a complex layout simple, you use waypoints or in our case track marks.

Knowing where to place track marks comes with experience. You'll find that sometimes even having too many track marks will make matters worse. So where to place track marks?

Placing them at the ends of sidings near the bumper. Use that to guide a driver to the end of a siding. If this is a balloon type setup, such as a passing siding or runaround track, placing track marks at either end usually works.

If there's a bypass track, let's say to go around a yard, there needs to be track marks at the beginning, middle, and end.

To have the AI negotiate a busy stretch of track, with lots of switches, place a track marks at various points along the path of travel. This can guide the AI through the interlocking and across the junctions rather easily.

Direction Marks. Direction marks work in conjunction with track marks, not in the numbers that the track marks are used.

Direction marks work to guide the AI on to specific tracks and in one direction. They are great for setting up passing sidings on a single-track line with meeting points. They also work as do not enter signs and can be used to prevent AI drivers from entering into sidings. If you plan to do switching, and let the AI drive the mainline, this works very well since it keeps the AI from wandering off to nowhere to get around an obstacle.

For loop settings, such as what the OP uses, a combination of track marks plus direction marks work. The direction mark forces the AI to go a specific way down the line while the track mark keeps the AI going forward by periodically placing the track marks along the route. This is used heavily on my large Ozark Valley and Western to control the hidden loops. The AI enters the loop as directed by the direction marks, then hit the track marks spaced on the points of the compass. T-1, T-2, T-3, etc., with enough to prevent the driver from backing up.

The reason for this setup is the AI will seek the shortest between two points even if that distance is longer via track miles, the distance is actually closer as straight as the crow flies. To prevent the AI from going backwards to reach that mark, the direction mark prevents the AI from exiting the loop and the closer placed on-loop track marks keep the AI directed farther away from the marks at the origin of the loop.

So there's still a whole lot more to this and this only scratches the surface such as signaling, Navigate To/Via versus Drive To/Via industry or track mark and so on.
 
The AI enters the loop as directed by the direction marks, then hit the track marks spaced on the points of the compass. T-1, T-2, T-3, etc., with enough to prevent the driver from backing up.

The reason for this setup is the AI will seek the shortest between two points even if that distance is longer via track miles, the distance is actually closer as straight as the crow flies. To prevent the AI from going backwards to reach that mark, the direction mark prevents the AI from exiting the loop and the closer placed on-loop track marks keep the AI directed farther away from the marks at the origin of the loop.

So there's still a whole lot more to this and this only scratches the surface such as signaling, Navigate To/Via versus Drive To/Via industry or track mark and so on.

JC I knew AI like the shortest route but it never occurred to me it was "as the crow flies". Might be you have found my solution, I will give it a try. Thanks very useful info.
Regards
John P.
 
Back
Top