Why OpenTTD should have a default 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
User avatar
Wuzzy
Engineer
Engineer
Posts: 17
Joined: 18 Aug 2019 18:04

Why OpenTTD should have a default AI

Post by Wuzzy » 18 Aug 2019 18:24

Currently, when you install a fresh OpenTTD, you will find a major feature missing: AI. There's no AI. :( So if you just jump into the game like you used to in TTD, you will be forever alone. Without competition the game is kinda boring.

OK, of course that was a lie. Of course there's AI. What I actually mean is that there is no AI by default. But that's the problem! I know what I am supposed to do, i.e., download an AI from the download section, but that's besides the point.

My problem is that the way this is currently implemented is user-unfriendly. There are several problems:
  • :!: The lack of a functioning default AI is a major downgrade compared to TTD. This is a direct violation of one of the official goals: “Replicate the original gameplay”
  • Computer enemies do not work out of the box. They require additional installation and configuration. This is bad usability, and I don't see why.
  • (apparent) lack of quality control. There are a couple of AIs that are just outright broken and crash and completely ruin the game! Yet they appear in the in-game download service.
  • Too much trial-and-error: There are a lot of AIs, and many of them are not general-purpose. It will take players a lot of time until you finally find an AI that you can actually use to play against. Many AIs are too specialized, which is fine, but normally you want opponents that at least are capable of using all modes of transportation. Having a default AI would take the burden of “reseach” off the player
  • Annoying to get rid of “bad” AIs: If you have downloaded an AI that is bad (crashes, too many bugs), it's annoying to get rid of it again. It seems you must go into the OS's file system for that … :(
  • Of those AIs that are not outright broken, still many are not very good. Some AIs just do silly or annoying things, like placing annoying signs everywhere, or even advertisements, or giving their stations crazy names with long complicated number codes that just feel “unnatural”. Or they place stations in insane places where they just don't make sense. Nothing really game-breaking, but these minor annoyances add up
  • I don't know if it's true, but I don't know how many newbies completely fail to realize they are supposed to open the extensions menu to get a functioning AI. I mean, the game doesn't tell them. They will probably just start playing without AI, wondering where the other companies are …
  • AI development seems to be completely outsourced to the community. So IMHO most AIs don't seem to be held to high quality standards in general. Correct me if I'm wrong.
Therefore, I suggest to include at least one good, general-purpose, high-quality AI by default, and that this AI will be enabled by default. This AI must work out of the box in a fresh install, no additional installation, download or configuration required. Of course, I do NOT suggest to abolish the add-on system at all, just to make OpenTTD playable out of the box.

Wish list for a default AI:
  • Be high-quality overall and be held to the same standards as OpenTTD itself
  • Support all 4 modes of transportation (that doesn't mean it always has to use all of them in a game, only that it's capable of)
  • Support all vehicles
  • Support all industries and goods
  • Support all important buildable things
  • Connect industries and cities
  • Do nothing silly or annoying, like spamming with signs, use crazy station names, etc.
  • Never crash
  • Be suitable for a classic game of OpenTTD
  • Be more or less be like TTD's AI (as long it makes sense; the goal of OpenTTD is being a TTD clone, after all)
  • Bonus points for having a difficulty setting
Maybe one of the existing AIs already checks most or all of the boxes and just requires little modification to be “promoted” to default status. :)

TBH, I am quite surprised that OpenTTD managed it to version 1.9.2 yet that such a core feature is kind of “tricky” to get to work … :roll:

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6581
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Why OpenTTD should have a default AI

Post by Redirect Left » 18 Aug 2019 21:26

There definitely should be a decent AI active by default when you download OpenTTD. I tried to introduce a friend to OpenTTD and he got so confused by the AI stuff and finding a decent AI in the online files he just gave up.

A lot of the AI on the forums here eventually error out with varying errors, entirely ruining things after sometimes a long play with them. It seems to be usually related to them eventually struggling to do X or Y within a CPU timeframe the game is happy about.
As a secondary point, making an AI is very tricky and silly difficult to do, i've tried a few times but within an hour got bored of even trying, its just an odd language and way of creating something i find.
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

User avatar
Wuzzy
Engineer
Engineer
Posts: 17
Joined: 18 Aug 2019 18:04

Re: Why OpenTTD should have a default AI

Post by Wuzzy » 18 Aug 2019 23:44

Thanks for your answer! Heh, turns out I was completely right about the usability argument. To be clear, I am a power user and I usually don't get confused by this stuff. But I know crappy UX when I see it. That's the whole point of having a default. :)

