BorkAI

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

marco.r
Engineer
Engineer
Posts: 37
Joined: 16 Aug 2011 01:26

Re: BorkAI

Post by marco.r » 10 May 2016 07:34

Thanks for reporting the bug.
I released a new version that should fix it.

The problem though was caused by the AI not being able to find a proper engine. Can you tell me the train set that you're using ?

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

Re: BorkAI

Post by Wormnest » 10 May 2016 14:49

It was a game without any NewGRF so just the plain vanilla OpenTTD trains. Started the game in 1930. Note that I had inflation on.

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

Re: BorkAI

Post by HGus » 19 May 2016 09:59

It seems that it didn't find a road vehicle for the cargo, not in rail task...

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

Re: BorkAI

Post by xarick » 10 Jun 2016 22:47

I'm testing BorkAI v23 downloaded from bananas, on a 100 year challenge, running on 1.6.1-RC1. The test is still running, it's been ~45 years without issues, but I am concerned about something else: RAM usage is considerably high for BorkAI and it has been slowly ramping up. I estimate that by the end of the test, it will be using 11.6 GB RAM.

The screenshot is showing several other AIs running for different years, BorkAI is the 5th openttd.exe from the list. Still, any of the others that I've tested so far haven't used this much ram. I wonder if it's how Bork works or if there's some memory leak.
Attachments
bandicam 2016-06-10 23-03-22-732.png
(1.22 MiB) Not downloaded yet
openttdCore5.cfg
(11.04 KiB) Downloaded 47 times
BorkAI, 1st Dec 1996.sav
(2.05 MiB) Downloaded 54 times
Last edited by xarick on 11 Jun 2016 16:13, edited 1 time in total.
Formerly known as Samu

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

Re: BorkAI

Post by xarick » 10 Jun 2016 23:28

Update, BorkAI just crashed right after I posted that. There seems to be a limit to how much RAM it can work with and it just reached it.

Not only did BorkAI crash, but the spectating instance I had open to watch the game also closed with network-connection lost. I must have missed it, but for such thing to happen, there must have been a server stall of over 20 seconds, which is the timeout for connection losses.

Working Set is now down to 505.820K. Seems that the limit is somewhere about 3.80 GB to 4.00 GB (4.384.684K - 505.820K = 3.878.886K)?
dbg: [script] The script died unexpectedly.
That's the only line.

