Page 3 of 4

Re: BorkAI

Posted: 13 Jun 2013 19:32
by marco.r
Phrossi_TTD wrote:
R-TEAM wrote:Hi,

The AI runs pretty good ...
But after an load of an savegame he crashes first time .... then after reload of AI it runs nice again ...
This happen every load of an save.
Actual HardGame version ... many NewGFX ...
Savegame + pictures included.

Regards
R-TEAM
same here, loaded 1913 save and crash!
see attachments below.
it needs last FISH and 2cc trainset nightly at devzone at http://bundles.openttdcoop.org/
The release you had (16) was still bugged. I've tried with the latest (rel 17) and seem lo load fine
(the AI doesn't do very well though... I'll have to start testing with nonstandard vehicles...).
Please let me know if you have issues with the latest too.

Re: BorkAI

Posted: 23 Dec 2013 10:45
by marqjc
After installing the BorkAI-17 found that it defends pretty well, making the game a very enjoyable game. No operational problems presented, beyond the occasional jam, you can spend a good time with Bork! :)


Image

Re: BorkAI

Posted: 23 Dec 2013 11:56
by marco.r
Glad to know that you liked it :)
Do you have a savegame with the jam ?
I'll try to put a "jam cleanup" mechanism during the holidays

Re: BorkAI

Posted: 23 Dec 2013 21:27
by marqjc
marco.r wrote:Glad to know that you liked it :)
Do you have a savegame with the jam ?
I'll try to put a "jam cleanup" mechanism during the holidays
I attached a savegame where you can see the jam. Other than that ... if that Bork is gaining impresses, me is just a momentary thing. :D

Happy holidays!

Re: BorkAI

Posted: 07 Apr 2014 22:13
by HGus
Hi, nice AI, it was in first place in one of my games for 35 years, even over older Clueless, but for some strange reason it forgot to renew their vehicles, going bankrupt. Maybe a bug, maybe bad luck. I was using FIRS/eGVRTS2 on a almost flat 1024x1024 map.

Re: BorkAI

