AI In-Game Configuration Settings
Relevant source files
The following files were used as context for generating this wiki page:
- README.md
- ROADMAP.md
- license.txt
- .github/workflows/rolling-release.yml
- info.nut (Referenced via versioning logic in README.md)
AI-Trans is a custom artificial intelligence designed for OpenTTD that manages the transportation of cargo, passengers, and mail across various transit modes including road, rail, marine, and air. The AI's behavior is dictated by specific in-game configurations and environmental settings that influence its strategy, such as the "Cargo Concept" and infrastructure maintenance requirements.
Sources: README.md:3-10, ROADMAP.md:3-30
Core Strategy Configuration
The AI primary strategy is built around the "Cargo Concept," a many-to-one transport philosophy where the AI attempts to consolidate cargo destinations to a single industry type where feasible. This configuration affects how the AI evaluates potential routes for road, marine, and rail networks.
Cargo Concept Implementation Status
| Route Type | Implementation Status | Description |
|---|---|---|
| Road Route | 50% | Reworking current implementation for many-to-one delivery. |
| Marine Route | 50% | Reworking current implementation for many-to-one delivery. |
| Rail Route | Planned | Future support for many-to-one raw cargo delivery. |
Sources: ROADMAP.md:34-40
Environmental and Game Rule Adaptation
AI-Trans is designed to detect and adapt to specific game-wide settings. These configurations are not set within the AI itself but are toggled within the OpenTTD engine, and the AI must react to them to maintain operational efficiency.
Infrastructure Maintenance
The AI includes logic to detect if the "Infrastructure Maintenance" setting is activated within the game. This specifically influences the planning and profitability calculations for the Air Route, ensuring that airport and hangar costs do not bankrupt the company.
Sources: ROADMAP.md:46-48
CargoDist Support
While currently in the roadmap stage, the AI is designed to eventually support the "CargoDist" game mode. This requires the AI to interpret available API data to understand passenger and cargo destinations rather than simple point-to-point delivery.
Sources: ROADMAP.md:50-51
Logistics and Route Configuration
The AI configures its vehicle deployment based on the available infrastructure and specific game milestones.
Rail Configuration
The AI prioritizes double-track systems for rail services. If building constraints or configuration settings prevent double tracking, it falls back to a single-track configuration with a strict limit of two operating trains to prevent deadlocks.
Sources: ROADMAP.md:28-30
Marine and Road Logic
- Marine: Configured to use and build buoys to facilitate pathfinding for ships transporting freight and passengers.
- Road/Tram: Differentiates between bus/tram-bus (passengers) and truck/tram-truck (freight/mail) based on available vehicle types in the game world.
Sources: ROADMAP.md:12-23
Versioning and Development Settings
For developers and contributors, the AI's internal configuration includes a versioning override system to facilitate testing.
The versioning logic ensures that local modifications are not overwritten by official releases from the "Bananas" content service.
Sources: README.md:46-51
Acquisition and Merger Settings
The AI's financial behavior includes configurations for handling company mergers. It is currently programmed to accept merger offers from competitors. Future development aims to allow the AI to actively manage and rehabilitate acquired companies that are currently experiencing negative income.
Sources: ROADMAP.md:42-45
Summary of Feature Support
| Feature | Supported | Planned/Partial |
|---|---|---|
| Passenger Transport (Air/Road/Marine) | Yes | - |
| Freight Transport (Road/Marine/Rail) | Yes | - |
| Infrastructure Maintenance Awareness | Yes | - |
| Double Track Rail | Yes | - |
| CargoDist | No | Yes |
| Merger Acceptance | Yes | - |
Sources: ROADMAP.md:3-51
AI-Trans operates as a reactive system that adjusts its internal pathfinding and financial logic based on the OpenTTD environment. By adhering to the Cargo Concept and maintaining awareness of infrastructure costs, the AI attempts to build a profitable and scalable transport network.