The AI mechanism never ceases to amaze me.

Tony Hilliam of N3V

This is a goldmine of valuable information. We need more of this type info. Next year few will remember it is here. It is up to you to preserve and publish it as a "living document". Please do not bury it in the Wiki which intermixes programming with instructions.

Fixing AI is an expensive, and somewhat "dangerous" undertaking. Perhaps telling CUSTOMERS how to deal with it, in the meantime, will give you a good road map, presenting which elements in the AI processing should be fixed.
 
Last edited:
Signaling will work on bi-directional operations if the modern scripted signals are used. For US routes these are those signals made by RRSignal and Jointed Rail for example. The older simple unscripted signals do not work as expected and we can end up with Mexican Hat standoffs and cornfield meets, which are the bane of AI driving. I don't know if Elstoko or someone else has made single-track signaling possible, but I do know he was working on a token system at some point, which may be what you are looking for in your case.

With passing loops (passing tracks and sidings across the pond here), I use directional markers to force the AI to travel on a specific track. I also put a dual-headed diverging, or a triple-headed interlocking signal ahead of the double-track where the track goes from single to double, and place two opposing absolute signals pointing towards the single track from each branch on the double-track.

Using this setup, I generally have little issues with the AI taking the wrong track or getting stuck. Over the years of route building, I have found that the KISS method is best with AI drivers, and with experience I have learned to anticipate what they may do in a given situation and plan accordingly to get around that.

Kotanga Girl - That's a great workaround for AI not backing up a branch. That's an issue that has plagued us since TS2010 when something changed in the AI logic where suddenly they didn't want to drive a cab-car (driving trailer) and insisted on going through great lengths to reverse directions on any chance they have.

According to N3V, track direction has nothing to do with AI operations and is a myth. The only thing that track direction affects, according to these experts is track-objects. For your sanity and speed when placing signals and other track side objects, it's best to lay the track in the direction of travel if possible to eliminate the extra step of flipping around the objects. Not mentioned by N3V is the track direction does affect how the track bends. I have found that laying the track in the direction of travel helps when setting spline points and straightening track along the line, otherwise, odd kinks occur making straightening track difficult.

Thanks John. I originally worked out how to set up a functioning driving trailer on my early period BR layout where I had a two coach push-pull set taking care of the local passenger services on a very basic schedule. The schedule was fine, but the way the AI handled the push-pull set was downright frustrating. At first I thought making the driving coach a locomotive was a daft idea that couldn't possibly work, but it did and the local passenger service worked perfectly with station stops at interactive platforms spot on every time.
The most important thing I found was to make sure the driving coach and the train locomotive weren't fighting each other due to mismatches in their engine specs; - especially over any setting that limits maximum speed. The driving coach doesn't need to be all that powerful either for this method to work and if anything the extra braking effect from the driving coach can be very handy. I've since used the same method again successfully with a driving coach on my GER Norfolk route where I had a station at the end of rambling branchline that only needed a fairly basic passenger service.

Yes I use direction markers in my loops or else everything would become a mess very quickly. Signals are a problem for me since just about every Uk semaphore signal model is a legacy item from the distant past and since my time period is pre-WW1 they are what I have to use. Some are better than others and I have figured out by now which ones will work reliably together and which ones won't.

I only found out about laying track in the direction of travel recently so I have a lot of higglety-pigglety trackwork that I keep telling myself I must fix one day. I do try to be more careful with laying new sections of trackwork now that I know that though.
 
Hi, thanks all for the input. For any one interested, I use a 'Token' method to get round the AI at times.

I know of 2 simple 'Token' like methods for controlling access to sections of track.
These have appeared in the forum.