Posted: 15 Apr 2014 21:11
by marco.r
Hi, first of all sorry for the lack of updates.
Yes, it's a bug. As the time progresses the AI tries harder to find new routes, leaving less and less time of "maintenance actions".
This means that the AI will "forget" to do things like renew trucks (they will age, as HGus experienced) or sell them when they are too much (this was marqjc's problem). A quick workaround is to save the game and reload, the AI will start using little time for planning again, and in fact reloading marqjc's savegame seemed to solve the problem. (My AI gives an error in MGus' savegame, I'll try to understand what causes it)

I'll make a fix that should solve both problems, even if it may make the AI a bit less smart.

Re: BorkAI

Posted: 20 Oct 2014 08:40
by genericnpc927
i think i broke something

Image

i was just casually playing and this happened

Re: BorkAI

Posted: 21 Oct 2014 08:48
by Hafting
I got the same crash. The bug report is identical down to the first [cargo]. After that, the words are still the same but the numbers vary. I guess I have a different map and possibly different newgrfs.

Code: Select all

dbg: [script] [4] [S] Your script made an error: You are not allowed to execute any DoCommand (even indirect) in your constructor, Save(), Load(), and any valuator.
dbg: [script] [4] [S] 
dbg: [script] [4] [S] *FUNCTION [GetEngineFor()] borkai-18/transport/trucks.nut line [201]
dbg: [script] [4] [S] *FUNCTION [NeededVehicles()] borkai-18/utils/route.nut line [150]
dbg: [script] [4] [S] *FUNCTION [CheckCurrentRoutes()] borkai-18/main.nut line [484]
dbg: [script] [4] [S] *FUNCTION [ManageTransports()] borkai-18/main.nut line [436]
dbg: [script] [4] [S] *FUNCTION [Start()] borkai-18/main.nut line [762]
dbg: [script] [4] [S] 
dbg: [script] [4] [S] [cmp] CLOSURE
dbg: [script] [4] [S] [isNotArticulated] CLOSURE
dbg: [script] [4] [S] [canTransport] CLOSURE
dbg: [script] [4] [S] [isTruck] CLOSURE
dbg: [script] [4] [S] [engineList] ARRAY
dbg: [script] [4] [S] [cargo] 13
dbg: [script] [4] [S] [this] INSTANCE
dbg: [script] [4] [S] [this] INSTANCE
dbg: [script] [4] [S] [@ITERATOR@] 23
dbg: [script] [4] [S] [route] INSTANCE
dbg: [script] [4] [S] [@INDEX@] 22
dbg: [script] [4] [S] [this] INSTANCE
dbg: [script] [4] [S] [this] INSTANCE
dbg: [script] [4] [S] [balance] 21255
dbg: [script] [4] [S] [me] INSTANCE
dbg: [script] [4] [S] [monthly] INSTANCE
dbg: [script] [4] [S] [this] INSTANCE
dbg: [script] The script died unexpectedly.
dbg: [script] [3] [S] Your script made an error: You are not allowed to execute any DoCommand (even indirect) in your constructor, Save(), Load(), and any valuator.
dbg: [script] [3] [S] 
dbg: [script] [3] [S] *FUNCTION [GetEngineFor()] borkai-18/transport/trucks.nut line [201]
dbg: [script] [3] [S] *FUNCTION [EstimateDays()] borkai-18/transport/all.nut line [68]
dbg: [script] [3] [S] *FUNCTION [EstimateGain()] borkai-18/transport/all.nut line [45]
dbg: [script] [3] [S] *FUNCTION [findIndustryRoutes()] borkai-18/main.nut line [250]
dbg: [script] [3] [S] *FUNCTION [FindPossibleRoute()] borkai-18/main.nut line [374]
dbg: [script] [3] [S] *FUNCTION [CreateNewRoutes()] borkai-18/main.nut line [529]
dbg: [script] [3] [S] *FUNCTION [ManageTransports()] borkai-18/main.nut line [438]
dbg: [script] [3] [S] *FUNCTION [Start()] borkai-18/main.nut line [762]
dbg: [script] [3] [S] 
dbg: [script] [3] [S] [cmp] CLOSURE
dbg: [script] [3] [S] [isNotArticulated] CLOSURE
dbg: [script] [3] [S] [canTransport] CLOSURE
dbg: [script] [3] [S] [isTruck] CLOSURE
dbg: [script] [3] [S] [engineList] ARRAY
dbg: [script] [3] [S] [cargo] 18
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] [3] [S] [distanceInKm] 9296
dbg: [script] [3] [S] [distance] 14
dbg: [script] [3] [S] [cargo] 18
dbg: [script] [3] [S] [to] 150315
dbg: [script] [3] [S] [from] 155439
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] [3] [S] [distance] 14
dbg: [script] [3] [S] [cargo] 18
dbg: [script] [3] [S] [to] INSTANCE
dbg: [script] [3] [S] [from] INSTANCE
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] [3] [S] [@ITERATOR@] 1
dbg: [script] [3] [S] [transport] INSTANCE
dbg: [script] [3] [S] [@INDEX@] 0
dbg: [script] [3] [S] [@ITERATOR@] 26
dbg: [script] [3] [S] [to] INSTANCE
dbg: [script] [3] [S] [@INDEX@] 25
dbg: [script] [3] [S] [@ITERATOR@] 2
dbg: [script] [3] [S] [from] INSTANCE
dbg: [script] [3] [S] [@INDEX@] 1
dbg: [script] [3] [S] [consumers] ARRAY
dbg: [script] [3] [S] [producers] ARRAY
dbg: [script] [3] [S] [cargo] 18
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] [3] [S] [@ITERATOR@] 0
dbg: [script] [3] [S] [cost] NULL
dbg: [script] [3] [S] [@INDEX@] 0
dbg: [script] [3] [S] [cargo] 18
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] [3] [S] [@ITERATOR@] 0
dbg: [script] [3] [S] [route] NULL
dbg: [script] [3] [S] [@INDEX@] 0
dbg: [script] [3] [S] [@ITERATOR@] 2
dbg: [script] [3] [S] [cargo] INSTANCE
dbg: [script] [3] [S] [@INDEX@] 1
dbg: [script] [3] [S] [routes] ARRAY
dbg: [script] [3] [S] [cargoList] ARRAY
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] [3] [S] [balance] 102001
dbg: [script] [3] [S] [me] INSTANCE
dbg: [script] [3] [S] [monthly] INSTANCE
dbg: [script] [3] [S] [this] INSTANCE
dbg: [script] The script died unexpectedly.
Openttd 1.4.3
Newgrfs in use:
Random Norwegian Town Names
Squid Ate FISH squid-rc-3
Reduced Passenger Payment v1.0
Raise landscaping costs
FIRS Industry Replacement Set 2014-08-18 (5343:d77201428bc1)
av8 Aviators Aircraft Set
Industrial Stations Renewal 0.9.4
GRVTS v1.4 32bpp
L85 Roads
OpenGFX+ Trains 2014-01-07 (5120:5e0aa5e5e790)
32bpp extra zoom complete graphics

