AI Configurability

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

Post Reply
yoyo1505
Engineer
Engineer
Posts: 32
Joined: 11 Aug 2007 16:21

AI Configurability

Post by yoyo1505 »

I was just wondering what levels of configurability there are planned to be for the AI by the time 0.7 is released. It seems to me that the intelligence factor may now be made redundant (but maybe not - I don't understand how the coding works so I could be wrong on this one).

Could it be possible to add in new levels of configurability, like aggresiveness or preference for a transport type? Just a suggestion, but I don't know if anyone has given this much thought.

Cheers
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: AI Configurability

Post by Zutty »

I don't know whether or not AI developers have access to this data of not yet, but if so I was thinking of using this to determine how aggressive my AI should be.

It could use "Hard" (or whatever the highest setting is) for aggressive, tournament winning (I wish! ;) ) performance, but on "Easy" it would just lie back and build pretty road layouts, earning only enough money to stay in business.

Either way the pathfinding and general strategy would be the same, it would just scale the amount of profit it tries to make up and down.
PathZilla - A networking AI - Now with tram support.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: AI Configurability

Post by Zuu »

I'd say either we have fixed configuration options that OpenTTD provides such as it is today with the old AI. Then it is up to the AI-writers to obey them or not. (some could be enforced through)

Or we leave it up to AI writers to via the API register configuration options that then would differ from AI to AI.


In the first case there could be a way for AIs to via the API tell OpenTTD that they don't obey a specific setting so users are aware of it, but the drawback of the first method is that AI-creators are bound to the settings provided by OpenTTD. Before NoAI hit trunk I believe it's still quite easy to influence what will end up as settings, but perhaps not later when NoAI become stable. Via the second way where AI-creators decide the settings they also get a tool that could be useful for debuging.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AI Configurability

Post by Yexo »

AFAIK, each AI will be able to provide some custom settings (a description plus a min / max value) that can be set by the user. The user can for every AI he/she loads set these parameters. A few general settings will remain (building speed for example) which can not be influence by the AI. The main problem at the moment is that nobody like to code the gui for this. If anyone wants to do so, please do and don't hesitate to join #openttd.noai to ask some help.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: AI Configurability

Post by athanasios »

Even if the layer cannot have a GUI to configure the AI, it would be great to have a "random" AI.
It simply gets boring watching the AIs play exactly the same way.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: AI Configurability

Post by TrueBrain »

The last 2 commits answers the initial posters question I think. It boils down to:

via info.nut you can tell which settings an user is allowed to set, and you can read the value via GetSetting() in your AI. The default value for a setting is set by the difficulty level. Cool, ain't it? A GUI for it is coming up soon .. we hope :)
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: AI Configurability

Post by athanasios »

Good news. You made us happy. :]
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: AI Configurability

Post by TrueBrain »

athanasios wrote:Good news. You made us happy. :]
My intention in life: to make you guys happy ;)
The only thing necessary for the triumph of evil is for good men to do nothing.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 14 guests