Terron AI

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Terron AI

Post by planetmaker »

ac84 wrote:
planetmaker wrote:IMHO not really.
This screenshot shows only about 1/3 of the actual jam. Are you still sure?

Stations placement is not always main cause of the jams, at least from my observations. Jams become really huge problem(as above) because of breakdowns. When many vehicles with relatively low reliability follows one road and several of them breaks it slows all the line. Reliability of all vehicles in the line goes down and this leads to even more breakdowns. It's like chain reaction. When amount of vehicles reaches critical mass(usually because several AIs use one road) then entire route becomes one huge jam. And construction of additional roads resolve this issue.

While, surely, current building algorithm is far from optimal, I'll choose aesthetically unpleasant and even ugly landscape over constant 100 vehicles jam any day.
I'm still sure, yes. The error there seems to be two things: a) the drive-through stop being on the route of another connection and b) an AI seeing this connection which is blocked by the DTRS not serviced enough by the existing vehicles (as they don't manage to transport stuff) - and coming to the conclusion that more road vehicles will solve the issue. On the contrary actually. That's independent of reliability and break-downs.

I'll choose a jam of badly serviced vehicles over an unpleasant landscape every time I play with AIs. They're not supposed to ruin my map. If reliability is the issue, the solution is not "more roads" but "more frequent road depots for servicing".
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: Terron AI

Post by 3iff »

I've been testing multiple AIs and had a game with a few thousand road vehicles. Unfortunately they all seem to have the same idea of the 'best route' and fail to use empty roads. perhaps it's due to the pathfinder not having an option of randomness. Hence, building multiple roads in an area is a waste of time and visually unattractive.

If the pathfinder could randomly choose between 2 equally weighted routes then jams might reduce because there would be fewer vehicles on the 'best' route. I know there are various in-game pathfinder settings but cannot find a 'better' setting to allow road vehicles to pick better routes...

Just an observation and in no way critical of this or any other AI.
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

planetmaker wrote:I'm still sure, yes.
You choose 2-3 game screens long jam which will last for years?
Well, we seem to disagree here.
3iff wrote:Unfortunately they all seem to have the same idea of the 'best route' and fail to use empty roads. perhaps it's due to the pathfinder not having an option of randomness. Hence, building multiple roads in an area is a waste of time and visually unattractive.
Usually as a player I can build good second road, but for the AI this is a difficult task indeed, and somewhat random roads it builds to resolve the situation remain empty more often than being used.

As already has been said, I'm not happy with this feature's performance too and look for better decision. But from my experience it actually works good enough to keep it so far(builds expansion locally to jam and can redirect up to 20-30% of traffic).
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: Terron AI

Post by Brumi »

I noticed that by the year 2051 your AI sold all of its road vehicles. Why is it doing that?
See this post for a savegame.
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

Thanks for the report. Quite a bug was the reason I must say. It never showed itself in my games because of different settings.
I'll inspect it more carefully tomorrow, but now looks like low planes limit( :shock: :shock: :shock: ) was the key.
New version will probably include hard limit for loop roads construction too, it shouldn't be so annoying as it is now.

Edit:
And new version is out.
Apart from mentioned things I also fixed unsafe instruction which could demolish road tile in front of the AI's station and modified pathfinding rules for town-to-town roads construction. AI is now allowed to build such roads very straight even though it will be more expensive than the default "safe" construction mode.
ToBeFree
Engineer
Engineer
Posts: 4
Joined: 25 Aug 2011 20:49

Re: Terron AI

Post by ToBeFree »

I really like this AI! I played with NoCAB and AdmiralAI before, but now I use Terron as single computer opponent for me.
I also like the "bus transfer to airport" mechanism. I set it to default and the results are nice. :)

After loading a savegame, Terron crashed. It happened after the AI checked which road routes are available. In the game I deactivated every means of transport for Terron in the advanced settings. Terron became too good ( :mrgreen: ), so I wanted it to idle for a while. That worked fine until I reloaded a savegame.

Terron should not crash if all means of transport are disabled at the moment of the preprocessing. It should just idle and wait until it is allowed to build things again. :wink:

