CPU 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

Post Reply
mousetail
Engineer
Engineer
Posts: 20
Joined: 22 Mar 2014 08:45

CPU AI

Post by mousetail »

Trujillo Transport, 15th Oct 1951.png
2 of them completing the same subsidy
(140.58 KiB) Downloaded 2 times
I just made a road AI.
It builds road routes in the biggest cities and completes subsidies.
Please tell me what you think of it.
Attachments
CPU1.tar
(21.5 KiB) Downloaded 1438 times
Last edited by mousetail on 25 Mar 2014 12:51, edited 4 times in total.
my AI: CPU, SnakeAI
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: CPU AI

Post by Brumi »

When downloaded from bananas, it doesn't show up in the list of AIs. I believe AIInfo::GetVersion should return an integer.

Anyway, in my first game, it built a station which is inaccessible from the road. The poor bus cannot make a profit.
station.png
station.png (62.41 KiB) Viewed 13825 times
Sometimes it really spams the area with debug signs, and the buses are running without orders:
debug signs.png
debug signs.png (279.45 KiB) Viewed 1919 times
mousetail
Engineer
Engineer
Posts: 20
Joined: 22 Mar 2014 08:45

Re: CPU AI

Post by mousetail »

thanks for responding so quicly, I actually uploaded a wrong version, so it should work on bananas now. I will work on making more settings.

edit: Did it
my AI: CPU, SnakeAI
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: CPU AI

Post by krinn »

mousetail, don't let Brumi try your AI, his computer always manage to let your ai fail at connecting a station on slopes ! It's like a special skill
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: CPU AI

Post by Brumi »

:lol:
So true...
mousetail
Engineer
Engineer
Posts: 20
Joined: 22 Mar 2014 08:45

Re: CPU AI

Post by mousetail »

Version 1.2 released. It now replaces crashed/old vehicles and destroys vehicles that don't make a profit. I hope to release 2.0 at the end of the week, that actually makes a profit.
my AI: CPU, SnakeAI
mousetail
Engineer
Engineer
Posts: 20
Joined: 22 Mar 2014 08:45

Re: CPU AI

Post by mousetail »

New version. Now builds drive-through road stations and checks if subsidies are profitable before completing them, as well as some bug fixes with checking if orders are valid before completing them. I got delayed because my computer broke so version 2 will have to come later.
my AI: CPU, SnakeAI
noname1208
Engineer
Engineer
Posts: 5
Joined: 13 Oct 2014 23:38

Re: CPU AI

Post by noname1208 »

It's a good AI, but one suggestion would be to have the debug signs turned off by default as I have seen close to a hundred signs produced around a town before and when choosing random AI's I cannot tell it myself to disable debug signs.

Overall though I like it
potatomy
Engineer
Engineer
Posts: 1
Joined: 16 Nov 2015 02:58

Re: CPU AI

Post by potatomy »

This AI is awesome! :bow: It's not too hard to compete against, but doesn't act stupid. Good for new and experienced players. :) The signs that say stuff like "build depot" kinda get in the way. :|
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: CPU AI

Post by Alberth »

You can simply hide signs by other players
Being a retired OpenTTD developer does not mean I know what I am doing.
xarick
Transport Coordinator
Transport Coordinator
Posts: 335
Joined: 26 Feb 2015 00:52

Re: CPU AI

Post by xarick »

Spamming bus stations
Attachments
autosave10.sav
(1.58 MiB) Downloaded 354 times
CPU #16, 1994-12-24.png
CPU #16, 1994-12-24.png (151.61 KiB) Viewed 9222 times
openttdCore5.cfg
(11.03 KiB) Downloaded 298 times
Formerly known as Samu
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 6 guests