Recently I've been trying to make an AI on my own. My (far-to-achieve) ambition is to make some sort of remake of the old AI, I think that should be quite easy compared to building a really intelligent AI.
I'm a real amateur in programming, I use the library pathfinder according to the guidelines at http://wiki.openttd.org/AI:RoadPathfinder. In fact, I just copied the code.
![Smile :)](./images/smilies/icon_smile.gif)
So, my questions:
1) Is there some way to add a penalty for road-rail level crossings without modifying the code of the pathfinder?
2) I noticed that my pathfinder is slow compared to other AIs that use the library pathfinder (for example, Convoy and TransAI). So, is there some way to make the pathfinder faster? (again, without modifying the library code) I don't mind if the pathfinder doesn't find the optimal route.
3) How do you know that the pathinder failed to find a path? Is it OK to add a time limit?
I hope I will be able develop the AI for some alpha-release. Currently it chooses a service completely randomly, builds the two truck stations and then connects them todether. The next step for me is to build and start the vehicles. Of course my biggest problem will be exception handling, currently there is almost none.