Is AI stupid on purpose?

Here is a question. I have been experimenting on the West Side Sampler, and I set up the following:

There are no signals or track marks.

Train 1 leaves from Portal High Camps
Train 2 leaves from Portal Town Side

The of length that they can fit into the couple of sidings that are on the line.

Eventually Train 1 get to the Switch back siding and waits because train 2 has already passed the next siding. After many minutes Train 2 gets close to the only turnout between the 2 sidings and the for some reason Train one decides that it now has access to the line and decides to proceed. Train 2 stops before the junction and waits. Eventually they meet and we have a deadlock situation.

Suggestions?

Thanks,
Geoffrey

Hi Geoff,

I would actually use some kind of track marks or triggers to get this to work. Even though I've never used this, I've read that maybe a trigger with a wait for train type function added would do the trick with a situation like this along with a track mark to wait at the track mark until the other train passes or comes along.

The AI are annoying when they do this. Unlike the real train drivers, they feel that they wait long enough and then proceed on their own instead of waiting for permission to do so.

John
 
I have AI almost 99% mastered, I know why a signal blinks, why a switch throws under under the middle of a train, why a missing or misplaced signal will do these 2 things ... It is really logic (logical) ... I like it ... I like it alot !

Of course, real trains do not operate by AI ... Why should you want automatic remote control in Trainz ?

I still like driving in CAB mode, and DCC is even easier.

I have been practicing running AI, not because it is easy, but because it is hard, and it is a challenge to program, just by using trackmarkes and signals.
 
Getting back to the original question:

Is AI stupid on purpose?

Yes. Because it's expected to follow a "script" (which I mean like a screenplay, not Trainzscript) and therefore does not waist CPU cycles on extensive decision trees in order to act in a more "intellegent" manner.

A better term would probably be NPC Driver then AI Driver. (Non-Player Character)

There is a logic involved, it's just not entirely obvious what it is. We might be better off if it didn't posses it's rudimentary problem solving algorithms and expected us to throw every turnout for it.
 
I have been practicing running AI, not because it is easy, but because it is hard, and it is a challenge to program, just by using trackmarks and signals.
-I agree with you here. I to have done lots of testing with AI. I believe if I was able to write code, make scripts, it would be more funner than harder and save many hours of testing.

-As I may have mentioned before, I wish the AI would work like our automobile navigation systems... Be able to choose between... 'shortest distance' or more importantly, 'fastest route possible'. With 'fastest route possible', speed limit signs would have an even bigger, more important role, just like and with signals.

-If Auran is reading any of this thread, I would really like one of the top guns to chime in and give their two cents on this idea ^^^, and if it would even be possible. I personally think so. It really sounds like something a good scripter could whip up right now for TS12.

-Joe
 
I vote for stupid. Last week I told my driver to go to a trackmark. I have done this before on my edited Mojave sub. They used to obey the lights and stop if a marker was red. So, I have had multiple trains go from Mojove to Bakerfield from there I will assign them to the industries or the sidings that are open. Last week I clicked on one train in chase view in time to see it run the red light at 60 MPH and before I could take it over and stop it, it rear ended a parked unit train with the unit train I had in emergency stop at 40 MPH. Nice derail cluster there. Now on the same map without to my knowledge changing anything all my drivers come up to lights or junctions and stop and have the little "!" over there face. I take over the train move it past the light or junction then the driver takes it over. So many miles down again "!". I had 7 drivers at one point like this. The one that really frustated me was the lone driver in Bakersfield. He didn't have any other traffic to contend with yet he could never make a single mile without stopping and having the "!" over his face. I replaced him with another driver, with no improvement. The fired driver remained available with a "!" over his face. I tried other routes and all the routes have this problem now. I have never been able to get the cars to show up on the map. I am going to erase the game reinstall put in my backup files and see if either issue gets better. For now I am going to claim a missing file on download. Anyone else have all your drivers seem like they are well into there second keg of beer and totally forget how to get past lights (green, yellow, or red take your choice) and junctions that are aligned for the direction they need. Mandatory drug tests for all the drivers. Then train driving 101.
 
If a train rear ends a train in front of it, the track needs more distant signals to tell the train to slow down, and if it is on a downhill grade, slower speedboards need to be added really far up the track from the derailment site. Sometimes a train will not stop in time and coasts downhill, resulting in running signals and passing trackmarks, rear ending trains.
 
I vote for stupid. Last week I told my driver to go to a trackmark. I have done this before on my edited Mojave sub. They used to obey the lights and stop if a marker was red. So, I have had multiple trains go from Mojove to Bakerfield from there I will assign them to the industries or the sidings that are open. Last week I clicked on one train in chase view in time to see it run the red light at 60 MPH and before I could take it over and stop it, it rear ended a parked unit train with the unit train I had in emergency stop at 40 MPH. Nice derail cluster there. Now on the same map without to my knowledge changing anything all my drivers come up to lights or junctions and stop and have the little "!" over there face. I take over the train move it past the light or junction then the driver takes it over. So many miles down again "!". I had 7 drivers at one point like this. The one that really frustated me was the lone driver in Bakersfield. He didn't have any other traffic to contend with yet he could never make a single mile without stopping and having the "!" over his face. I replaced him with another driver, with no improvement. The fired driver remained available with a "!" over his face. I tried other routes and all the routes have this problem now. I have never been able to get the cars to show up on the map. I am going to erase the game reinstall put in my backup files and see if either issue gets better. For now I am going to claim a missing file on download. Anyone else have all your drivers seem like they are well into there second keg of beer and totally forget how to get past lights (green, yellow, or red take your choice) and junctions that are aligned for the direction they need. Mandatory drug tests for all the drivers. Then train driving 101.

