Moderator: OpenTTD Developers
Apart from this usage number CluelessPlus do not try to detect queues and jams further away from the bus stops.
What difficulty setting did you use? CluelessPlus can expand and build more bus stops, but it has a maximum limit per town that is dependent on the difficulty setting unless explicitly set in the AI Config dialog. (on easy the limit is 1 bus stop per town IIRC)
Thanks for doing these tests and taking yourself time to post the results for each AI.
I use custom difficulty settings. And sure enough all those AIs are worth the detailed feedback, they all are a lot of work, they do a good job and are fun so this is the least I can do.Zuu wrote:What difficulty setting did you use? CluelessPlus can expand and build more bus stops, but it has a maximum limit per town that is dependent on the difficulty setting unless explicitly set in the AI Config dialog.
- (522.64 KiB) Downloaded 227 times
The AI should from time to time check the bus stops and see that they are connected to the town-roads. This probably happened because there was a bus in the way when it tried to connect the road. (or insufficient with money)
- Unnamed, 14th Aug 1952.png (39.89 KiB) Viewed 3146 times
First I should say that I have not addressed the queuing issue that PM raised.
* Bridge over rail/canals/rivers
* Penalize rail-crossings in case it don't find a bridge path immediately .
* Bus stops that are not connected to the 'front' tile are now detected and are either connected or removed (if connection fails due to other issues than vehicles in the way or no funds). The last bus stop will never be removed though since that would require me to implement closing down lines or finding a new spot for the station. (the later shouldn't be very hard, but I haven't spent any time on it)
* When repairing connections that seems broken (quickly reduced profit), give a higher penalty than normal to building new road to reduce the parallel roads that the previous CluelessPlus version could create sometimes. Only if re-building with these higher penalties fails, then try again with CluelessPlus-normal penalties.
An update has already been uploaded to BaNaNaS.
- (96.5 KiB) Downloaded 82 times
Everything to that one station, vehicles are 2 years old.
- Przechwytywanie.PNG (115.35 KiB) Viewed 3079 times
- clueluss fail.sav
- (65.34 KiB) Downloaded 77 times
The reason why this happened is:
* It probably bough a lot of buses in one go. The selection of number of buses to buy in CluelessPlus is let say very primitive. I was surprised to see that it doesn't even take into account the capacity of the buses. Only the amount of waiting passengers and no maximum limit.
* The station in the screenshot has three bus stops but the buses only uses one of them at the moment, so the usage rating of the station overall isn't too bad. Only ~ 90 in usage on a scale from 0 to 300 since the two other bus stops are completely unused. If you let it play for a while it will distribute among two of them.
* Finally, in order to sell vehicles, there is no condition related to the amount of passengers waiting at the bus stop, only the overall profit of all vehicles on that connection and the station usage ( sell on usage > 200 or profit < 0). In this case the usage criteria is not met and it will take a while before the profit criteria is met.
Of course there is many things here to improve to avoid this situation. Just wanted to explain why it happened since you was so kind and provided some feedback.
The reason why it doesn't look at the amount of passengers waiting at the stations could be for historical reasons (when Clueless was initially written NoAI API did not provide that information). That said todays CluelessPlus do some checkings on the waiting amounts so it can't only be blamed on historical reasons. That said some of the inner workings of eg. station placement is fairly the same from the old times when you just knew if an action had succeeded or not but almost no information could be acquired from the map.
I noticed a bug in the loading code that would remove all stations that it could leaving only stations that did not have a bus on them when the game was saved. Now thats a nasty bug.
On minimal loan CluelessPlus refuses to start construction.
it is caused by following code in main nut
Code: Select all
1009 // ... check if we can afford to build some stuff 1010 if(this.GetMaxMoney() > 100000 && !engine_list.IsEmpty() && !AIGameSettings.IsDisabledVehicleType(AIVehicle.VT_ROAD))
Many have we been playing evil games with the AIs by crashing their road vehicles. Now here comes an AI that fight back by build bridges over the rails! Well, I should say that it is not fool proof and I'm sure most players that want to crash CluelessPlus' road vehicles in an evil manner will figure out ways to dot it also in the future. However, I think it is a good addition for the cases when AIs or players are to lazy to build bridges over CluelessPlus' roads.
- I have tried to address the situation in clueless_fail.sav by doing some improvements in the right direction. I'm sorry it is a few weeks since I did this so I don't remember exactly in detail what I did.
- In addition to the changes in v16 that made CluelessPlus bridge existing rail a new functionality has been added that under some conditions replaces level crossings with bridges. This can happen when it "repairs" a connection or when a bus gets hit by a train. (when there is an accident and the rail crossing can't be replaced yet the tile is stored in a wait list and the level crossing is replaced later) Note that only if CluelessPlus owns the road, it is able to replace the level crossing with a bridge.
- Most utility functions in the Helper class has been removed and instead the new SuperLib is used. Some functions were to specific to CluelessPlus and has been placed in a new ClueHelper class.
- The minimum OpenTTD version at BaNaNaS (for v16 and v17) has been set to 19008 (1.0 beta 4). I need yet to verify that it actually works with 1.0 beta 4. The probably newest feature that CluelessPlus uses is ingame changeable settings.
SuperLib - version 1
Pathfinder.Road - version 3
If online content do not work for you you can download them from here: BaNaNaS (my guess is that SuperLib will become available after next time the binary mirrors gets updated)
Great idea, I'm going to try itZuu wrote:Now here comes an AI that fight back by build bridges over the rails!
EDIT: The feature is working well, but it seems that CluelessPlus v17 doesn't buy any buses if the Generic Tram Set is loaded. The connections are built nicely, they are only lacking the buses.
Not a lot, but a few changes and tweaks:
- Don't try to buy trams
- Lowered the money limit to 95 000 so we start building when the loan is maximum 100 000.
- Replace level crossings with bridges also if the road is built 90 degree against the slope direction of a tile with just two raised corners
- SuperLib 2
1) I use your great idea in new (unpublished) version of AIAI, so also AIAI roads are safe!Zuu wrote: Note that only if CluelessPlus owns the road, it is able to replace the level crossing with a bridge.
2) Small idea - what about carring tourists ECS tourists? Imagine: first AI fully combatible with ECS
3) I think what to do with vehicles trapped under bridges.
- Przechwytywanie.PNG (33.81 KiB) Viewed 2854 times
I realized now that you could probably afterwards check if the rail tiles has road transport type to see if removing road failed and act upon that. You would probably have to remove the road tiles one by one and only proceed if the previous tile succeeded so that you don't cut of the exit road for trucks.
That said, in a situation when the trucks got hit by a train on a regular rail (not a sabotage-rail) chances are that if a truck got hit once, there will come more trains that will kill the stuck trucks/buses and then they will not be a problem anymore.
A not to hard to implement way to go would be to make use of the NoAI support for adding data to the save game files. Unfortunately, that has a big drawback - you can't recover connections from crashed AIs. What I need to store for each station is if the object is an industry or town, the industry/town id and the cargo id. This can be fitted into the station name, and that is what I've done. Since there can only be one station in the entire game with the same name, I figured out that I need to add a unique string at the end so that multiple CluelessPlus instances are supported, or if the same instance builds more than one station at the same industry.
First I added a number at the end, but only using base 10 is not really good since there the station names are limited in length. So I decided to add the upper and lower case alphabet plus some special chars too and ended up with base 83. 2 digits in base 83 gives 6889 possible values. But having a number 01, 02 etc. looks a bit boring, so I got the brilliant idea to reorder my symbols a bit in my base 83 so that ':' is zero and then there comes various brackets etc. so that in most cases you'll see a smiley as the unique string.
I'll see if I can encode the first parts into a number and transform that into something prettier. I will of course still have to support old CluelessPlus saves by reading closest town and then rename the stations.
So as of storage space, it would not be a problem to fit in 2 more industries. Yes you can't fit in infinitely amounts of industries there, but you could move from base 10 to 83 or even more if you take care and lookup all special chars that OpenTTD allow in station names.
If I'm doing this correctly the number of values you can store with base 83 of 30 chars becomes (rounded down) 83^30 = 3.7 * 10 ^57. A 16 bit int (that's what industry and town ids use) give 2^16 possibilities. Now 83^30 / (2^16) = 5.6 * 10^52 gives the amount of industry Id's you could store if that was the only thing you stored in a station name. This should be sufficient for any practical needs. Taking a few bits from that to store how many industries/towns there are and if they are towns or industries shouldn't change much in the big picture.
Users browsing this forum: No registered users and 7 guests