Is AI stupid on purpose?

I hope that we all know that AIs are not stupid, they obey the users settings.

AIs need conditions for running:

-signals
-junctions
-trackmarks
-directional markers
-schedule
-which rules and commands are used
-number of all AIs on the route in the same time
-number of AIs in nearby,close section
-how long is AI already on the track
-is AI running the schedule the first time or it repeat him (second round)
-how long the session last
-how big the route is

Maybe i forgot something, but all this conditions have influence on AIs behaviour.

And don't forget, defrag disk every time before open TS and made EDR often.
 
Last edited:
I am worried ... I am starting to understand how AI works, and how to make AI work flawlessly.

I use to hate AI ... Now I love it ... but speedboard, signal, and trackmarker placement is tedious, and time consuming.
 
. Now I love it ... but speedboard, signal, and trackmarker placement is tedious, and time consuming.

A little boring is making the schedule for each AI. But very very time consuming is testing the movement of each AI and synchronization of all AIs in the session. Problem always arise when AI start the second time
 
Last edited:
I am worried ... I am starting to understand how AI works, and how to make AI work flawlessly.

I use to hate AI ... Now I love it ... but speedboard, signal, and trackmarker placement is tedious, and time consuming.

Well, when you find out how to make AI work flawlessly, please let us know!
:D

Mick Berg.
 
I am worried ... I am starting to understand how AI works, and how to make AI work flawlessly.

I use to hate AI ... Now I love it ....

Hallelujah! A convert! :)

Well, when you find out how to make AI work flawlessly, please let us know!

All jokes aside, the AI does generally - invariably in fact - behave as expected. "Flawlessly"? Pretty much. The trck - if it is s 'trick' - is to work out what the AI expects the instruction to be to get the desired result....
 
I have learned so much in just the past few days about AI.
I found that some signals, were so high poly that framerates decreased by 10 FPS, or much more.
I have used invisible speedboards, and a "PRR Dwarf Signal" and "PRR Dwarf Signal L" by GFisher that does not effect framerates.
I was using the iPortal, and the TPR ePortal, as I want to portal trainz via the internet.
I think I have it figured out, as trains would emerge, but they would not become a controlable/drivable train, as they were locked, and were driven by STW (SwedishTrainzWorks) autodrive, and I could not jump onboard.

Maybe I'm wrong, but I would not think that any of the issues you mention are to do with the AI.
Mick Berg.
 
Hallelujah! A convert! :)



All jokes aside, the AI does generally - invariably in fact - behave as expected. "Flawlessly"? Pretty much. The trck - if it is s 'trick' - is to work out what the AI expects the instruction to be to get the desired result....

This is would be like reverse engineering code for programming to come up with the flowchart instead of the other way around.

Over the years, I have learned to expect the AI to do certain things and plan accordingly. What gets me is the inconsistency of their actions. Sometimes they'll work perfectly find 9/10 times, but on the 10th they'll get weird. Why do the take branches which aren't even close to where they're supposed to go? It's as though they ignore the junction lever and plough on their way through instead of flipping the levers like they love to do to everyone else.

John
 
..--What gets me is the inconsistency of their actions. Sometimes they'll work perfectly find 9/10 times, but on the 10th they'll get weird........
John

I agree, it's the biggest problem this moment. I tried to minimize this by avoid using a long schedules and take them to pieces with 'Wait for 10 sec' command between. Quick Portal Manager help very much too, it stabilize the behaviour of AIs. Very important is clean disk too, defrag before starting TS help alot. Saving the session every 2-4 hours is important too.
 
I agree, it's the biggest problem this moment. I tried to minimize this by avoid using a long schedules and take them to pieces with 'Wait for 10 sec' command between. Quick Portal Manager help very much too, it stabilize the behaviour of AIs. Very important is clean disk too, defrag before starting TS help alot. Saving the session every 2-4 hours is important too.

I always defrag before I start. That does help a lot. I use the Schedule Library which really helps chop up the schedules. The AI on my route only have 4 stations to go to, so I don't understand why they get goofy, but then again it's that inconsistency which is nutty.

I'll try more of the wait commands. Maybe that will help the simulator "settle" down some and help get its bearings under it so the AI will act better. I have found that to be helpful with other routes I've operated.