EDIT: whole server log
dbg: [net] [core] starting network...
dbg: [net] [core] loading windows socket library
dbg: [net] [udp] initializing listeners
dbg: [net] [core] network online, multiplayer available
dbg: [net] Detected broadcast addresses:
dbg: [net] 0) 192.168.1.255
dbg: [net] [udp] closed listeners
dbg: [net] [udp] initializing listeners
dbg: [net] [udp] closed listeners
dbg: [net] [udp] initializing listeners
dbg: [net] starting listeners for clients
dbg: [net] [tcp] listening on IPv6 port [::]:3984 (IPv6)
dbg: [net] [tcp] listening on IPv4 port 0.0.0.0:3984 (IPv4)
dbg: [net] starting listeners for incoming server queries
dbg: [net] [udp] listening on IPv6 port [::]:3984 (IPv6)
dbg: [net] [udp] listening on IPv4 port 0.0.0.0:3984 (IPv4)
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] listening on IPv4 port 0.0.0.0:0 (IPv4)
dbg: [net] [udp] listening on IPv6 port [::]:0 (IPv6)
dbg: [net] Generating map, please wait...
dbg: [net] Map generation percentage complete: 5
dbg: [net] Map generation percentage complete: 10
dbg: [net] Map generation percentage complete: 15
dbg: [net] Map generation percentage complete: 20
dbg: [net] Map generation percentage complete: 25
dbg: [net] Map generation percentage complete: 30
dbg: [net] Map generation percentage complete: 35
dbg: [net] Map generation percentage complete: 40
dbg: [net] Map generation percentage complete: 45
dbg: [net] Map generation percentage complete: 50
dbg: [net] Map generation percentage complete: 55
dbg: [net] Map generation percentage complete: 60
dbg: [net] Map generation percentage complete: 65
dbg: [net] Map generation percentage complete: 70
dbg: [net] Map generation percentage complete: 75
dbg: [net] Map generation percentage complete: 80
dbg: [net] Map generation percentage complete: 85
dbg: [net] Map generation percentage complete: 90
dbg: [net] Map generation percentage complete: 99
dbg: [net] Map generated, starting game
dbg: [net] [udp] advertising to master server
dbg: [net] [server] Client connected from 84.91.250.188 on frame 1093
dbg: [net] Closed client connection 2
dbg: [net] [server] Client connected from 84.91.250.188 on frame 1164
‎*** Xarick Preto has joined the game (Client #3)
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [server] Client connected from 95.53.231.221 on frame 678772
dbg: [net] Closed client connection 4
dbg: [net] [server] Client connected from 95.53.231.221 on frame 678798
‎*** 123 has joined the game (Client #5)
‎*** 123 has started a new company (#2)
‎*** 123 has left the game (leaving)
dbg: [net] Closed client connection 5
Auto-cleaned company #2 with no vehicles
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [server] Client connected from 87.158.100.237 on frame 750099
Client #6 is dropped because it took longer than 100 ticks to start the joining process
dbg: [net] Client 6 made an error and has been disconnected. Reason: 'general timeout'
dbg: [net] Closed client connection 6
dbg: [net] [server] Client connected from 87.158.100.237 on frame 752631
Client #7 is dropped because it took longer than 100 ticks to start the joining process
dbg: [net] Client 7 made an error and has been disconnected. Reason: 'general timeout'
dbg: [net] Closed client connection 7
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [server] Client connected from 31.133.9.18 on frame 849663
dbg: [net] Closed client connection 8
dbg: [net] [server] Client connected from 31.133.9.18 on frame 849903
‎*** Player has joined the game (Client #9)
dbg: [net] [udp] advertising to master server
‎*** Player has left the game (leaving)
dbg: [net] Closed client connection 9
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
[984788] Client #3 is slow, try increasing [network.]frame_freq to a higher value!
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
‎*** Xarick Preto has left the game (leaving)
dbg: [net] Closed client connection 3
dbg: [net] [server] Client connected from ::1 on frame 1109436
‎*** Xarick Preto has joined the game (Client #10)
[1111454] Client #10 is slow, try increasing [network.]frame_freq to a higher value!
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [script] The script died unexpectedly.
One of the running scripts crashed. Please report this to the script author with a screenshot of the AI/Game Script Debug Window
‎*** Xarick Preto has left the game (leaving)
dbg: [net] Closed client connection 10
dbg: [net] [server] Client connected from 84.91.250.188 on frame 1303406
dbg: [net] Closed client connection 11
dbg: [net] [server] Client connected from 84.91.250.188 on frame 1303503
‎*** Xarick Preto has joined the game (Client #12)
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] advertising to master server
dbg: [net] [udp] removing advertise from master server
dbg: [net] Closed client connection 12
dbg: [net] [server] closed listeners
dbg: [net] [admin] closed listeners
dbg: [net] [udp] closed listeners
dbg: [net] [udp] initializing listeners
dbg: [net] [udp] closed listeners
Formerly known as Samu

marco.r
Engineer
Engineer
Posts: 37
Joined: 16 Aug 2011 01:26

Re: BorkAI

Post by marco.r » 20 Jun 2016 05:56

Thanks for reporting.

I keep some tables for speeding up computations, I guess that either I forgot to cleanup somewhere, or I am just keeping too much information...
I will make a few checks.

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: BorkAI

Post by Kogut » 16 Sep 2016 14:06

BorkAI makes unprofitable aircraft connection (caused by infrstructure maintemance costs).
Attachments
Unnamed, 18th Oct 2064.sav
(128.72 KiB) Downloaded 42 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

marco.r
Engineer
Engineer
Posts: 37
Joined: 16 Aug 2011 01:26

Re: BorkAI

Post by marco.r » 07 Oct 2016 06:33

I have been busy lately so I had no chance to make fixes; I will try as soon as I have more free time.
Meanwhile you can disable the use of planes from the AI settings if you prefer so.

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest