LuDiAI AfterFix is an AI that builds road routes and air routes, transporting either mail or passengers.
It's an AI that is built upon the original work of lukin_'s LuDiAI. Initial work was on fixing issues found on the original, but it became something more of its own later on.
Main differences or improvements
- Adds more configuration settings
- Randomizes most configuration settings when started as Random AI
- Can build more than 500 road vehicles
- Builds more airport types
- Builds helicopters
- Builds statues
- Builds the company HQ
- Sells old aircraft
- Is aware of cargo distribution setting
- Is aware of plane speed setting
- Is aware of aircraft max range
- Is aware of map size for route distances
- Matches aircraft type with airport type
- Plans optimal distances between airports
- May build more than one aircraft per route at once
- May add or remove more than one road vehicle at once during management
- Renews vehicles when better models become available
- Plans a maximum number of vehicles a route can support
- Attaches road stations to existing airports
- Removes unserviced road routes
- Use of customized road pathfinder
- Retries road construction if it finds an obstacle instead of giving up
- Is aware of articulated road vehicles' need of drivethrough stations
- Upgrades road bridges
- Retries construction of road stations instead of giving upon instantly
- Schedules removals of leftover road stations and depots on failure
- May also try to build road depots in the source or destination towns
- Founds towns
- Initiates advertising campaigns in towns
- Funds construction of buildings in towns
- Loans and repays on-the-go
Choses which cargo the AI will handle. If the AI started as Random AI, the choice will be randomized on startup.
The AI creates Passenger only routes via road and/or air.
The AI creates Mail only routes via road and/or air.
When enabled, the AI will only service City status towns. When disabled, it will service both cities and towns. If the AI started as Random AI, the choice will be randomized on startup.
Town choice priority:
Defines how the AI will pair two towns. If the AI Started as Random AI, one of the following options will be picked at random on startup.
- Most cargo produced first:
The AI choses the most productive towns first when creating a service.
- None, pick at random:
The AI choses the towns at random when creating a service.
- Shorter routes first:
The AI choses towns which are closer to each other first when creating a service.
- Longer routes first:
The AI choses towns which are further from each other first when creating a service.
When enabled, the AI tries to avoid building its stations near stations of other companies. When disabled, it is allowed to do so. If the AI started as Random AI, the decision will be randomized on startup.
Enables or disables the usage of air routes.
Enables or disables the usage of road routes.
Can station spread:
When enabled, the AI expands its road stations by distantly joining new station pieces, to enlarge station coverage. It may also join road stations with airports and vice-versa whenever possible. If the AI started as Random AI, the decision will be randomized on startup.
Minimum distance between towns for road routes:
This distance is Manhattan. Lower values may help pathfinding faster, but at the cost of lesser profits. Higher values may slow pathfinding and may not necessarily yield the best profits, assuming the default engines are being used. If the AI started as Random AI, the choice is randomized on startup, between 20 and 130.
Road pathfinder profile:
Select the behaviour of the pathfinder when connecting two towns by roads. If the AI started as Random AI, the choice will be randomized on startup.
Tweaked for low construction costs when the AI is poor, by avoiding watered coast tiles, which may result in some weird bridges across two coasts. May try to avoid going through drivethrough stations. May build more bridges or tunnels in difficult terrain, especially when the slopes are too steep. If the AI is rich, it may build really long bridges and tunnels. Relatively slow, but overall, the better planner.
Though the pathfinder interval cost values have been reworked and some of the logic regarding bridges and how are roads connected to each other, the default profile tries to mimic the behaviour of the original LuDiAI pathfinder. It is not cost conscious regarding coasts, slopes or bridges, doesn't avoid drivethrough stations and does not build too long bridges or tunnels.
Optimized for fastest planning speed, at the cost of low road reuse. It prefers fewer curves, which could result in roads going through sharp landscapes, or be longer than necessary. Can only build small bridges, which may not be ideal for maps with lots of water. Cannot build tunnels.
Road route capacity mode:
Determines how the AI will handle the capacity of a route by managing the number of vehicles when there's enough cargo waiting at the stations. If the AI started as Random AI, the choice will be randomized on startup.
- Maximum of 25 road vehicles:
Depending on the cargo waiting, the AI may decide to add road vehicles to the route, as long as it doesn't go over 25. It adds one at a time per management cycle.
- Estimate maximum number of road vehicles:
Same as above, but instead of 25 road vehicles, the maximum number is based on the distance between stations, maximum speed of the engine and the number of loading bays available at the stations. Stations may also spread to accomodate more loading bays, and thus more vehicles. It also adds one at a time per management cycle.
- Adjust number of road vehicles dynamically:
In this mode, the AI will keep adding vehicles to the route whenever there's cargo waiting, but will also remove road vehicles if it finds its vehicles unable to move. It will be constantly doing this all the time, which may slow down management. Contrary to the other modes, it can add or remove multiple vehicles at once per management cycle.
AI-GS communication support:
Allow communication between AI and Game Script SCP libraries. Currently supports Company Value GS, where the AI will think twice before spending money in town actions, just to maintain the lead or to maintain catch-up against the company ranked first.
- Fixed a bug that caused aircraft to be in the wrong group
- Added SCP support for Company Value GS
- Added vehicle groups for routes
- Reworked send to depot code with recourse to two special groups for the effect
- Added shared orders support for vehicles
- Several optimizations were done to increase vehicle and route management speeds
- Initiates small, medium and large advertising campaigns
- Funds construction of new buildings in towns
- Reevaluated pathfinder number of tries so that it doesn't take more or less time than necessary to find a path
- Fixed a bug that caused towns founded by others than self to go unnoticed by the town manager for road routes
- Renew aircraft when a better engine model becomes available
- Fixed a bug that caused incomplete removal of road vehicle routes. Their removal is now scheduled instead
- Fixed a crash when founding a town
- Added 3 new settings:
- "Minimum distance between towns for road routes", which was always 40 in previous versions
- "Road pathfinder profile", which was "Custom" in the previous version and "Default" in even earlier versions. "Fastest" is the newer choice
- "Road route capacity mode", which was always "Maximum of 25 road vehicles" in previous versions. "Estimate maximum number of road vehicles" and "Adjust number of road vehicles dynamically" are the newer choices
- Reworked "Random picks" setting into "Town choice priority", with 4 options to chose from. "None, pick at random" is the equivalent choice if "Random picks" was on, and "Most cargo produced first" is the equivalent choice if it was off. "Shorter routes first" and "Longer routes first" are the newer choices
- Road route minimum distance takes map size into account
- Changed road route maximum distance to always have a minimum delta between it and the minimum distance
- No longer retries to find a nearby town to connect by road with na increased maximum distance after failing the first time
- Managing road routes can now be interrupted and continued next cycle
- Account for more road vehicles when estimating costs for building a road route
- Save messages are hidden
- The maximum number of pathfinder attemps is now based on distance and profile used. Also reduces duration of each attempt
- The formula used for computing days in transit for a road vehicle was wrong and has been fixed
- Prevent road vehicles with incomplete orders from running
- Renew road vehicles when a better engine model becomes available
- Station spread road stations only when it reaches maximum capacity
- Account for at least two aircraft when estimating costs for building na air route
- Try to build next air routes with two aircraft minimum, one per airport
- Managing air routes was being denied if "Air Support" is turned off while there were air routes
- Builds statues
- Builds company HQ
- Does not change company name upload loading from a savegame
- Founds towns
- OpenTTD and API requirements set to 1.4.0
- Upgrading road vehicles, engines and bridges was being denied once the AI had reached the maximum number of vehicles
- Allow road pathfinder to be interrupted and resumed without losing its current path finding progress, allowing the AI to manage other things in between, by up to 5 times
- Allow pathbuilder to retry construction when failing to build planned route roads
- Tweaked pathfinder internal cost values and how they're measured, which should result in more bridges and tunnels on difficult terrain, while being cost conscious at the same time when on a low budget
- Allow pathfinder to build bridges over rail and rivers in more occasions
- Prevent pathfinder to connect roads with level crossings in most situations
- Prevent blocking of road stations of other companies while constructing its own road stations
- Allow a few more cases where locations without adjacent roads could be suitable for constructing a road station
- There was still some cases where drive through road stations were not being built, resulting in vehicles with few orders
- Reduce number of stalls when managing too many road routes, when looking for suitable airport and road station locations
- Road vehicle engine model choice is no longer based only on maximum speed, but also on capacity, cargo payment, distance of route, days in transit and reliability
- When expanding a road station, the counting of articulated road vehicles could be incorrect in determining the need of a drivethrough station
- The build manager wasn't setting the articulated variable value at all
- When building or expanding a road station, there could be cases where the station wasn't being built at all, resulting in vehicles with few orders
- Disabled breakdowns were not being considered on estimating the viability of an aircraft engine
- Estimating air route costs could account an incorrect aircraft price
- Helicopter engine list could include invalid and unbuildable models
- Valuator for best aircraft income was using the wrong distance type
- Allow more towns to be searched for a suitable first airport
- Don't start road construction when there are no engines available
- Builds or expands routes with only drivethrough road stations if there's only articulated road vehicles
- Increased town's mail last month production lower limit
- Loosened the aircraft income estimator lower limit
- Lowered the bar for what's deemed profitable to an aircraft
- Uploaded to BaNaNaS
Formerly known as Samu