News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

How to keep the goods AI from suiciding?

Started by pack.wolf, September 23, 2012, 12:51:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pack.wolf

Hi all,

In all my games any goods AI sooner or later suicides. Usually it works like this:
- AI finds a profitable route
- AI builds a completely inflated connection (dozens to even hundreds of trucks, trains of significant length)
- AI saturates the consumer
- AI doesn't bother distributing the goods produced by the consumer to it's customers or delivering other resources needed by the consumer (e.g. coal AND iron to steel mills)
- route doesn't make any money any more
- AI goes bankrupt

Is there any way to prevent this? Only having passenger AIs is kind of boring. I usually try to fix the AI's problems by constructing my own routes to supplement theirs, but as soon as I fixed one of them they build the next one that is guaranteed to fail...

Are there any PAKs with better AI than pak64? I've also tried pak128, but that crashes nearly every time I try to create a big map. So I haven't really played with that one yet.

Thx 4 your help,
Alex

Ters

I think the AI is the same for all, so another pak won't help, unless it's a pak set where industry chains only have one link.

pack.wolf

That's too bad :(
I think I'll take a closer look at OpenTTD then. I was told that with some customization and community patches I can get most of the SimuTrans features it misses. Hope I can get it running.

Thanks anyway!
- Alex

Roads

Alex,

You might want to try what I do.  In my current game I had a million dollars by 1940 transporting only cargo.  You are right about the AI.  To do what I do, you need to create all the industries yourself using the Public player and then micro manage the movement of your vehicles until you get everything running smoothly.  You probably would not need to micro manage if you could figure out all the ways the AI can screw you over by carrying goods the longest possible route, etc., but that is really hard to do.  Instead you can use the Public player to destroy industries that are causing a problem and build needed ones.

Also, as Ters once told me, you can build multiple stations in certain locations which will sometimes solve headaches.

There is one thing about hauling cargo in Simutrans.  It is a lot of fun beating the AI!

prissi

The AI has some problems: If they cannot find a route, they have to give up. Like a factory seperated by a sea. Or a factory with not enough space to build a new stop around it. This is the suicide. With pak64 the chains are not too big, thus those happen not too often. pak128 may cause more sucide AIs.

pak128 has also some goods, which cannot be transported by car or train in ealier years. Some version only have extremely expensive frieght platforms before 1950, which also easily kill an AI. The number of trucks/trains is determined by the production of the factories. Blame pak128 values and the small capacity of trucks for those numbers (actually, the AI uses maximum 255 trucks).

What year do you start? AIs will work fine from 1930 on which pak64. I balanced the pak in such a way that the AI mostly make it. Important is, that you do not switch on all AIs, just one or two at most. Also some AI only uses trains and other only cars, which will fail for certain connections. The best chance of survival has an AI which uses all modes of transport. You can enable them in the finance window of the AI.

And the final question: What map size do you use? AI may run into troubles on maps much larger than 512 tiles in one directions (since then usually some factories are too far away/with water inbetween) to find a connection.

Concerning OpenTTD: The AI there rarely go bankrupt, since it is almost impossible to go bankrupt there as long as you have one connection at all. Everything there is for trains or airplanes is very profitable. The AI in OpenTTD have also even more troubles finding connections than in simutrans. Industries in OpenTTD are only much closer by default.

Ters

Has the AI becode smarter in OpenTTD? I remember the original Transport Tycoon AI would build all over the place.

Dwachs

In OTTD there is now the possibilty to create scripted AIs. The available user-made AIs are certainly better than the original TT one.
Parsley, sage, rosemary, and maggikraut.

prissi

The OpenTTD AI has to use the wayfinder in squirrel, which is very slow compared to C++ direct code.

Finally: to avoid stealing from a factory, an AI will only connect to a certain factory when its storage is at least 1/4 full. Thus, if there is a very large factory storage and long routes to it, then it will disregard the factory. You can lower the build speed (increase the number) in the AI options.

Roads

#8
I am not sure I understand what y'all are talking about but from pretty extensive playing with transporting goods in pak128, I can tell you the AI is not your friend.  It does everything it possibly can to cause you to lose money.  This includes picking up goods and transporting them all over the map if it can make a connection and believe me Prissi, the AI has no problem at all finding connections.  It has found many that I never dreamed existed.

IMHO, this is as it should be.  The AI should be your opponent, otherwise the challenge in the game is diminished.  Please note I did not say no challenge because figuring out how to avoid dead head runs is certainly challenging when that possibility exists (i.e., bulk).


Modify:  Changed dead runs to dead head runs

prissi

Ok, I found two bugs: First the AI never got the right starting factory, i.e. it never took a consumer. This bug must be there for quite some while :(

Anyway, r5939 will fix this. The AI will also not build routes which are more expensive than it has in its accout.

Roads

#10

QuoteThe AI will also not build routes which are more expensive than it has in its accout.


Prissi, what does this mean?


If you are saying it will not build routes that are unprofitable to the player, I will not only disagree but will create a situation where I can demonstrate that it most certainly does.  Now I need to explain what I mean by unprofitable.  After many instances of going bankrupt and with the help of Fifty and others, I now define unprofitable, not as a route that simply shows in black on the route thingy, but as one in which you have a positive return of cash on your total investment.  Unprofitable is a route that does not only pay for the vehicles(s) involved but for the infrastructure on which it runs.

You may very well have what appears as profitable lines and go bankrupt.

TurfIt

It means he added a check so the AI doesn't spend more constructing the route than it has in the bank. aka instant suicide.

Roads

I think we are talking about different things here...I'll bow out now...