Page 1 of 1

[AI] Mungo - Grinchios

Posted: 02 May 2021 23:17
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:

Re: [AI] Mungo - Grinchios

Posted: 03 May 2021 09:29
by perverted monkey
Happy to have you among us!

Re: [AI] Mungo - Grinchios

Posted: 09 May 2021 20:22
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

Re: [AI] Mungo - Grinchios

Posted: 13 May 2021 05:21
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!

Re: [AI] Mungo - Grinchios

Posted: 13 May 2021 20:44
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