Thank you for the suggestion. :)

John
 
..The AI on my route only have 4 stations to go to, so I don't understand why they get goofy..
John

Schedule for 4 stations is very short with 9 command, 'Navigate to'+'load'+at the end 'Navigate to', i presume, Portal. I presume too that you have two portals one for emit trains and second for leave the route and that you run trains endless. The question is how you emit train, with Produce in Portal or with rules CPC, UNportal or QPM. Only accurate solution is using QPM. The second question is if you have enough trackmarks and signals. In general AIs need more signals as we use for manual running.
 
I ran into a curious thing ... when you have a trackmarker, and place it exactly on center of a switch spline point circle, it is not necesarily right there in the center ... instead find the center of the spline point circle, and move out 1 or 2 RR ties from the exact center, and then place the trackmarker.

Also, with switch levers, placing them directly on center is usually great ... but in some cases a switch lever can also have a slight side to side play, and can be on the wrong leg of the turnout. Adjusting it to one side or the other can make a world of difference to AI, as it can not see the switch, nor the trackmarker, as it is on an adjacent switch track leg.

Invisible signals are fantastic ... and after to get a route working with regular GFisher-PRR Dwarf Signals, you can replace them with invisible signals on the end product route (as zillions of signals are pretty much not on the prototype, nor are any signals on backwoods branch lines).

I am having way too much fun with AI!
 
Last edited:
.....Also, with switch levers, placing them directly on center is usually great ...

Levers should be placed outside the junction vertex on the approach side. Approaching a junction the AI expects to see: Signal (if there is one) > Lever > Diverging Vertex.
 
Schedule for 4 stations is very short with 9 command, 'Navigate to'+'load'+at the end 'Navigate to', i presume, Portal. I presume too that you have two portals one for emit trains and second for leave the route and that you run trains endless. The question is how you emit train, with Produce in Portal or with rules CPC, UNportal or QPM. Only accurate solution is using QPM. The second question is if you have enough trackmarks and signals. In general AIs need more signals as we use for manual running.

I have two portals setup on either end of the route. They are strictly for "through" traffic that does not interfere with any AI tram drivers. There are more than enough signals to a point where it's one continuous string of lights like Christmas decorations, and this makes human driving very confusing. There are many direction and track marks, with the direction markers to keep the AI from going across crossovers, but they do anyway except when told to do then they can't Figure that one out! :D

It's nutty. I may just delete their schedules and start them over. Sometimes that helps with situations like this rather than trying to edit and poke at the route to fix stuff.

John
 
You can use Invisible signals, and Invisible speedboards, to cut down on the visible trackside clutter.

I followed Dermmy's advice, and slid all my turnout switch levers down, out of the switch leads. As a switch resembles the Letter "Y", I moved all my levers to just outside the bottom of the "Y". If they turn Red, I slide them upwards one notch toward the bottom of the "Y", almost touching the bottom of the "Y" spline point circle .

I was having trainz failing to see my trackmarkers ... now that all my levers are outside of the "Y", all my trackmarks are seen by AI ... Thanks Dermmy ! ! ! ! ! <--- 5 Exclamation Points

All this time I was laying my turnouts all wrong ... as the Trainz default "auto place switch lever" places levers directly in the center of the switch spline point circle.

The more I learn, the dummer I feel !
 
Last edited:
......then they can't Figure that one out! :D........

John

JCitron
I apologize, i'm late

Third question, did you observe the bahaviour of each AI from start to the finish. Only testing will give you the answer where and why AI stuck. Then try to put there the additional invisible signal or maybe you must only change the junction direction(J). This changes must be saved in the route surveyor(edit route) in route layer. Then repeat the test again, and so on with other AIs.
 