Give the driver a drug test!:hehe:
 
I did a test today, not too scientific, I ran 2 trains from opposite directions on Dave Snow's 100 mile Cotton Belt Route, both trains had in excess of 60-70 cars with three locos. Modifications were made with the speed and signaling by using JR's Searchlights, generally spaced at 2 miles apart, except in terminal areas. I also used track marks every mile and issued "drive via" commands to those TM's that are on passing sidings, insuring the AI will travel on the RH side in the sidings. Besides Dave's attention to detail, the passing sidings are generous in length, 2 miles average. Bottom line, the westbound train pulled into a siding and waited for the eastbound to clear the line ahead. From start to finish AI had full control without any tweaking by me. I am impressed.

John
 
I did a test today, not too scientific, I ran 2 trains from opposite directions on Dave Snow's 100 mile Cotton Belt Route, both trains had in excess of 60-70 cars with three locos. Modifications were made with the speed and signaling by using JR's Searchlights, generally spaced at 2 miles apart, except in terminal areas. I also used track marks every mile and issued "drive via" commands to those TM's that are on passing sidings, insuring the AI will travel on the RH side in the sidings. Besides Dave's attention to detail, the passing sidings are generous in length, 2 miles average. Bottom line, the westbound train pulled into a siding and waited for the eastbound to clear the line ahead. From start to finish AI had full control without any tweaking by me. I am impressed.

John

John,

I have found that on complicated switching routes with lots of sidings, signals, and track marks, is where the AI get confused and start skipping commands, backing up, and doing other weird things.

On my longer route, I have had a similar results as you saw on Dave Snow's awesome route. The AI will drive and take the sidings as instructed. I use direction markers instead of the track marks as that is easier than inserting drive-to/drive-via track mark commands for every siding. The only time I'll have problems on this route is if I've messed up.

John
 
John,

I have found that on complicated switching routes with lots of sidings, signals, and track marks, is where the AI get confused and start skipping commands, backing up, and doing other weird things.

On my longer route, I have had a similar results as you saw on Dave Snow's awesome route. The AI will drive and take the sidings as instructed. I use direction markers instead of the track marks as that is easier than inserting drive-to/drive-via track mark commands for every siding. The only time I'll have problems on this route is if I've messed up.

John

What I don't understand is why an AI will drive up to a junction where a track marks is located, and then do a reverse when the command directs the AIr to drive to the industry. Do I need markers in front of the industry? I removed all of the directional markers and replaced them with track marks, usually they were mile markers. The reason for their removal is I wanted to be able to use those long sidings as passing sidings for trains going in the same direction. I installed passenger stations at each end of the route, and removed all of the industry from the middle of the route, all industry tracks are now the ends. With the directional markers, my options were limited. Dave did a hell of a job!

John
 
What I don't understand is why an AI will drive up to a junction where a track marks is located, and then do a reverse when the command directs the AIr to drive to the industry. Do I need markers in front of the industry? I removed all of the directional markers and replaced them with track marks, usually they were mile markers. The reason for their removal is I wanted to be able to use those long sidings as passing sidings for trains going in the same direction. I installed passenger stations at each end of the route, and removed all of the industry from the middle of the route, all industry tracks are now the ends. With the directional markers, my options were limited. Dave did a hell of a job!

John

I have a feeling I know why they do this. From a technical standpoint, the simulation gets bogged down with all the activity. The AI will start off okay and as time goes on the other scripts and stuff are working hard in the program. This causes little hiccups in the AI operation as they have their list of commands and are playing through them like they're supposed to. They end up missing a junction, queue, or whatever they're supposed to be doing, and end up missing their next track mark. When this happens, they will then try to go back and pick up the track mark that was missed. This is sort of like when you type on a really, really slow computer. As you type along, you get ahead of the computer and end up missing characters in words.

I like your idea though of using the track marks instead of the direction markers. This is a bit freer than my approach and it gives me some ideas where I can use that.

He sure did an awesome job. I've driven the route quite a few times when I've become burned out from working on my own stuff.

John
 
If you have TS12 in Developer Settings (I think) you can monitor 'Worst Performing Script'. On a complex route 'signal.gs' (I think that's it, been a while) gets heavier and heavier as the session goes on and can end up chewing up its fair share of rescources. I've watched that and moitored AI performance against script weight and the AI definitely drops off with time. Not bagging the script, it's doing a lot and doing it well, but background issues definitely impact on AI performance

That's not the same thing as the AI being 'stupid' though....
 
Last edited:
...On a complex route 'signal.gs' (I think that's it, been a while) gets heavier and heavier as the session goes on and can end up chewing up its fair share of rescources. I've watched that and moitored AI performance against script weight and the AI definitely drops off with time. Not bagging the script, it's doing a lot and doing it well, but background issues definitely impact on AI performance....

I agree with Dermmy.

Only cure for this ( if you run the long session with more then 5-6 hours at least) is
-running the short schedules by using schedule library for next package of commands
-limitation of max 15 trains at once on the route
-when AIs finish the task they must leave the route through the nearest portals ( don't leave them in the yard if the next task start after a couple of houres)
-it seems that is useful to save session every cca 2 hours too
 
Last edited:
Here is a question. I have been experimenting on the West Side Sampler, and I set up the following:

There are no signals or track marks.

Train 1 leaves from Portal High Camps
Train 2 leaves from Portal Town Side

The of length that they can fit into the couple of sidings that are on the line.

Eventually Train 1 get to the Switch back siding and waits because train 2 has already passed the next siding. After many minutes Train 2 gets close to the only turnout between the 2 sidings and the for some reason Train one decides that it now has access to the line and decides to proceed. Train 2 stops before the junction and waits. Eventually they meet and we have a deadlock situation.

Suggestions?

Thanks,
Geoffrey

Take a look at norfolksouthern37's searchlight signals. The absolute signals should be used at the ends of passing sidings. The permissive signals should be used between passing sidings. I put them every mile or so, one in each direction. The absolute signals look way down the track to the next absolute signal and if the track is not available, you do not get a green. This means even if there is a train on the next passing siding headed your way with the switch thrown for the main, but the train is still on the siding, you will not get a green. Throw the switch against the train at the far siding and you will get a green. If you want to play with this to get a better understanding, make a test route that is a long horseshoe loop. The ends should each have a passing siding. Put the absolute signals on the siding and the main next to the sidings. Put eight permissive signals along the horseshoe loop facing in both directions. Now, put a train on each siding with the switches thrown for the main. Both siding signals (the absolute ones) will show read, even though there are eight permissive signals along the route. When you throw one of the siding switches to the main, the absolute signal for the train on the other siding will go green. My Iowa Central route is 120+ miles long with ten passing sidings signaled as described. I have never had the AI train problem you describe.

David
 
Last edited:
I am a relative new comer to Trainz with a lot to learn but I have realised that A1 does what it is told to do.
However if you do not provide sufficient instructions to proceed from point A to point B then it will eventually finds its own way, usually finding the shortest route.
 
Thank you Dap, for describing norfolksouthern37's : "Absolute", and "Permissive" signals and how they work.

I always thought a signal, was a signal, but the more I learn ... the dumber, I know I am !

I have iPortals, and wondered why a 5280' train would not "Brake When Exiting Portal", I found that because I had 5 track spline points past the iPortal, the train was no longer known to the iPortal, becase it was so distant the iPortal.

Trainz only see's just so far ahead, then it forgets, or ignores a consist.
 
Last edited:
Take a look at norfolksouthern37's searchlight signals. The absolute signals should be used at the ends of passing sidings. The permissive signals should be used between passing sidings. I put them every mile or so, one in each direction. The absolute signals look way down the track to the next absolute signal and if the track is not available, you do not get a green. This means even if there is a train on the next passing siding headed your way with the switch thrown for the main, but the train is still on the siding, you will not get a green. Throw the switch against the train at the far siding and you will get a green. If you want to play with this to get a better understanding, make a test route that is a long horseshoe loop. The ends should each have a passing siding. Put the absolute signals on the siding and the main next to the sidings. Put eight permissive signals along the horseshoe loop facing in both directions. Now, put a train on each siding with the switches thrown for the main. Both siding signals (the absolute ones) will show read, even though there are eight permissive signals along the route. When you throw one of the siding switches to the main, the absolute signal for the train on the other siding will go green. My Iowa Central route is 120+ miles long with ten passing sidings signaled as described. I have never had the AI train problem you describe.

David

Yes they definately helped. It does however look a bit funny having large search light signals on Clear Lake 2. I need some invisible ones.

Do they work just because they are absolute and permissive, or is it because of the JR signal script that they use?

The AI still did some stupid things that I don't think any amount of signalling is going to fix.

Thanks,
Geoffrey
 
I use norfolksouthern37 "Invisible Signal" in almost every place that a regular signal would look highly out of place, or where a signal would never be placed, on the prototype.
 
I use norfolksouthern37 "Invisible Signal" in almost every place that a regular signal would look highly out of place, or where a signal would never be placed, on the prototype.

That is a absolute signal, I do have it. There needs to be a permissive version as well.
 
By placing the tag in the config file: "surveyor only" in any trackside asset you can make any asset invisible, in Driver ... and vice versa, you can make any invisible asset, visible, by removing the config file line: "surveyor only".

So you could make any invisible signal, visible ... and versa visa

You could make a loadable commodity "bale of hay", into a static asset ... or make it an invisible loco ... by changing the config file.

You could even make an invisible loco (which would be kinda' dumb) !
 
Last edited:
Back
Top