Anyway: Well, who says you need to make the AI from zero? There's already a couple of readily-available AIs, so I'd say just pick one that is closest to being a reasonable default AI, and build on that.

I also suggest to not be perfectionistic about it, at first. Just make sure it doesn't crash and ruin the game first and behaves semi-reasonable. The rest can come over time … Otherwise, we will never have a default AI for years to come because of whatever.

IMO having a mediocre default AI is still 1000 times better than having no AI at all and having newbies being confused forever. Heck, this system even sucks for advanced users such as me, I just don't want to try out dozens of AIs, many of which are crap.

I think SimpleAI seems like a good start. But I haven't tried out many general-purpose AIs yet. Please suggest other AIs that could be a potential default (after fixing, cleanup, etc.).

Slightly off-topic, I think the whole list of downloadable AIs needs to be curated. At the very least, all crashing AIs should be banned, no exceptions. There's absolutely no point in providing broken add-ons. Even worse: It ruins the gameplay experience to have an AI die in the middle of a game.

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6581
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Why OpenTTD should have a default AI

Post by Redirect Left » 19 Aug 2019 00:30

Wuzzy wrote:
18 Aug 2019 23:44
I just don't want to try out dozens of AIs, many of which are crap.
I'd personally recommend 'AIAI' & 'ChooChoo', they're relatively decent at making competant rail networks, and make enough money to expand rapidly (which is all i care about in an AI), but as time goes by both are likely to eventually error out with the issue of taking too long to decide something. Both also suffer from zero respect of road vehicles, and will happily place tracks over roads that are actively used by RVs and crash into them, even if its their own vehicles. I don't know if this is because AI simply cannot get the 'history' of a road to know if its actively being used or not, or a lack of care by the creators to always use bridges anyway.

