Presenting the Denver and Rio Grande train AI. It's named for the railroad my grandfather worked on. That's him as the president.
Mission The goal of D&RG is to be a train focused AI that's a reasonable replacement for the "old AI" and a showcase and testbed for completely custom pathfinding. It should be profitable, robust and interesting in the default game and with popular NewGrfs.
Bugs Post
Features
- North America themed. Prefers the NARS train set. (But supports default and 2cc).
- Two way tracks.
- Train management.
- Remove stations for closed industries.
- BSD License
- Completely custom pathfinder that is much faster than the default rail pathfinder.
- Minimal terraforming.
- Mostly Non-network style connections (sort of like the Old AI).
- Pathfinder uses 3 sub-pathfinders.
- Main pathfinder is "as the crow flies" CrowPathFinder that heads directly for the goal (watching slopes to ensure tracks can be built). This is the key to speed since most of the time this is all you need.
- Bridge and Ant pathfinders are secondary. Bridge just tries to bridge gaps the crow detects. If bridge fails the ant (slow and similar to A*) wanders around trying to find a path.
- Poor to decent code. I was more interested in making it work than making the code very good.
- There are settings for a "verbose" mode so you can see the pathfinder in real time.
- 2cc compatible, but don't expect it to turn a profit on rough or hilly maps with default costs. The engines in that set are really expensive. Turn up fininacial restraint to high for best results.
- Reuse of consumer stations for mini networks.
- Untested with non-default industry grfs.
- Lots of user tweakable settings.
Non-features (I.E. Don't ask please, they aren't planned anytime soon.)
- "no 90 degree turns".
- industry newgrfs.
- dealing with newgrfs that are financially challenging. Low loans, increased building costs, ect.
- non-trains. (Though some limited bus capability might be forthcoming).
- Support for versions other than the current stable release. (0.7.2 at this time)
Save games or custom scenarios where bugs show up early (and after issueing a "restart" command) are VERY helpful.
Thanks to the AI API developers! It's really good.
Thanks to the other AI authors for help, examples, inspiration and encouragement.
Thanks to Brumi, Eliandor and Sirkoz for lots of bug reports.