Page 7 of 9

Re: CluelessPlus

Posted: 09 Apr 2011 10:21
by Wasila
Running CluelessPlus v23 with ChillCore's patchpack. Crashed.

Re: CluelessPlus

Posted: 09 Apr 2011 15:17
by Zuu
Thanks for your bug report. This will be fixed in the next upcoming release.
planetmaker wrote:I just started a test game I'm running with a couple of AI for the rest of the day. A detailed analysis will follow later, but what I saw when I just looked around the map initially is the behaviour of CluelessPlus on its first bus route: it seems quite overloaded with busses.

All content should be available from either bananas or the devzone.
In the next release, this should be slightly improved as it will not account for the entire town population if it is too large.

Late, but also thanks to you planetmaker for your report.

Re: CluelessPlus

Posted: 09 Apr 2011 16:26
by Zuu
Update - Version 24

Changes:
  • Bug fixes
  • Mass-upgrade of vehicles when there is a better engine available
  • Buy statues when there is plenty of money
  • Use SuperLib version 7 instead of version 6

Re: CluelessPlus

Posted: 19 Apr 2011 20:35
by planetmaker
I still had v23 configured and had - rather accidentially - run my machine the whole day and found this crash when I returned home tonight:

Code: Select all

dbg: [ai] [3] [S] Your script made an error: the index 'SellVehicle' does not exist
dbg: [ai] [3] [S] 
dbg: [ai] [3] [S] *FUNCTION [HandleEvents()] CluelessPlus-23.tar/cluelessplus-23/main.nut line [1832]
dbg: [ai] [3] [S] *FUNCTION [Start()] CluelessPlus-23.tar/cluelessplus-23/main.nut line [1570]
dbg: [ai] [3] [S] 
dbg: [ai] [3] [S] [connection] NULL
dbg: [ai] [3] [S] [lost_veh] 1054
dbg: [ai] [3] [S] [lost_event] INSTANCE
dbg: [ai] [3] [S] [ev_type] 13
dbg: [ai] [3] [S] [ev] INSTANCE
dbg: [ai] [3] [S] [this] INSTANCE
dbg: [ai] [3] [S] [i] 1197
dbg: [ai] [3] [S] [not_build_info_printed] false
dbg: [ai] [3] [S] [last_manage_time] 745691
dbg: [ai] [3] [S] [this] INSTANCE
dbg: [ai] The AI died unexpectedly.
EDIT: you'll need two custom newgrfs which I used in testing versions: ogfx-landscape and ogfx-industries

Re: CluelessPlus

Posted: 19 Apr 2011 20:57
by Zuu
I'm quite sure that I've fixed that bug in v24, as it looks very similar to a bug that was reported some time before v24 was released.

It happens whenever the AI receives a vehicle lost event.


Edit: Nevertheless thanks for your report.

Re: CluelessPlus

Posted: 19 Apr 2011 21:47
by planetmaker
Zuu wrote:I'm quite sure that I've fixed that bug in v24, as it looks very similar to a bug that was reported some time before v24 was released.
Yeah, might be, but I just thought I post it nevertheless. I only noticed I had an older version when I actually wrote this report and saw your posting above with the version update. Seems that the AI config did or does not auto-update to the newest version of an AI when starting new games... I guess I have a feature request for the NoAI framework (for myself?) ;-)

Re: CluelessPlus

Posted: 19 Apr 2011 22:07
by Zuu
When loading games it should pick the newest compatible AI. However that feature might be missing in the create new game process?

Re: CluelessPlus

Posted: 20 Apr 2011 06:15
by planetmaker
Hm, actually it does. I did not update my installed bananas content since then :-P Sorry for the confusion. The next games will now be with v24 :-)

Re: CluelessPlus

Posted: 01 May 2011 18:24
by Zuu
Update - version 25

New feature:
- A setting that when enabled will limit building of new connections so that they will be located near the already existing connections.

It uses a simple bounding box model that grows whenever new connections are built or it fails to find a new connection within the box. This works best on eg 128x2048 maps where the edge of the bounding box will be close to existing connections for the most part of the edge. However, even if the bounding box might be a bit too large if the AI have two connections in a cross, it can happen that it fill up the bounding box and make a square of it.

I should note that it only require one of the two nodes of new connections to be within the bounding box.

The setting has these defaults:
  • easy: On
  • medium: On
  • hard: Off
  • custom: Off
This is just an initial implementation. With more time invested, it is possible to improve it further.

Re: CluelessPlus

Posted: 26 Jul 2011 19:33
by Zuu
Update - version 26

Time to say goodbye to CluelessPlus as road-only AI. :-) This version contains initial support for air services. For now I have only implemented it for town-to-town transport, but support for industries will come in a later version.
Unnamed, 16th May 1971.png
Unnamed, 16th May 1971.png (53.94 KiB) Viewed 6105 times

Mind that CluelessPlus requires several libraries that will be fetched automatically if you download it inside OpenTTD. If you however download CluelessPlus from the link below, you will need to update to SuperLib version 10. Take a look on the first page in this thread for a complete list of dependencies that CluelessPlus requires.
CluelessPlus-v26.tar
(180 KiB) Downloaded 255 times

Re: CluelessPlus

Posted: 26 Jul 2011 23:02
by Zuu
Update - version 27
A quick bugfix-release. By mistake I had left some code that filtered the loading of connections to only look at road vehicles. Thus only road connections were loaded. This has been fixed now.

At the moment it will load also rail and ship connections. Hopefully that will not break anything, but I haven't made any tests to see if it really can handle those kind of connections as it can't build them yet and I haven't tried to make it take over from any other AI.


In addition, this release contains a few minor tweaks such as improved cleanup of vehicles with invalid orders and temporary removal of full load orders if a station sees very high usage. (In my tests, I found a case when the temporary link closure for secondaries didn't kick in and it didn't sell vehicles quick enough to reduce the blocking for delivery trucks (there was a small delivery stream from another direction that kept the industry "alive"))

Re: CluelessPlus

Posted: 31 Jul 2011 11:00
by Zuu
Update - version 28

CluelessPlus can now upgrade airports.

Please note that until FS#4704 has been implemented in the OpenTTD version that you use, you should enable "airports never expire" in advanced settings. If not, the AI will think that an airport that has expired has a noise generation of -1. Thus when trying to upgrade that airport, the AI will think that the available noise budget of a town is 4 too low for the small airport. Thus, it will take very long before the AI thinks it is okay to upgrade airports that has expired.

Have fun and please report back if the AI crashes or does something silly.
CluelessPlus-v28.tar
Requires SuperLib v11. See first post on dependencies.
(220 KiB) Downloaded 253 times
One sillyness that is known is that the AI is good at buying too large aircrafts for connections with little cargo. Resulting in just one big aircraft instead of several small. When the rating drops of the airport that has no aircraft, the AI buys a new one (if it can afford) and may continue to do this until the rating drops again, and then sell all but one aircraft. This may repeat quite often resulting in lots of passengers/mail being "sold" in the depot for no profit.

Eddi proposed a solution to this: make sure vehicles are empty before selling them. For now I haven't implemented this as it needs some tweaking on when to apply this technique as it can't be used when vehicle selling is done in order to loosen up a jam situation.

Re: CluelessPlus

Posted: 31 Jul 2011 19:38
by krinn
Zuu wrote:Eddi proposed a solution to this: make sure vehicles are empty before selling them. For now I haven't implemented this as it needs some tweaking on when to apply this technique as it can't be used when vehicle selling is done in order to loosen up a jam situation.
if empty no sell
if name = jam sell (empty or not), so just rename a jam vehicle, even one might not like a vehicle name "jam" or "jamX04334" this will solve your problem easy and the name will be kept until the vehicle is sold, a small interval

Re: CluelessPlus

Posted: 05 Aug 2011 15:15
by Brumi
Wow! :D
I'm glad to see that CluelessPlus is getting new vehicle types. I'm trying it out right now...

EDIT:
The AI has crashed, see the screenshots.

Re: CluelessPlus

Posted: 06 Aug 2011 16:44
by Zuu
Hey Brumi! Thanks for your report. That one is because I've spelled AIGameSettings wrong without an 's' at the end. I have a newer version in the pipeline that doesn't have this issue. As soon as I get time to test it quickly and get it out, I'll release it as the current version clearly have issues.

Re: CluelessPlus

Posted: 07 Aug 2011 10:45
by Brumi
Can I make a feature request? AFAIK all AIs that handle multiple vehicle types have settings to enable/disable particular vehicle types. I think this should be there in CluelessPlus as well.

Re: CluelessPlus

Posted: 07 Aug 2011 14:44
by Zuu
I have thought about that but for now i revly on the OpenTTD settings for that. If adding it to CluelessPlus, I want to transparency handle it in the SuperLib helper functions that using a single call checks several ways OpenTTD can turn off a transport mode. This however enforce the internal name of those settings on all users of the librabry. So I will have to browse through some AIs and see if there is a consensus. Still some way of overriding/setting other setting names will probably be needed unless there really is a broad consensus.

Re: CluelessPlus

Posted: 14 Aug 2011 15:49
by Zuu
Version 29

Changes:
  • Fix of the GameSettings error reported above.
  • AI Settings to enable/disable individual transport modes for a specific CluelessPlus instance. (disabling a transport mode for all companies or all AI companies is already possible in Advanced Settings)
  • Can use articulated road vehicles (if building of drive-through-stops (DTRS) terminated with a depot is allowed in the AI Settings)
  • At a small chance DTRS are built also for non-articulated RVs. (unless they are disabled in the AI Settings)
  • Use SuperLib v12
Download:
Preferable download CluelessPlus through the in-game online content system. That way you don't have to care about the dependencies.

For manual download, make sure to also read the first post in this thread on dependencies.
CluelessPlus-v29.tar
(230 KiB) Downloaded 238 times

Re: CluelessPlus

Posted: 29 Aug 2011 11:53
by Brumi
I've just had a crash with CluelessPlus. It's v28, as I forgot to update the AI, but maybe you haven't met this bug so far.

Re: CluelessPlus

Posted: 29 Aug 2011 15:03
by Zuu
I've seen this bug myself without being able to track it down. I've looked in the library code where it crashes but can't figure out why it happens. It seem to happen late into games and I have even got saves that easily reproduce it, but I haven't been able to solve it.

Thanks for reporting it. I was starting to wondering if this was a hardware failure or something as I have been staring at it without being able to figure out what is wrong.