DictatorAI

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

HGus
Engineer
Engineer
Posts: 95
Joined: 12 May 2013 22:28
Location: Argentina

Re: DictatorAI

Post by HGus » 03 Nov 2015 16:45

... and the same crash, this time shown in 3 instances almost at the same time, I post the screenshot for one instance, the others have the same error. It seems to be something related to upgrading bridges, do you use some internal table to speed up? Maybe the scrip tried to upgrade an unexistent bridge (already destroyed)
Attachments
HGus TT, 1861-09-02.png
3x crashes
(243.57 KiB) Not downloaded yet

krinn
Transport Coordinator
Transport Coordinator
Posts: 336
Joined: 29 Dec 2010 19:36

Re: DictatorAI

Post by krinn » 10 Nov 2015 05:02

Thanks HGus, it "should be" fix in the current dictatorai (going to review that part again to be sure) i will release soon (yeah promise, this week), even not as fine as i wish it to be.

HGus
Engineer
Engineer
Posts: 95
Joined: 12 May 2013 22:28
Location: Argentina

Re: DictatorAI

Post by HGus » 14 Nov 2015 03:17

I just noticed this now. RAIL was not available yet in game, and I disabled rail use for AIs until the first loco comes (around 1850 using UKRS2), but the AI tried upgrading rail bridges even you can see there is no rail bridges in the map as it is shown in the log just one line before... :?

krinn
Transport Coordinator
Transport Coordinator
Posts: 336
Joined: 29 Dec 2010 19:36

Re: DictatorAI

Post by krinn » 23 Nov 2015 05:32

Just to say events and life changes and priorities prevent me for keeping my promise.
Thank for your patience HGUS, if really i couldn't release new version soon, i will fix the bridge handling in old one.

iwans
Engineer
Engineer
Posts: 1
Joined: 26 Apr 2016 18:51

Re: DictatorAI

Post by iwans » 26 Apr 2016 19:06

I was annoyed by constant bridge upgrader crashes so I fixed it. It's my first time seeing OpenTTD scripts/AI so it took me 2-3 hours. Good thing it looks like C++.

File: DictatorAI-169\handler\checks.nut

http://pastebin.com/LSBPjVac
Just overwrite lines 436-438.

I think there was something wrong with foreach loop. And I think it doesn't find rail bridges, only road ones. Don't know if it works as it should, but at least it stopped crashing.
4th line(with speed variable) isn't used, I forgot to delete it.

EDIT: Hmmm, I think I have old version, I downloaded it from online content. Newer version also has foreach loop so maybe it crashes too.

krinn
Transport Coordinator
Transport Coordinator
Posts: 336
Joined: 29 Dec 2010 19:36

Re: DictatorAI

Post by krinn » 27 Apr 2016 09:26

thank you iwans, however i'm afraid your fix is not really good while it might endup with a lucky shot.
changing the way you iter it will not fix out of bound issue. I'm not willing to say i will release the new one soon as i have enough promise it, but the ai is back in my todo list.

xarick
Transport Coordinator
Transport Coordinator
Posts: 269
Joined: 26 Feb 2015 00:52

Re: DictatorAI

Post by xarick » 03 May 2016 20:58

I tested this AI with these parameters to see if it would crash, because I knew it crashes due to bridge upgrading.

DictatorAI = start_date=1,use_road=0

The only thing it could build was airports, aircraft everywhere. It survived 100 years without crashing on my test.
Attachments
Good Battle (DictatorAI), 1st Jan 2051.sav
(314.66 KiB) Downloaded 61 times
openttdCore3.cfg
(10.99 KiB) Downloaded 64 times
Formerly known as Samu

krinn
Transport Coordinator
Transport Coordinator
Posts: 336
Joined: 29 Dec 2010 19:36

Re: DictatorAI

Post by krinn » 07 May 2016 10:23

thx guys for the report, disabling upgrading of bridges would had also avoid the bug.
anyway, i have release 1.83 version of the ai, still trains are disable, but bridge bug is (well, should be) fix in it.

Wormnest
Engineer
Engineer
Posts: 95
Joined: 14 Jul 2013 12:33
Location: Netherlands

Re: DictatorAI

Post by Wormnest » 03 Jul 2016 13:50

DictatorAI seems to have trouble giving correct orders to ships sometimes. On the screenshot the ship has only one dock in its orders and then several depots again and again.
It also seems to think it can use that river to go back to the Sardtown depot. You don't seem to use buoys but that's really necessary to make sure ships don't get lost.
Attachments
Good Battle (DictatorAI), 1965-08-19#1.png
(283.51 KiB) Not downloaded yet

krinn
Transport Coordinator
Transport Coordinator
Posts: 336
Joined: 29 Dec 2010 19:36

Re: DictatorAI

Post by krinn » 04 Jul 2016 10:35

Can you provide a savegame please. the ai doesn't use buoys as ships route are short and shouldn't get lost, but openttd pathfinding could be really act weird when trying to reach a depot, the ai doesn't try to let ships use rivers, nor does openttd, it's just the ships are stuck in front of one.
And it's normal to have multi-orders for the same depot, the ai use orders count to handle orders and less than 3 when going to depot would mean trouble.

