Modern artificial intelligence research involves machine learning scenarios running millions of cycles where the AI actually tests random choices of action noting what works and what does not work in achieving a predetermined goal. Hence the need for massive computing power. If you are interested in learning more, I recommend this channel.
In contrast, Trainz has computer controlled trains that are programmed using snippets of code written by different people in the form of driver commands and session rules. These snippets of code when used in the scenarios they were designed to handle often perform exactly as designed. The issues encountered by users is that the code can easily be confused by scenarios that they can not handle because the programmer did not anticipate the scenarios in advance. At no point in time do the snippets of code learn to handle the new situations in any way. At best, all you get are random actions that fail but that failure is forgotten instantly and tried again and again until the main game loop declares the "driver" needs human interaction. In some cases the random actions work and the train proceeds but it instantly forgets what worked so will be no better at handling the same scenario in the future.