My understanding of AIs is that the issue where they crash due to taking too long to do X or Y is relatively easy to fix when you understand the way the Ai is made (i struggle here as a lot of AIs don't have reasonable commenting on the code). 'ChooChoo' is one of the ones i have tried to modify, but ran into this.
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4740
Joined: 09 Sep 2007 05:03
Location: home

Re: Why OpenTTD should have a default AI

Post by Alberth » 23 Aug 2019 14:29

Wuzzy wrote:
18 Aug 2019 18:24
TBH, I am quite surprised that OpenTTD managed it to version 1.9.2 yet that such a core feature is kind of “tricky” to get to work … :roll:
So how to decide which one should be default?

Note that all AIs are made by volunteers, and you want a fair process where everybody has an equal chance. Being part of the standard distribution is a huge advantage to other equally hard working AI developers.


One step further, so you aim for a replacement of the original AI, but why? Wouldn't it be better if you could choose the kind of AI you want? If yes, how would the process work then?
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6581
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Why OpenTTD should have a default AI

Post by Redirect Left » 24 Aug 2019 00:23

Alberth wrote:
23 Aug 2019 14:29
One step further, so you aim for a replacement of the original AI, but why? Wouldn't it be better if you could choose the kind of AI you want? If yes, how would the process work then?
In that case, would be better to have the default AI have parameters so you can essentially tweak the behaviour to what you're looking for, i'd suggest three levels.

Beginner - The bot acts similar to the original AI, not very good, a lot more A than I, but it gets itself up and running and just about maintains a very basic rail network mostly bolstered by RVs.
Amateur - Bot starts to act in more sensible manners, starts to use trains more than RVs, mixes point to point network with small mostly sensible networks.
Pro - Bot goes to max, it attempts to make a full network similar to how a lot of real players play (and how the AIs 'ChooChoo' & 'AiAi' work currently, they're very impressive as far as I feel, from what i have found in other AI)

Difficult thing would be to make an AI that can act in three different levels depending on what the user wants. But i feel this will always be the more user friendly way of handling it, instead of them having to trawl through many different AI to find one that is stable and does what they want. At bare minimum there should be a team of people that test AIs and remove or mark an AI as possibly not fully working, and a little red alert triangle comes up next to the AIs name in the list of downloadble AIs, allowing it to be still downloaded for people to play with or look at what is wrong and repairing it, but notifying the less advance users that they may want to look a bit further.
Perhaps getting some volunteers to run a game with many bots will quickly weed out the faulty ones, i recently did this whilst i was trying to learn AI code, although the bots in those screenshots i'd still mark as "working", as they didn't error just acted... interestingly. I'd be happy to make up such a group if there was a desire to get together a list of AI known to function without errors in the long haul, whether to make an ingame notification / alert, or just a list here on TT-F. Nothing worse than many many years into your game the AI that is doing so well errors and gets wiped and your map looks a ghost zone. If done, perhaps later on we can also attempt to fix those with licences that allow us to do so, if there is an audience for that specific AI.
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

Auge
Transport Coordinator
Transport Coordinator
Posts: 383
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Why OpenTTD should have a default AI

Post by Auge » 26 Aug 2019 07:20

Hello
Wuzzy wrote:
18 Aug 2019 18:24
Currently, when you install a fresh OpenTTD, you will find a major feature missing: AI. There's no AI. :( So if you just jump into the game like you used to in TTD, you will be forever alone. Without competition the game is kinda boring.

OK, of course that was a lie. Of course there's AI. What I actually mean is that there is no AI by default. But that's the problem! I know what I am supposed to do, i.e., download an AI from the download section, but that's besides the point.
I played OpenTTD for the first time at a time when the rewrite of the original AI was part of the game and it was a godsend that I was able to deactivate the AI and to play without any dumb AI-based disturbance. Nowadays, when the game has an adult multiplayer mode and is nicely playable without an AI, the computerised opponents IMHO do not play the major role in OpenTTD-game-playing that you proclaim.

Tschö, Auge

User avatar
Wuzzy
Engineer
Engineer
Posts: 17
Joined: 18 Aug 2019 18:04

Re: Why OpenTTD should have a default AI

Post by Wuzzy » 26 Aug 2019 11:54

So how to decide which one should be default?
One that ticks off all the boxes and basically provides good gameplay in the vanllia game. Have you not read my post?

The first goal is to have at least something that works out of the box and does not crash every 5 minutes, like many AIs do. This thing is partially an usability issue as well.
Note that all AIs are made by volunteers, and you want a fair process where everybody has an equal chance.
Why not making AI development (of the default AI) part of the official project then? So the AI will be considered part of OpenTTD and must go through the same level of scrutiny and quality control as anything else. If AI bugs are just outsourced, they will just linger forever and never get fixes, because nobody takes responsibility.

It's very possible to pick up one of the existing AIs, one that is closest to the wishlist, and fork it for official development. The default AI could be started from scratch, but it doesn't have to.

I already said it and I say it again: IMO it's important to not be perfectionistic about the default AI for now. Otherwise we will never have a default AI. The default AI is also NOT an AI that must be able to support absolutely everything, like support all obscure NewGRFs. The default AI should be a good starting point for the vanilla game, nothing more. It is NOT intended to replace the add-on AIs or to make them irrelevant. Players will likely continue to install and download AIs. The default AIs is something for the new players which just want to instantly jump into action.
(…) and you want a fair process where everybody has an equal chance. Being part of the standard distribution is a huge advantage to other equally hard working AI developers.
First, filter out all AIs that crash or do something insane or annoying (like sign spam). Congratulations! You already narrowed down the number of candidates a lot. :D
Then, check which AIs fit the wishlist the best and would best fit for a vanilla game experience. If the winner is of decent quality, pick it, and then fork it and fix the remaining issues.
In that case, would be better to have the default AI have parameters so you can essentially tweak the behaviour to what you're looking for, i'd suggest three levels.
This is a very good idea indeed. A difficulty setting is very good. Yeah, a good default AI is one that many players will enjoy. Parameters are an excellent way to handle this.
One step further, so you aim for a replacement of the original AI, but why? Wouldn't it be better if you could choose the kind of AI you want? If yes, how would the process work then?
I'm not the one who dumped the default AI! Also, I didn't say re-using the original AI is not an option. However, the “real” original AI won't come back anyway, as it cheated a lot. You probably meant SimpleAI, right? SimpleAI might be a starting point. But there are other potential candidates.
I played OpenTTD for the first time at a time when the rewrite of the original AI was part of the game and it was a godsend that I was able to deactivate the AI and to play without any dumb AI-based disturbance.
IIRC, we can disable the AI for waaaaay longer than that, iirc it was even that way in original TTD. Of course, the option to not play with any AI will always exist, this is not up to debate.
Nowadays, when the game has an adult multiplayer mode and is nicely playable without an AI, the computerised opponents IMHO do not play the major role in OpenTTD-game-playing that you proclaim.
Maybe not to you! But many players do not want to play online! Not everyone thinks like you! Original TTD was mostly a singleplayer game. Yes, multiplayer is a nice feature, but it shouldn't be an excuse to completely neglect singleplayer. Just because you don't care about singleplayer anymore doesn't mean that nobody does. Also, the multiplayer community is small (I never see more than about 12 players at once).

User avatar
andythenorth
Tycoon
Tycoon
Posts: 4973
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Why OpenTTD should have a default AI

Post by andythenorth » 26 Aug 2019 16:15

Wuzzy wrote:
26 Aug 2019 11:54
So how to decide which one should be default?
One that ticks off all the boxes and basically provides good gameplay in the vanllia game. Have you not read my post?
That’s defining an outcome, not the method :wink:

Which AI would you propose as the default?? There are several.

Auge
Transport Coordinator
Transport Coordinator
Posts: 383
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Why OpenTTD should have a default AI

Post by Auge » 26 Aug 2019 20:43

Hello
Wuzzy wrote:
26 Aug 2019 11:54
I played OpenTTD for the first time at a time when the rewrite of the original AI was part of the game and it was a godsend that I was able to deactivate the AI and to play without any dumb AI-based disturbance.
IIRC, we can disable the AI for waaaaay longer than that, iirc it was even that way in original TTD. Of course, the option to not play with any AI will always exist, this is not up to debate.
When I played TT, it was absolutely no option to disable the AI. So OpenTTD was my first encounter of that feature. Not TTD and not the patch.
Wuzzy wrote:
26 Aug 2019 11:54
Nowadays, when the game has an adult multiplayer mode and is nicely playable without an AI, the computerised opponents IMHO do not play the major role in OpenTTD-game-playing that you proclaim.
Maybe not to you! But many players do not want to play online! Not everyone thinks like you! Original TTD was mostly a singleplayer game. Yes, multiplayer is a nice feature, but it shouldn't be an excuse to completely neglect singleplayer. Just because you don't care about singleplayer anymore doesn't mean that nobody does. Also, the multiplayer community is small (I never see more than about 12 players at once).
Yes, not every one thinks like me. But also not everybody thinks like you. The portion of online players might be small but so it seems (at least) to me is the portion of players who uses an AI as opponent. I wanted only to suggest that your opinion is not the imperative "truth" like you presented it. So as noone elses.

Tschö, Auge

rowdog
Engineer
Engineer
Posts: 57
Joined: 24 May 2017 12:51
Location: East Texas

Re: Why OpenTTD should have a default AI

Post by rowdog » 27 Aug 2019 11:45

Alberth wrote:
23 Aug 2019 14:29
So how to decide which one should be default?
Ask xarick, he's been testing the AIs and reporting bugs for a long time. What are the top 5 in all those competitions? Use a forum poll to vote for a winner from the top 5. It's not really a hard question when approached with a combination of testing + voting.

Not that I'd ever use it, I don't like playing with AIs.

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

Re: Why OpenTTD should have a default AI

Post by planetmaker » 27 Aug 2019 12:44

TLDR: yes, it should have a default AI.

More in detail:

Arguably having no AI by default is a bit boring (and also a deviation from OpenTTD's origin) - yet a decision for a certain AI is difficult. However it might improve the new player experience when there is at least some AI by default - after all a default would not change the way anyone can play the game. It might work similar to how base sets are chosen with a change to default settings.Thus a change to defaults would not stop playing anyone the way he or she likes - but give new players a different start, a more whole game experience.

There is one chance currently to grab: We have currently a request from a company to actually sponsor some kind of competition around christmas - which can also be an AI competition.That could in fact be used to decide on a default. Maybe a default AI could last as long as the titlegames do last: one default for a complete cycle of one major release cycle and make a similar competition an annual event?

Is there someone willing and with enough time to actually organize this event? I shall be more than happy to forward the corresponding e-mail.

Cheers,
planetmaker
This is just my personal 2ct and does not reflect the opinion of anyone else.

User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1506
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Why OpenTTD should have a default AI

Post by SirkoZ » 10 Oct 2019 09:28

Alberth wrote:
23 Aug 2019 14:29
Wuzzy wrote:
18 Aug 2019 18:24
TBH, I am quite surprised that OpenTTD managed it to version 1.9.2 yet that such a core feature is kind of “tricky” to get to work … :roll:
So how to decide which one should be default?

Note that all AIs are made by volunteers, and you want a fair process where everybody has an equal chance. Being part of the standard distribution is a huge advantage to other equally hard working AI developers.


One step further, so you aim for a replacement of the original AI, but why? Wouldn't it be better if you could choose the kind of AI you want? If yes, how would the process work then?
That's very simple - Brumi's SimpleAI should be default - it is reimplementation of the old TTD AI and more. :idea:

I just remembered - the alternative to SimpleAI would be Yexo's AdmiralAI because it implements as many AI functions as possible and it does it very well; ships can also be added to it if need be...

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests