[AI] Mungo - Grinchios

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
grinchios
Engineer
Engineer
Posts: 3
Joined: 02 May 2021 23:02

[AI] Mungo - Grinchios

Post by grinchios »

Hi Everyone

I made an AI called Mungo in 2017 kind of as a joke but mostly because I was starting programming and really liked OTTD, so the best way to practice in my mind was to make something in the game. I originally copied WrightAI and in my mind improved on it slightly (very very very slightly if at all), and noticed in 2019 there were a few AI competitions that my AI was entered into which was amazing. I'm getting back into the game and will be starting to develop the AI a bit more so if anyone has suggestions or feature requests, pile them in here and I'll see what I can do.

First of all, I'll be reacquainting myself with the language and the code, and then I'll get to improving it. :D :D

ps. hope this is in the correct format it's my first post here :lol:
perverted monkey
Traffic Manager
Traffic Manager
Posts: 161
Joined: 02 Mar 2009 02:07

Re: [AI] Mungo - Grinchios

Post by perverted monkey »

Happy to have you among us!
User avatar
grinchios
Engineer
Engineer
Posts: 3
Joined: 02 May 2021 23:02

Re: [AI] Mungo - Grinchios

Post by grinchios »

Version 5 is now live and you should be able to try the new update soon. Here's what's changed!
- Overhauled the codebase to an Object-Oriented version
- Uses mail planes too now
- Needs some work on where the AI builds airports but this version is so much better than version 4

The major change is now the AI will somewhat intelligently upgrade routes that need to be upgraded. It also will utilize all the mail piling high inside the airports which in the past it had ignored.

If anyone has any feature suggestions or issues with it let me know and I'll see what I can do. :D

https://github.com/grinchios/OpenTTD-AI
------------------------------------------------------------------------------------------------------------------------------------
My Github of student stuff / personal projects you might find interesting
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: [AI] Mungo - Grinchios

Post by PikkaBird »

I tried out your AI!

The version on bananas currently crashes immediately on startup because it's trying to include an empty file, util/load.nut.

When I fixed that, I found that it wouldn't loan enough money to build the (av9) plane it wants to buy, so sits and does nothing. This is because it assumes $150,000 is enough to buy the plane instead of checking how much the plane costs.

It's a good start, looking forward to the next version!
User avatar
grinchios
Engineer
Engineer
Posts: 3
Joined: 02 May 2021 23:02

Re: [AI] Mungo - Grinchios

Post by grinchios »

PikkaBird wrote: 13 May 2021 05:21 I tried out your AI!

The version on bananas currently crashes immediately on startup because it's trying to include an empty file, util/load.nut.

When I fixed that, I found that it wouldn't loan enough money to build the (av9) plane it wants to buy, so sits and does nothing. This is because it assumes $150,000 is enough to buy the plane instead of checking how much the plane costs.

It's a good start, looking forward to the next version!
Thanks PikkaBird I really appreciate you giving my AI a go! I do my testing without newgrfs and hadn't had that issue before but I've verified the AI does struggle with av8 and av9 but I've removed the station 150,000 limit so it now checks for the actual cost of a plane. I'll do some more testing but thank you for pointing it out and the issue will be fixed soon :D
------------------------------------------------------------------------------------------------------------------------------------
My Github of student stuff / personal projects you might find interesting
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 12 guests