AI or you

martinvk

since 10 Aug 2002
AI gets lost
AI goes walk about
AI ...

You get the picture. It seems that the AI gets a lot of flak for doing what it is told to do. I was about to add to the litany when I had a second look at my route. :o

An AI controlled train entered a station, unloaded and loaded passengers and then instead of changing direction to return to where it came from, it continued through the station and then after some shunting to get across three tracks, it then started it's return journey. :(

After a closer second look, I found a direction marker left over from when that part of the track was supposed to be one way. With that removed, the AI now didn't want to traverse a set of double slip turnouts that were successfully negotiated on the way in. I added an extra signal and now the route has been running without a hitch for almost four hours with 6 to 10 AI trains interacting. :cool:

I find that within the limits of its program, the AI works pretty well. As the route designer, it is up to me to see to it that the AI has enough information to complete its tasks. That means proper signals and a path that can be followed must be provided. :)

The AI will do exactly what it is told to do. Now if what you said is not what you meant, that's not AI's problem. :wave:

One thing that would be nice to have is a method to make the AI wait for a signal to change or a blocking train to get out of the way. Now it tries to calculate a new path as soon as it is blocked when a little patience would solve the problem. Of course at other times it needs to recalculate on the fly. The dynamic nature of a route with multiple AI trains running means that sometimes a secondary path will work just a well as the primary. No need for a delay.

Another nice thing would be a way to rank each train (automatically or manually) so that when two trains are contending for the same switch or stretch of track, the higher rank always wins.
 
hmmm, will have to look at that again but wasn't that just a 1, 2 or 3 level of priortiy? Like express, freight and local trains? How would two priority 1 trains resolve a conflict. In fact, if I remember it correctly, priority was assigned to the track and the trains would select track as a consequence. Like I said, it was long ago and perhaps I don't remember it well.

What I had in mind was a unique ranking sequence with no train, manually placed or portal produced, having the same rank. That way it would always be clear who has precedence.
 
AI gets lost
AI goes walk about
AI ...

...I found a direction marker left over from when that part of the track was supposed to be one way. With that removed, the AI now didn't want to traverse a set of double slip turnouts that were successfully negotiated on the way in. I added an extra signal and now the route has been running without a hitch for almost four hours with 6 to 10 AI trains interacting. :cool:

I find that within the limits of its program, the AI works pretty well. As the route designer, it is up to me to see to it that the AI has enough information to complete its tasks. That means proper signals and a path that can be followed must be provided. :)

The AI will do exactly what it is told to do. Now if what you said is not what you meant, that's not AIs problem. :wave:

Hello Martinvk, I agree completely!:D
 
Hi Martin

You are exactly right, I've found that I can get the AI to exactly what I want when I want, None of my trains go any where with a "Path command" and an "Autodrive Command". With all routes and proceedures held in the copy commands, works a treat.

Your wish of

One thing that would be nice to have is a method to make the AI wait for a signal to change or a blocking train to get out of the way. Now it tries to calculate a new path as soon as it is blocked when a little patience would solve the problem.

Is already available. In 09 "Drive Via Track Mark" was introduced. It has been explained by Auranites the this command does not seek to find other ways around and opposing train or object as the "Navigate Via Trackmark" does.

Cheers

Lots
 
Drive via is great but I don't think applicable. What I had in mind was more a logic change in the AI rather than an explicit instruction.

In situations where I can predict exactly who is going to meet what and where, an appropriate set of Wait for and Drive via commands would work.

What I need is something to take care of random situations.
Ex. A train is stopped by a red because the previous train has not cleared the block yet. Instead of finding a new path, wait a while and the original path will clear.

In a map with many portals and each having a selection of consists it can produce, predicting the next combination of events is not possible.

In theory, every run of a session should be exactly the same as before and so by timing each event, all the necessary commands can be given at the start. Yet when I start my route, unless I give a wait for command to one of two trains, either one could take the lead and block the other out of the yard. I wonder if there is some randomizer in Trainz to make this happen.

The AI system needs to be told or learn when it can repath and when it should wait. How this would be done I don't know but it would go a long way to preventing wild detours when a like patience would have resolved a problem.
 
Ex. A train is stopped by a red because the previous train has not cleared the block yet. Instead of finding a new path, wait a while and the original path will clear.

Martin this is exactly the situation in which 'Drive via trackmark' should be used. Everywhere there is an 'alternative' route give the AI a 'Drive Via' command and force the driver to sit and wait for the route you want him/her to take.

And kudos for the opening post - inmho 99% of 'stupid AI' posts are easily solve-able with appropriate driver commands...

Andy ;)
 
I agree with you too, Martin. I too have found that many of the stupid AI actions were my doings as well like having a driection mark facing the wrong direction! Although I have yet to figure out how a driver ended up down at the docks instead at the passenger terminal during one of my operating sessions. He was told to go to the station and not the dock, but somehow was diverted. Now that I'm thinking about it, I wonder if this is due to another consist blocking the yard throat and this particular driver deciding to try a shortcut that didn't work.

What I don't like however, is the AI taking the long way around through a yard because that path to the right is shorter unless I place explicit track marks. The AI should not throw junction levers and should only drive unless they are setup to shunt cars. How this would be done is beyond me.

The other thing I don't like is how they'll grab a junction and either cause a derailment, or end up in a Mexican Hat Dance because neither one of the drivers will yeild to the other. And worse, tie up a long stretch of track because they've completely locked out all other traffic on the route. This particularly troublesome at yards and terminii.

The priorty marker is a good idea, but this means programming each placed consist with a new priority in Surveryor prior to operating so this is session specific. The way to go about this would have been to establish priorities based on the consist type instead. The driver of a coal or iron drag for example would have a lower priority over the hotshot passenger or freight. This too would be created in Surveyor, but being consists, could be saved with the base program isntead of being session specific.

John
 
Martin this is exactly the situation in which 'Drive via trackmark' should be used. Everywhere there is an 'alternative' route give the AI a 'Drive Via' command and force the driver to sit and wait for the route you want him/her to take ...

Andy ;)
Ah, now I see what you meant but that would mean a lot of track marks and a long command list for each driver. There are too many places where more than one path is OK (makes for nice variety) but once selected it would be better if the train didn't constantly try to second guess itself. Also, if there was a way to copy / paste driver commands .... ?

What is needed is a Don't drive via command. Being consist specific, it wouldn't affect other trains that have legitimate business on a certain track. The current Direction markers affect everyone and not just the train I want to restrict.

I had a look at the Inputtable rule but it seems to be used to control turntables. Not exactly what I had in mind. Or is it more versatile than that?
 
Martin

Don't be concerned over excessively long list of driver commands use Copy Commands to store large lists of of complex driver comands then its just one click to use them in game. Its the best way of running AI trains

Cheers

Lots
 
Martin,

Check out the schedule library and the copy commands rules. These are great for duplicating schedules across multiple trains.

You basically setup the schedule the way you want, save it to the schedule library where you can give them convincing names and organize your schedules into groups. Later on when assigning the commands to the drivers, you call up the commands by inserting the Copy command from object. When this is inserted, it brings up the list of your preconfigured command sets, which you can use over and over if you wish.

John
 
For anything complicated you might be better off using Trainz Pro Routes' Scenario Creation System (SCS) or in TRS2004 a GameScript scenario.

John
 
I had a look at the Inputtable rule but it seems to be used to control turntables. Not exactly what I had in mind. Or is it more versatile than that?


martinvk
If you wish you can study or observe the bahaviour of AI trains in the route made by segy, (#71378) Timetable Challange and download the session Timetable Challange PM.

regards
 
Back
Top