Re: BorkAI

Posted: 21 Oct 2014 09:09
by marco.r
Thanks to both for the report. I have an updated version in the works that should fix this bug (and some others) and also add better support for aircrafts and trams.
At this point, I will try to release it as soon as possible.

Re: BorkAI

Posted: 26 Oct 2014 23:13
by marco.r
I uploaded a new version.

This version fixes a few bugs, and enables by default use of aircrafts.
I added also support for trams. It is not enabled by default because there are a few blatant bugs that I have to iron out.

Re: BorkAI

Posted: 08 Nov 2014 04:00
by HGus
Thanks. :)

Re: BorkAI

Posted: 15 Feb 2015 19:32
by nobix
Image

I get this everytime i've closed the game and start it up and load a game with the AI in it.

Re: BorkAI

Posted: 15 Feb 2015 22:53
by marco.r
nobix wrote:Image

I get this everytime i've closed the game and start it up and load a game with the AI in it.
I uploaded a new version with a fix. Please check if you can load the games correctly now.

Re: BorkAI

Posted: 08 Aug 2015 20:33
by Core Xii
This AI seems to perform very poorly compared to other AIs.
Unnamed, Apr 24th, 1964.png
Unnamed, Apr 24th, 1964.png (97.74 KiB) Viewed 1070 times

Re: BorkAI

Posted: 09 Aug 2015 18:52
by marco.r
Core Xii wrote:This AI seems to perform very poorly compared to other AIs.
Unnamed, Apr 24th, 1964.png
Unfortunately... yes :D, the performance depends greatly on the parameters, often it doesn't perform well :oops:
(mostly because search for new trade routes can be slow).

Do you have at hand the parameters you used for that game ? (Map size, sets etc...)

Re: BorkAI

Posted: 10 Aug 2015 10:42
by Core Xii
marco.r wrote:Do you have at hand the parameters you used for that game ? (Map size, sets etc...)
Sure. 512 x 512 map, TerraGenesis, Very Low towns, Flat terrain, Very High variety distribution, Very Low sea level, Improved trees, Random map edges, 30 maximum height, Very Low industries, Smooth and Medium rivers. Otherwise all vanilla.

Re: BorkAI

Posted: 14 Nov 2015 03:47
by HGus
Another error and my workaround:

Code: Select all

 if (engine == null) return null; // this keep things running...
	local result = AIVehicle.BuildVehicle(depot, engine._id);

Re: BorkAI

Posted: 20 Nov 2015 06:58
by marco.r
HGus wrote:Another error and my workaround:

Code: Select all

 if (engine == null) return null; // this keep things running...
	local result = AIVehicle.BuildVehicle(depot, engine._id);
Thanks for the report, I will fix it in a short while, hopefully also the previous issue.
Sorry for the lack of updates but it is quite a busy period for me.

Re: BorkAI

Posted: 24 Nov 2015 20:37
by marco.r
I applied the fix provided by HGus.
Also I realized that in the initial part of the game the AI was trying to hard to build airports (which could not afford to)
instead of going with trucks, leading to very poor performance.
Now it should fare much better.

Re: BorkAI

Posted: 03 May 2016 14:44
by Wormnest
BorkAI v.22 crashed on this fairly flat map, no NewGRF's. Start was in 1930.