Brumi wrote:Hi Dustin,
I tried your AI, it's quite interesting to watch, seems it will have a good future
Sometimes it build weird tracks, trying to outperform the old AI in its own style...
oldaistyle.png
I have one suggestion, that the signal marked should be a pre-signal instead of an exit-signal if the main line is coming from the direction like that in the picture, ortherwise the exit-signal is OK.
And could you tell me the meanings of the symbols used in the signs by the pathfinder?
Brumi
Classic! I might keep that "bug" in there just cause it reminds me of the old AI.

Also, all my efforts to fix it have ended baddly. It's a result of the semi-random pathfinder I use. I had written a post-processor to unkink the line, but I didn't get it working correctly. I need more time to think the algorithm through.
As for the deadlock and the signals, I am experimenting with that. Auto Reverse will eventually put a train in the depot and fix things. Sometimes trains get stuck in the depot a long time. I wish the depot was alwasy FIFO. The problem with the station design is it's meant to allow a track from any of the corners to work. In fact, in the future I might want to hook up multiple corners. I think adding 4 more plain signal in front of the one you circled will at least fix the deadlock.
As I have mentioned before, I don't like how I make the passing lanes at all. It's way too slow when the map starts to fill up. I am working on a faster system. Saddly, my vacation is over so my AI time is now very limited.
Pathfinder Symbols:
Crow:
{.} Track here will work.
{-} track here is invalid, looking for a place along the line where it will.
{+} Last good tile along strait path
{*} (I think, since I can see the code right now) This is where the path picks up again.
{B} Bridge pathfinder start
{A} Ant Pathfinder choosen path.
So crow goes until it hits +, remembers it, goes on to * and askes if a bridge from + to * will work. If not it give + and * to Ant and runs several trials to see if there is a good way round. Crow always hands things over to ant for the last 15 tiles. Crow can make a mess in close due to the simplified method it uses to make sure the path can cross slopes. In fact it will build switchbacks sometimes that could be avioded.
Ant is the one that makes the crazy tracks. Ants make a list of all the tiles they could move into, stack rank them by distance, slope and a couple other factors, then pick one randomly favoring the best one. The first ant is set to wander a lot and is likely to at least find a route. Subsequent ants are less and less likely to wander. One with lowest cost to build wins. In the picture you sent, probably Ant 1 found a route and the rest trapped themselves in a dead end of thier own making. They never recurse back when they hit a dead end. They just give up and start a new ant.
One day I will replace ant with some simpler pathfinders. Bee (which never quite worked right due to my terrible implementation) tries to just make a box around obstacles. I have a better version partially made. I also want to create a Seagull to follow shorelines when I hit water. Ant I will save for the last resort in complex scenarios. Imagine two cities that almost overlap with an industry in the gap. Ant can sometimes handle that. However most obstacles are just standing in the middle of a clear area and a much simpler plan will get around them.
Ant is also quite slow and is the reason my passing lanes take too long right now. That and I have a minor bug where I add failed station footprints to the "no fly zone".
Thanks so much for the feedback. It's really appreciated!