Moderator: OpenTTD Developers
My guess is that the AI checked that the crashed vehicle was valid, then called a function to clone the crashed vehicle which had just disapeared when my clone function was called which "gracefully" handeled that by crashing the AI so that the error was found.
Thank you for the bug report. If you or anyone else see this again, please let me know so that I know if it is a frequent issue enough that I should get out a fix soon or if it can wait until the cargo compatible version of CluelessPlus is solid enough to be released. Please note that due to work with my masters thesis and some other stuff, I don't have a lot of time to spare for my AIs at the moment.
Of course, the probablity is higher if the code in question is ran more often. However that was not really my question. My question was if any of the users has a problem with this crash occuring often. Even if crashing vehicles increase the risk of it happning, it could be anything from very uncommon to a rather common problem.Kogut wrote:Situations like this are way more likely for players with that kind of infrastructure.
More crashed RV -> higher probability to have crash due to vehicle crash.
The bug happens because while executing step 2 in the following example the vehicle gets removed and when the security check is performed in 3 it does no longer exist and the AI crashes itself as a means of throwing an assert.
Code: Select all
1. Check if veh exist 2. do something 3. Check if the veh still exists -> fails
While the currently in development CluelessPlus version is fairly good performance wise, it really needs better station placement/upgrading/management in order to reduce the heavy jams it produces from time to time. Also on my todo is making it close down/suspend connections when an industry closes down or drop production to zero. The reason for my question regarding the bug was to query the users if the bug happens often for them or not. If it is a real problem I can disable some of my last additions and make a new release that should work good, but if it is only a theoretical problem, then I rather spend my time on working on the cargo enabled version.
After several months of work on and off, here is version 19 of CluelessPlus! Most noticeable, it contains support for cargo transport using trucks.
Here CluelessPlus is supplying a Fizzy drinks factory with supplies and transports the fizzy drinks to a town. The company "Cluemore" is CluelessPlus version 19 and "Clueless" is version 18. Settings Of course, there is a setting where you can disable transport to/from industries. In town-to-town only mode it however do transport mail on top of passengers.
Another new setting is if CluelessPlus should compete against other companies or not. It works on the transport volumes last month, so if you have just built the stations it could still use that industry. Another case is if you visit the source very seldom and let the cargo pile up for more than a month so that the transported last month is sometimes zero.
The new Log-level setting is mostly there to not spam the log more than necessary.
In the "think and build slower" mode, the build speed for straight road has been increased by about 100%. It is still fairly slow though, but not as badly slow as before.
Preferable, use the in-game content download system to get CluelessPlus as it will get all the required libraries for you. If you need to download manually. Make sure you also download:
- SuperLib v3
- Pathfinder.Road v3
- And all dependencies for Pathfinder.Road which I don't know exactly which they are.
It's too long since last release, so I forgot to not only change the unique 4-letter ID to non-SVN id, but also change the AI name so that it does not contain "SVN". Version 20 is now named "CluelessPlus" correctly without the SVN ending.
BaNaNaS do not let me change the uploaded file, so therefore I have to push out a new version. It is probably good that it force you to do updates correctly though.
Please see the notes in the post above about downloading dependencies manually if you download manually. It is recommended to use the in-game download system if you can.
Edit: There was a more serious error than the name that I found which will be addressed, but the fix will take some time and until then I've disabled the AI on the in-game content downloader.
I'm running a quick test, the only strange thing is that Clueless hasn't built an industry-to-industry route yet, althgough it is 1959 (started in 1950). AI settings are default, I started it from the console without any extra parameters.
Hopefully the last quick-fix of the version 19 release. See below for what has been fixed.
As always, if you download manually, make sure to get the dependencies as well. See the download info for version 19.
That was one of the bugs I found and has now fixed. It was due to me finding a spelling error in a function name, renamed it just before the release, but forgot to rename it in both the declaration and the definition.Brumi wrote:I'm running a quick test, the only strange thing is that Clueless hasn't built an industry-to-industry route yet, althgough it is 1959 (started in 1950).
In addition to that I found out that there was an error in the code that loads old pre version 19 save games, which has now been fixed. Loading of suspended connections should now as well work better.
So please update to version 21 and it should make industry connections as well. Though since towns provide cargo in both directions it is quite common that it do quite a few passenger connections in the beginning if there are large towns at the start.
Thanks.Congratulations Zuu, Clueless is getting more and more clueful
I've decided to remove the "simple" banans tag now that it does a bit more than basic passenger transportation and changed the description to focus more on its load balancing than simpleness. That said, a PI-regulator for the vehicle buy/sell logic would be nice to have to not overshoot the target too much.
Clueless wasted here about 1,5 year.
//AIAI just have wasted 1 year in the same place, I also may improve sth in that area (after trains)
- Przechwytywanie.PNG (14.94 KiB) Viewed 2326 times
* Maximum number of loops
* Maximum cost of found path (about 5/2 times the cost of an optimal path plus a fixed start value)
But it can surely be improved
Best areas of improvements now seem to be from this brief test: Some of the vehicle management could probably be improved (see the additional screenshot). I've seen other AIs stop vehicles which are waiting; it saves running costs . Maybe one could also add trains, but that's a big task
Attached a screenshot which compares this AI with the best AI (AIAI) and the best train-using AI (simpleAI)
All in all: kudos, you did a great job
I personally think this kind of micro management is an abuse of the monitoring benefits of an AI. I will probably not implement this. I do some other micromanagement stuff but that is regarding statistics collection, not actual modification of vehicle states.planetmaker wrote:I've seen other AIs stop vehicles which are waiting; it saves running costs
I first stumbled into this when playing a game with all ECS vectors loaded and a couple of other newGRF (2cc train, eGRVTS, av8, among others). So, I did some quick testing: I started a fresh new game, year 1950, 1024*1024, without any newGRF loaded, started CluelessPlus with the console command (start_ai CluelessPlus), and patiently waited for the game to freeze by moving my mouse franticly around the screen. It DOES freeze (around 2nd Jan), but merely for a second or two, so I might of hit that before but hadn't noticed Then, I started another game with the previous newGRF configuration (and, of course, map configuration) and did the same thing; it froze for a good 10 seconds. I made yet another game, this time with 512*512 map size without any newGRF, and it freezes for a split-second so it's barely noticeable, could be passed of as a glitch of the mouse... Me thinks it might be related to some industry kung fu, since with ECS there's a LOT more industry present in the map.
This never happened with 10 AI loaded (without CluelessPlus), so it's clearly a CluelessPlus-related issue (or maybe you use a NoAI feature that nobody else does?).
I'm running OpenTTD 1.0.2 on Linux and CluelessPlus version is v21. All other newGRF used are the latest version on BaNaNaS.
p.s.: I can provide screenshot to "show" behavior if needed.
p.s.2: I know it was rejected and I agree with the arguments given, but this might be a nice argument for multi-core support
Users browsing this forum: No registered users and 3 guests