News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Script-AI with railroad

Started by Andarix, August 01, 2020, 07:17:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

sqai_rail v0.8.1

To put it right away and not arouse false hopes. The AI is designed in such a way that it can survive in the various packages (at least I hope because not every package has been tested by me). She's not a perfect player in every packset. Finer adjustments to different packages will be possible in the future. That depends on whether players give feedback or not.

Railway lines are being expanded for multi-train operation with sidings. The number depends on the length of the route and the terrain.
From 1935, railway lines longer than 80 tiles can be electrified and use electric vehicles.

For long connections, a higher capital is required. Therefore these connections are discarded if the existing capital is not high enough.

There are several runs for route optimization. Bridges and incisions are built. Tunnel not supportet by script AI. Level crossings are also replaced by road bridges if the number of road vehicles exceeds 100 per month and the course of the road permits.

If the maximum speed of vehicles increases, routes are expanded to the necessary speed.

Road conversions always require suitable owners.

Unprofitable and incomplete routes/connections will be removed again.

When traffic jams occur, empty vehicles will be removed after a while to clear the jam.

Unfortunately, earlier games (< r.0.7.0) no longer work from this version onwards.

Problems
With larger maps and more complex industrial chains, the chains are not fully developed. This results from the amount of the starting capital.

If a player goes bankrupt, his streets become public. However, this does not apply to bridges, these will be removed. This means that lines can be broken. This currently has to be fixed manually by the.

Problems can arise when railroad lines cross.

Connections that require more than 3 sections are not completely built.

When removing routes, remnants may remain.




The zip file contains a script_ai_text.dat. Add these texts to the simutrans/text/[lang].tab or save [lang].tab in script folder sqai_rail to have a translated output in the game.
You can translate on this page (select object script_ai_text) or SimuTranslator Base texts (select object script_ai_text).

required Simutrans r10408 or higher

https://nightly.simutrans.com/en/
https://github.com/Andarix/simutrans/releases
https://www.simutrans-forum.de/nightly/
https://github.com/aburch/simutrans/releases


  • To use, unzip the file to simutrans/ai.
  • Start Simutrans with the package of your choice.
  • Start or load a map.
  • Choose a new Script AI player.
  • Choose sqai_rail from the selection.

Andarix

sqai_rail v0.8.2

Line management changes and bug fixes

Unfortunately, earlier games (< r.0.7.0) no longer work from this version onwards.

Problems
With larger maps and more complex industrial chains, the chains are not fully developed. This results from the amount of the starting capital.

If a player goes bankrupt, his streets become public. However, this does not apply to bridges, these will be removed. This means that lines can be broken. This currently has to be fixed manually by the.

Problems can arise when railroad lines cross.

Connections that require more than 3 sections are not completely built.

When removing routes, remnants may remain.




The zip file contains a script_ai_text.dat. Add these texts to the simutrans/text/[lang].tab or save [lang].tab in script folder sqai_rail to have a translated output in the game.
You can translate on this page (select object script_ai_text) or SimuTranslator Base texts (select object script_ai_text).

required Simutrans r10408 or higher

https://nightly.simutrans.com/en/
https://github.com/Andarix/simutrans/releases
https://www.simutrans-forum.de/nightly/
https://github.com/aburch/simutrans/releases


  • To use, unzip the file to simutrans/ai.
  • Start Simutrans with the package of your choice.
  • Start or load a map.
  • Choose a new Script AI player.
  • Choose sqai_rail from the selection.


Andarix

#38
sqai_rail v0.8.5

This version has the following features


  • connect industries with roads, railways or ships, also combined
  • Optimization of the routes (construction of bridges, cuts (instead of tunnels), route straightening)
  • Construction of railway sidings
  • Electrification of existing routes when electric vehicles are used
  • Retirement of vehicles that are too old
  • Upgrading routes to higher speeds when faster vehicles are used
  • Extension of platforms in the direction of the route, if possible when using longer trains than at the start of the route
  • Demolition of unprofitable routes, unless it is the last connection of 2 industries

The Script AI won't play perfectly, but it should survive and not go bankrupt in most cases. However, the larger (distances between industries) and mountainous (restrictions on terrain construction and no tunnels) the maps are, the more difficult it is for them. The biggest problem will be when industrial chains are not fully developed.

I mainly tested with pak64.german. Optimizations for other packages are possible after feedback. It is also possible that there are still errors in relation to 2 heights. Especially when building bridges that may only have height 1 although height 2 is required.

Unfortunately, earlier games (< r.0.7.0) no longer work from this version onwards.

Problems
With larger maps and more complex industrial chains, the chains are not fully developed. This results from the amount of the starting capital.

If a player goes bankrupt, his streets become public. However, this does not apply to bridges, these will be removed. This means that lines can be broken. This currently has to be fixed manually by the.

Problems can arise when railroad lines cross.

Connections that require more than 3 sections are not completely built.

When removing routes, remnants may remain.

When loading a map with script AI, the AI players may not load properly (see player list). Then the AI players have to be reactivated.




The zip file contains a script_ai_text.dat. Add these texts to the simutrans/text/[lang].tab or save [lang].tab in script folder sqai_rail to have a translated output in the game.
You can translate on this page (select object script_ai_text) or SimuTranslator Base texts (select object script_ai_text).

required Simutrans r10421 or higher (include in r10592)

https://nightly.simutrans.com/en/
https://github.com/Andarix/simutrans/releases
https://www.simutrans-forum.de/nightly/
https://github.com/aburch/simutrans/releases


  • To use, unzip the file to simutrans/ai.
  • Start Simutrans with the package of your choice.
  • Start or load a map.
  • Choose a new Script AI player.
  • Choose sqai_rail from the selection.



Testsave
Simutrans 123.0.2 r10592 pak64.german 0.123.0.0.4 script ai r0.8.5
https://simutrans-germany.com/files/upload/1936_256x256-1983.sve (until 22. Mar 2023)