Issues with ingame AI GUI

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
Chruker
Engineer
Engineer
Posts: 49
Joined: 01 Jun 2009 20:13

Issues with ingame AI GUI

Post by Chruker »

While the ingame AI Debug window does provide some functionality like log display and a fancy reload button there are a some issues I have with the ingame AI handling.

[UI] Ability to chose which specific or random AIs should run in each slot (just like the AI Settings on the title screen).
[UI] Ability to download some AIs from banananananas
[UI] Ability to Rescan the folders for new/updated/downloaded AIs
[UI] Ability to change an AI settings from ingame.

OpenTTD behavior change:
- When loading savegames and you have multiple versions of a AI in your directories then always choose the newest version that support loading of the saved data.
- When an AI crashes there should be a timeout after which the AI slot gets reloaded. Currently the slot is reloaded only if the AI goes bankcrupt. But that can take ages depending on the state of the its company when it crash. EDIT 1: this slot reloading should be possible to disable.

Does anybody else have some issues they wanna voice?
Last edited by Chruker on 19 Jul 2009 11:49, edited 1 time in total.
User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: Issues with ingame AI GUI

Post by Dustin »

Chruker wrote:While the ingame AI Debug window does provide some functionality like log display and a fancy reload button there are a some issues I have with the ingame AI handling.

[UI] Ability to chose which specific or random AIs should run in each slot (just like the AI Settings on the title screen).
[UI] Ability to download some AIs from banananananas
[UI] Ability to Rescan the folders for new/updated/downloaded AIs

OpenTTD behavior change:
- When loading savegames and you have multiple versions of a AI in your directories then always choose the newest version that support loading of the saved data.
- When an AI crashes there should be a timeout after which the AI slot gets reloaded. Currently the slot is reloaded only if the AI goes bankcrupt. But that can take ages depending on the state of the its company when it crash.

Does anybody else have some issues they wanna voice?

As an AI developer I think having the AI get reloaded is a bad idea. I often get several games running on my computer at once to give the AI a good workout. When it crashes I want it to stay put. In fact I would like it better if the game had the option to pause on AI crash. If it was an option, fine, otherwise I like the current behavior.

I would like a GUI to add and remove AI's and change thier settings. For example. I would like to be able to toggle the information signs my AI outputs in debug mode.

-D
Chruker
Engineer
Engineer
Posts: 49
Joined: 01 Jun 2009 20:13

Re: Issues with ingame AI GUI

Post by Chruker »

Dustin wrote:I would like a GUI to add and remove AI's and change thier settings. For example. I would like to be able to toggle the information signs my AI outputs in debug mode.
I knew I had forgotten something. I've added that to the list.
Chruker
Engineer
Engineer
Posts: 49
Joined: 01 Jun 2009 20:13

Re: Issues with ingame AI GUI

Post by Chruker »

How about a command line in the AI window which then send anything you type to the AI::DebugCommand(cmd_string)

You could then use that function to:
- Start construction in some city
- Trigger a closure of a route
- Call print functions which display various internal data
- Trigger an upgrade of a route (ex. electric trains -> maglev)
- basicly do anything which you would currently have to reprogram the AI, then reload and wait for issue.

Ofcourse all functionality would have to be programmed in the AI before it can be used. But the code doesnt have to be disabled/removed between times you need it.

Edit: Implementation wise I'm thinking a queue that works similar to the event queue. If the AI cares it can then check if any commands have been issued.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Issues with ingame AI GUI

Post by Zuu »

You can message with your AI right now. Make your AI create a CLI sign it places somewhere with some text that makes you find it. Change company to the AI-company using cheats. Then rename the sign. The AI has a handle to the sign and can regularly check if it has changed and act on that.

I use limited sign control of PAXLink. To enable breakpoints in PAXLink a sign with a certain text need to be present.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 7 guests