EDIT: I used the following NewGRFs:
- Aviator's Aircraft set
- FISH ship set (but the map had no water^^)
- "Vacuum Tube"
- Generic Cars set
- Hover Bus
Attachments
Above the crash message.
Above the crash message.
terroncrash-above-1.png (69.65 KiB) Viewed 768 times
The crash message.
The crash message.
terroncrash1.png (69.88 KiB) Viewed 768 times
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

Hmm, you changed settings in the running game?
Like [start game] - [play for a while] - [change settings] - [save] - [load]?

Btw if you think that Terron builds too much you can reduce allowed routes length in the settings. That should cripple the AI profits to the degree you find satisfying. Enabling/disabling "greedy" airports building also has serious effect for finance performance.
ToBeFree
Engineer
Engineer
Posts: 4
Joined: 25 Aug 2011 20:49

Re: Terron AI

Post by ToBeFree »

svetovoi wrote:Hmm, you changed settings in the running game?
Like [start game] - [play for a while] - [change settings] - [save] - [load]?
Yes. I often do that. ;)
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

Well, the AI was written with assumption that the game rules must stay constant, I'm not surprised it crashed in you case.
Maybe later I'll try to handle such rule changes but this is not going to happen soon.
MAG101
Engineer
Engineer
Posts: 28
Joined: 14 Dec 2011 00:55

Re: Terron AI

Post by MAG101 »

Is there gonna be train support this AI?
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

Sure, someday :)
kuddly
Engineer
Engineer
Posts: 6
Joined: 16 Jan 2012 06:05

Re: Terron AI

Post by kuddly »

it is a great ai...have a difficult time to compete with them :D
anyway, why terron ai able to build a station (airport) next to mine? is it a bug or you actually make it like that?
Attachments
Kuddly Kastle, 18th Jan 1994.png
(326.6 KiB) Downloaded 1 time
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: Terron AI

Post by Brumi »

You can also do it if you hold ctrl while building the airport :wink:
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Terron AI

Post by Kogut »

everybody wrote:why ai able to build a station next to mine?
Heh, it seems that main function of AIs is to "Hey, yo can use ctrl!" (@kuddly this may be intesting: http://wiki.openttd.org/Hidden_features )
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

Yes, it can be said that AI always builds stations with 'ctrl pressed'.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Terron AI

Post by Zuu »

Not true. There is an API parameter that make AIs build "without ctrl". However, unless distant join is disabled, it is easier for AIs to either tell the API to build new station or pass along a station ID for the station to join with than relying on adjacent join.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

He he, exactly what i meant by "it can be said" :)
kuddly
Engineer
Engineer
Posts: 6
Joined: 16 Jan 2012 06:05

Re: Terron AI

Post by kuddly »

well...what can be expected from a newbie like me...hahaha
to be honest i really don't know about the "ctrl pressed" thing until i read the link given above...hahaha
anyway, really enjoy the competition with terron.
Steffl
Engineer
Engineer
Posts: 103
Joined: 23 Feb 2010 15:44

Re: Terron AI

Post by Steffl »

Hi svetovoi,

your AI is really a very strong oppenent.

I found a bug while playing with Terron. Not a crash, just some other strange thing.

For a reason I don't know, some vehicle don't have a station to unload in its orders.
They just have the loading station in the orders and two Goto-Depot orders. Although some vehicles were not refitted correctly and tried to load mail instead of goods.
In other AI test games I did, I don't saw any false orders from Terrons vehicles.
I don't know if it matters, but I played with Bobs Random British Road Vehicles and eGrvts- Set.

Look at my attached picture. Your AI is the brown one with the open windows. The other stations belong to other AIs.



Unbenannt, 12. Feb 1994.png
look at the orders
(115.86 KiB) Downloaded 1 time
svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: Terron AI

Post by svetovoi »

Oh yes, I know this bug exist.
I saw it only once myself and was unable to reproduce (thus fix) it.
The good news is that AI has mechanism to find and sell all "theoretically bad" vehicles.
The bad news is that because such rescanning takes time AI will do it just once - after you load the game. In the case of road vehicles AI will scan only old ones(lesser than 3 years of lifetime left) though.

In other words, you can just keep playing and one day after you load the game AI will suddenly sell bugged vehicles.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 6 guests