News:

SimuTranslator
Make Simutrans speak your language.

Passenger Script-AI from koa - Proposed Changes

Started by Andarix, May 17, 2026, 12:28:01 PM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

Andarix

change select start city to minimum citizen 500

Since code synchronization is difficult without a repository, I have written the new code into the file `changes_andarix.nut`.

The pathfinder does not build bridges over rivers and bodies of water with shallow banks. I need to investigate why this is the case. This behavior had already been observed in `pak.nippon` in connection with `sqai_rail`.


I have removed unused files to improve clarity.

koa

Quote from: Andarix on May 17, 2026, 12:28:01 PMThe pathfinder does not build bridges over rivers and bodies of water with shallow banks. I need to investigate why this is the case. This behavior had already been observed in `pak.nippon` in connection with `sqai_rail`.
I think the reason you can't build bridges with the "Half-Height" pak set is because it isn't tall enough.IMG_2782.png

prissi

How about setting up a guthub repo? Then things are easier to follow.

koa

Quote from: prissi on May 18, 2026, 12:06:34 PMHow about setting up a guthub repo? Then things are easier to follow.
Thank you for nice suggestion.
In that case, I'm not sure how to structure the repository.
How does sqai_rail?
Is it included in the main Simutrans development repository, or separate repository?

prissi

The ai are in the main branch. Since most people nowadays prefer github, it might be easier to just add repository on github by cloing from sqai. I think I would leave Andarix to suggest something.

Andarix

sqai_rail is a fork of sqai by Dwachs.

There are now 5 possibilities:

  • A new repository account is created containing the files from sqai_koa.
  • A fork of sqai_rail is created in a new repository account, and the modified files from sqai_koa are then copied into it.
  • Instead of in a new repository account, option 1 or 2 is created within the Simutrans account.
  • I create a new branch within sqai_rail and grant koa access to my repo (though I am currently unsure whether the permissions allow for granting access to only a single branch).
  • The same as option 4, but within the Simutrans account.

prissi

I am fine with repo under the simutrans ubrella or as a fork from Dwachs/Andarix. I think, forking may be easier long term to synchronize the parts that do not change but were improved in squai/sqai_rail

Andarix

Quote from: prissi on May 19, 2026, 07:11:36 AMI am fine with repo under the simutrans ubrella or as a fork from Dwachs/Andarix. I think, forking may be easier long term to synchronize the parts that do not change but were improved in squai/sqai_rail

With regard to `astar.nut`, this is certainly advantageous, as it essentially contains only neutral logic (pathfinding, station construction, station expansion, object selection, etc.).

Andarix

#8
Changes to slightly limit network expansion:

- Limit route length to straight-line distance + 20%
- No further network expansion if capital falls below 50,000
- Limitation to expansion to 5 cities if capital is below 70,000


provided no mistakes are made

koa

Quote from: Andarix on Today at 09:02:58 AM- No further network expansion if capital falls below 50,000
- Limitation to expansion to 5 cities if capital is below 70,000
If it curbs investment without turning a profit, it will eventually go bankrupt.
To curb investment, it must first generate profits.
And to generate profits, it needs to build a solid network.

koa


prissi

I think the criterum should be rather net wealth, a capital is not accounting for the value of vehicles. But maybe, a slower expansion below a certain threshold could stabilize it to went went bankrupt while expanding.

Andarix

The decision to focus on capital stems from the fact that, currently, only a single depot in the starting city is being utilized.

This means that vehicles incur significant operating costs before they have even reached their first scheduled stop.

sqai_rail calculates the construction costs and then determines whether the available capital is sufficient.

sqai_koa appears to check the capital, but it does not calculate the cost of expansion or the associated maintenance expenses. Furthermore, an entire series of cities. I have seen as many as eight at once are connected in a single batch.

Quote from: koa on Today at 11:39:52 AMIf it curbs investment without turning a profit, it will eventually go bankrupt.
To curb investment, it must first generate profits.
And to generate profits, it needs to build a solid network.

With your strategy relying on a single depot and operating out of just one starting city you face the inherent problem that significant operating costs are incurred before your buses even reach their first scheduled stop.

Furthermore, you are currently not utilizing any waiting times. As a result, a large number of your buses are driving around largely empty.