once ai is querying ships to stop at a depot, ai no more care if the ship have any valid dock in its orders.

Wormnest
Engineer
Engineer
Posts: 95
Joined: 14 Jul 2013 12:33
Location: Netherlands

Re: DictatorAI

Post by Wormnest » 04 Jul 2016 22:16

Sure, here it is. It uses the development version of my fork of NoCAB for one of the other ai's.
Since your ships seem to get stuck near that river it certainly seems that using buoys could help in finding their path in this case.
Attachments
NoCAB - v2.2b2, 1965-08-19.sav
(614.8 KiB) Downloaded 57 times

Murf437
Engineer
Engineer
Posts: 2
Joined: 06 Nov 2016 17:19

DictatorAI v183 Crash OpenTTD 1.6.1 Large Map 4096x2048 with 14 KIs

Post by Murf437 » 06 Nov 2016 17:35

Second Crash since 1930
Attachments
Tafingford Transport, 23. Jun 1989.png
(176.12 KiB) Not downloaded yet
Tafingford Transport, 24. Jun 1989.png
(171.53 KiB) Not downloaded yet
Tafingford Transport, 25. Jun 1989.png
(167.36 KiB) Not downloaded yet

Murf437
Engineer
Engineer
Posts: 2
Joined: 06 Nov 2016 17:19

DictatorAI v183 Crash OpenTTD 1.6.1 Large Map 4096x2048 with 14 KIs (2)

Post by Murf437 » 06 Nov 2016 18:08

Part 2
Attachments
autosave15.sav
Last Autosave Game before Crash
(14.87 MiB) Downloaded 83 times
Tafingford Transport, 26. Jun 1989.sav
Savegame after Crash
(14.89 MiB) Downloaded 80 times
Tafingford Transport, 26. Jun 1989.png
KI Settings
(134.42 KiB) Not downloaded yet

xarick
Transport Coordinator
Transport Coordinator
Posts: 269
Joined: 26 Feb 2015 00:52

Re: DictatorAI

Post by xarick » 28 Dec 2017 17:48

DictatorAI seems to be removing roads when other companies have road vehicles using his roads. I have set him to remove roads, but I wonder if it's intended to ruin other companies.
Attachments
screenshot#65.png
(252.61 KiB) Not downloaded yet
Formerly known as Samu

KubiG37
Engineer
Engineer
Posts: 1
Joined: 25 Mar 2018 08:05

Re: DictatorAI

Post by KubiG37 » 25 Mar 2018 08:16

Hello, I got around to play OpenTTD after a long time, and one of my favourite AIs crashed after only 2 years! I've never seen this kind of error before. Playing 1.80 RC1 build, and eGRVTS addon.
Attachments
Dictator Crash 1960.png
(648.41 KiB) Not downloaded yet

wagnis
Engineer
Engineer
Posts: 1
Joined: 13 May 2018 18:52

Re: DictatorAI

Post by wagnis » 13 May 2018 18:56

Hi.

First post here. Following orders from the game, I'm here-by reporting an AI error in this thread :)

Thank you for all your great work on this game everyone! :bow:
My fond memories go back to my middle school times in the nineties.
Attachments
openttderror.PNG
openttderror.PNG (14.88 KiB) Viewed 2468 times

vrn
Engineer
Engineer
Posts: 64
Joined: 07 Mar 2018 17:00

Re: DictatorAI

Post by vrn » 13 May 2018 20:05

Sorry, but since the AI developer's latest post is from two years ago, chances for this to be fixed are pretty slim.
I'd suggest you to use a different AI, e.g. NoNoCAB, SimpleAI or CluelessPlus.

xarick
Transport Coordinator
Transport Coordinator
Posts: 269
Joined: 26 Feb 2015 00:52

Re: DictatorAI

Post by xarick » 22 Nov 2018 14:37

DictatorAI v183 on OpenTTD 1.8.0
Excessive CPU usage, a while after loading from a savegame.
Attachments
Unnamed, 2056-10-03.sav
(10.35 MiB) Downloaded 43 times
Unnamed, 2057-02-07.png
(54.99 KiB) Not downloaded yet
Formerly known as Samu

xarick
Transport Coordinator
Transport Coordinator
Posts: 269
Joined: 26 Feb 2015 00:52

Re: DictatorAI

Post by xarick » 12 Apr 2019 14:20

The index '0' does not exist
Attachments
Unnamed, 1966-12-10.png
(788.66 KiB) Not downloaded yet
Unnamed, 1966-12-07.png
(792.83 KiB) Not downloaded yet
Unnamed, 1966-12-22.sav
(5.24 MiB) Downloaded 21 times
Formerly known as Samu

xarick
Transport Coordinator
Transport Coordinator
Posts: 269
Joined: 26 Feb 2015 00:52

Re: DictatorAI

Post by xarick » 26 Apr 2019 16:24

The index '0' does not exist
Attachments
Unnamed, 2036-08-11#1.png
(491.36 KiB) Not downloaded yet
Unnamed, 2036-08-11.png
(497.5 KiB) Not downloaded yet
R09-G04 - DictatorAI vs Chopper - 9,599 days.sav
(137.47 KiB) Downloaded 17 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 2 guests