Event method
1. create a circular track in a fiddle yard (A Fiddle yard is used in model railroading where excess rolling stack is parked. Model railroaders always have more rolling stock than they can fit on a layout :)).
2. Place Destination marks at various points of the compass - say 90% apart for 4 points N, S, E & W.
3. Place a 'Raise Event' command after each Destination Mkr. - say events 1-4.
4. Place a loco on the circle and set a command line to 'Navigate via' each Destination mkr in turn. (Don't forget to place signals to get the loco moving)
5. Vary circle diameter and loco speed to get the loco to trigger the events - say at 20 seconds apart. For 4 equidistant points this is an 80 second circle.
6 Use 'Wait for event x' to trigger actions in each AI train command line as needed.
This can be varied to suit but does need a driver for AI.
You could also do a reverse by triggering the loco to start from an event outside of the loop.

Junction Permit method
1 create a 'Fiddle yard' track not connected to the layout track.
2 add junctions as needed and name them. eg 'Token Yard'
3 For each AI train, add a 'WaitForJunctionPermit'-'Token Yard' command line, after a 'Navigate To' before entering the 'Yard' and add a 'ReleaseJunction'-'Token Yard' after leaving the yard.
(These are old and give warnings when downloaded in TS12 <kuid:131986:210011>,<kuid2:131986:210012:1> (Thanks for these go to author atilabarut)
Note: This method does not require a train to 'pass' particular triggers/ markers/ junctions to set/release.
AI trains will wait for the 'Token' to be passed each time it is released.
You still need to keep all existing 'in yard' rules.
EVERY AI train using the yard needs to use the same 'Token'.

I also use a combination of HoldJunctionOnly, ControlJunction, FreeJunction & HoldJunctionWithTrackExt
<kuid:131986:1011>,<kuid:131986:1022>,<kuid:131986:1073>,<kuid:131986:1089> again thanks atilabarut
These get complicated in setting up but work near 100% of the time.
 
EQZvDds.jpg


I've been setting up a driving trailer/push-pull set on my Norfolk layout to work the passenger services on a branch line. I thought it would be a simple job. The Push-pull set travels from the branch onto the down line to stop at the main line station at the junction, crosses over to the relief line between the up and down lines and runs back to the branch junction and back onto the branch where it continues along the branchline and completes its schedule.

All was good on the outward journey, but when running in reverse with the driving trailer leading on the return journey it would suddenly stop at a track mark and reverse again going back to the previous track mark before heading off in the correct direction again; - and it was cheerfully running over a direction marker set against it while doing so! At first it would do this two or three times, but after re-positioning the track marks I got it down to it doing it only once before continuing like it was supposed to. Nothing seemed to stop this from happening and as you can imagine I was starting to feel very much frustrated that I couldn't get such a simple schedule to work. I'd set up push-pull set schedules before on a previous layout without any problems so I couldn't understand what was wrong. (The driving trailer is set up as a low powered locomotive by the way to get around the issues Trainz has with propelling passenger coaches)

I still don't really know what the problem was as in the end I removed the track marks and tried something else. I run a lot of tank engines on my layout and they need to make water stops on some of the longer routes such as the very long loop line in the fen land part of the layout. I could never get the AI to stop and position the engine correctly at any interactive water crane or water tank no matter what I did so my solution was to use the old Multiple Industry Basic loading track and set it up to produce water only. The track does take up a lot of space with its length, but on a rural line it's not so hard to find somewhere to fit it in. Since the trains that will use these water stops are set piece trains that don't change it's a simple matter to place a water tank model at the spot where the locomotive always stops. Even the most dumb as a rock AI driver finds it difficult to over run and miss a multiple industry track so it's a method that works every time.

So I placed one of my patent method water pickup solutions on the branch line a short distance after the junction. And I altered the push-pull set's schedule to stop there and pick up water before continuing it's journey to the end of the branch line. And it worked! Joy unbounded! The push-pull set is working perfectly now. I still don't know why the track marks didn't work in this particular situation as they do their job properly everywhere else on my Norfolk layout, but at least now the push-pull set is following its schedule as it should without any problems.
 
Last edited:
Back
Top