I'm playing a game with one of each of the train AI's. The game is extremely hilly.
One thing I'm noticing is that quite a few of the AI's are completely failing to build an appropriate engine for their trains when there are hills en-route.
I don't have any NewGRF's affecting this, all the settings that are applicable are standard OpenTTD things. My values are the [square bracket] ones.
- Train acceleration mode: Realistic/original. [Realistic]
- Slope steepness for trains (0-10%) [3%]
- Weight multiplier for freight to simulate heavy trains (0-255) [4x].
I don't know if this is something that should be in the API, (or maybe is already) or left for the AI devs to work out themselves, but currently they're generally quite worthless. I bunches of AI trains completely failing to get up hills and the companies promptly go bankrupt.
In my mind I imagine there would be some API calls to calculate required power; the api dealing with the above settings; this would make this simpler for the AI devs; again, maybe they exist and are rarely used.
FastPTPAI, AdmiralAI, and SimpleAI.
AIAI seems to be the only one that handles the situation correctly, choosing to add more engines if appropriate (though it seems to prefer using multiple less-powerful locos rather than a single high-power one, even though the later would be cheaper to run).
Common AI problem; insufficient tractive effort
Moderator: OpenTTD Developers
Re: Common AI problem; insufficient tractive effort
The problem is that the API has absolutely no concept of weight. We tried some years ago, but did not figure out a sane way due to the complex game mechanics. It has to account for:
* Slope settings for RV and trains.
* Vehicle weight when empty.
* Vehicle weight when loaded.
* Should the API use weight or rather slope resistance?
* With the freight weight setting cargo may weight more on trains than on other vehicles.
* I am sure I am missing more details....
* Slope settings for RV and trains.
* Vehicle weight when empty.
* Vehicle weight when loaded.
* Should the API use weight or rather slope resistance?
* With the freight weight setting cargo may weight more on trains than on other vehicles.
* I am sure I am missing more details....
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Common AI problem; insufficient tractive effort
Hmm, as far as I remember, SimpleAI does consider tractive effort, only to avoid this problem
Maybe it does not consider the weight multiplier. I'll need to look into it...
Maybe it does not consider the weight multiplier. I'll need to look into it...
Re: Common AI problem; insufficient tractive effort
AIs which don't just drive railways straight up mountains would go a long way to mitigate this problem.
Re: Common AI problem; insufficient tractive effort
Not only that pikkabird, if you add penalty from climbing in the pathfinder the calc gets horrible ; A* really gets poor when something is in the way as it must try all neightbors to find the solve.
So not only your train endup making a big turn to mitigate this, but all your pathfinding search gets really slow, and when you take years to build one railway, it get odd
So not only your train endup making a big turn to mitigate this, but all your pathfinding search gets really slow, and when you take years to build one railway, it get odd
Who is online
Users browsing this forum: Semrush [Bot] and 42 guests