Last edited:
I was having trainz failing to see my trackmarkers ...
AI will not see any track beyond an improper (both sides red or missing the lever altogether) junction, period, so the first one the encountered in route calculation caused them to stop calculating. Non-AI trains are pretty much guaranteed to derail at these same points. (As an aside, a double red junction lever just indicates that the lever doesn't know what junction it should control so in reality it is seen as a "missing" lever anyway)

All this time I was laying my turnouts all wrong ... as the Trainz default "auto place switch lever" places levers directly in the center of the switch spline point circle.
I don't understand why you were told center of spline circle is wrong, I've never had a problem with them placed there, and in fact is where I've always moved them back to when adjusting spline placement screws with them. The worst time I've had with "automatic" placement was in fact my experience with TransDEM which seemed to want to place them too far up one of the legs of the junction, I replaced all the levers anyway in that route but there were a lot of red junctions from that.

You can place the levers anywhere within the range of the junction where you have a green arrow, but best bet is center of spline circle in my experience. You should always double check an associated junction if you move any of the associated splines points on the legs of the junction anyway.
 
Last edited:
JCitron
I apologize, i'm late

Third question, did you observe the bahaviour of each AI from start to the finish. Only testing will give you the answer where and why AI stuck. Then try to put there the additional invisible signal or maybe you must only change the junction direction(J). This changes must be saved in the route surveyor(edit route) in route layer. Then repeat the test again, and so on with other AIs.

No problems. You do live outside of the Trainz Surveyor forums. :)

I will try as you suggest with the hidden signals. Maybe I still don't have enough. I know that any changes made to the infrastructure (tracks, etc.) has to be done in the Route-building side of things and never the session.

I will continue to "ride" with my drivers and watch them from the side to see what they do. There could be many things going on here including the invisible stations which are getting things confused in addition to the signals, and the AI themselves.

John
 
I was trying to make a session, and the AI used a crossover for no reason (going against track direction markers), then went into a siding, and started moaning at me because it had gotten lost.

Also, the AI started getting even more stupid after about an hour, constantly derailing on junctions that it did not change.

Is there a way to un-derp AI in Trainz?
-I didn't read through this whole thread yet, but eventually will. I think I have found some secrets, if you can even call them secrets, to controlling AI.
-I wanted AI to run from portal to portal on my Cajon Sub route and it was a mess without setting it up. a couple things I noticed was, setting down trackmarks after cross-overs. Placing directional markers where I didn't want AI to go, and the maybe secret part, priority markers. About this, default, all trains are priority 2. placing priority markers and setting all of them to priority three, on cross-overs, sidings, industries, etc. wont solve the problem but it definitely helps. (i'll get a screenie up to better paint the picture) I noticed AI trains crossing over much less. There is an AI penalty when being a P1 or P2 and driving on a P3 track. If the penalty is great enough the AI wont take that route. Almost a better solution than directional markers, since those would give you red signal indications.

-Joe
 
(i'll get a screenie up to better paint the picture)

-Joe
-Here is a simple setup, about what I was talking about.
569e92c99ac852c3d9001e0e0a0a62a7.jpg

-So I have the red trackmarks, south one and two and north one and two. This will help guide an AI train through a cross-over, by telling the AI train to, navigate to, which will stop the train, or navigate via, which the train will drive through if you have more than one. (The blue arrows are actually invisible signals by the way, don't worry bout those)
-The purple arrows are the priority markers and they are all set to P3. Having the P3 markers at these locations, will help detour the AI train from crossing over or taking the siding if there was a right hand turn on the right side of the screenshot. Its possible you wouldn't even have to tell the AI train to go to north 1 or north 2, but that's where trial, and error and testing come in. Test test test.
-On the mini map you can see the dark blue lines representing the P2 tracks. Then you have the highlighted, light blue-ish color representing the P3 tracks. P1 will have its own color too.
-In the end all the tools are there, even though they are confusing, but you just have to be smarter than the AI. Remember, the AI will always take the shortest route possible. To bad this couldn't be changed, like our car navigation systems. Like on my garmin nuvi, I can set it to shortest distance, or fastest route possible. Trainz AI is taking the shortest distance, be nice to flip a switch and tell the AI to take the fastest route. In this case, you would need to add speed limit signs as well to benifit from this, but still much better, as majority of every type of transportation has speed limits anyways.
-Hope this helps in your AI derp problems.
-Also... in some cases, you will need more than once priority marker. What I mean by that is, priority markers are only good for, junction to junction. As you can see on the mini map, how the highlighted color stops in the cross-over. Hope that makes sense.

-Joe
 
Last edited:
Back
Top