SimpleAI v14 - trying to remake the old AI
Moderator: OpenTTD Developers
Re: SimpleAI v1 - trying to remake the old AI
Uh oh!
SimpleAI v1 of course.
Looks like a bambi crossing, better watch for 'em. SimpleAI v1 of course.
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: SimpleAI v1 - trying to remake the old AI
Have you verified that SimpleAI is available on the in-game content downloader?
I can't find it neither using 1.0.0 beta 1 nor using last nightly r18698. What version limits did you set in BaNaNaS?
I can't find it neither using 1.0.0 beta 1 nor using last nightly r18698. What version limits did you set in BaNaNaS?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: SimpleAI v1 - trying to remake the old AI
It's not on the content server yet, from what I've seen.
BTW - an observation - 3 trains on a long "two-train" line - very nice, more profit without any blockages.
BTW - an observation - 3 trains on a long "two-train" line - very nice, more profit without any blockages.
- Attachments
-
- Sindington Transport, 5th Jan 2007.png (101.53 KiB) Viewed 5156 times
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: SimpleAI v1 - trying to remake the old AI
I really have no idea how that happened. If the AI had tried to remove the station, it would have removed the whole line. And I have a check not to remove stations in use... I think that has to do something with save/load.SirkoZ wrote:Looks like a bambi crossing, better watch for 'em.
I set 'nightly' as the maximum version but forgot to add a number there. Now I set '(none)' and now it's available in 1.0.0-beta1 as well. Thanks for notifying, I only checked it in 0.7.5.Zuu wrote:Have you verified that SimpleAI is available on the in-game content downloader?
I can't find it neither using 1.0.0 beta 1 nor using last nightly r18698. What version limits did you set in BaNaNaS?
Another strange one, most likely some problems with vehicle renewal, or some corrupted internal data. Is there a case when a trains cannot be sold for some reason, apart from not being in a depot? (but that one is very unlikely, as vehicle renewal is triggered by AIEventVehicleWaitingInDepot.)SirkoZ wrote:BTW - an observation - 3 trains on a long "two-train" line - very nice, more profit without any blockages.
If you happen to have savegames of these please post them here.
Thank you for the reports!
Re: SimpleAI v1 - trying to remake the old AI
I'll attach the save-game from which upper two screen-shots were made.
To be formal - I used:
1.) more_diesel_smoke patch with it (it's not necessary/just for looks),
2.) av8 v 1.501 new .grf,
3.) statically loaded better_veh_names .grf (again not necessary/just for looks),
4.) only_decrease_neutraliser .grf (which in non-temperate disables itself which makes it unnecessary).
That about bambi crossing - well - I really didn't know what to say there. I wasn't exactly there when the AI made that messy track - so I can't say when exactly it decided to place depot off the mainline.
As for the 3 trains - from what I've tested and even tried to modify the old_AI back in the day - 3 trains is nothing bothersome on such longer tracks, trains never get stuck or wait excessively on each-other so you could perhaps consider it a feature for really crowded end-stations...
Anyways only now I re-loaded that game to make a save-game to post here. When above two issues occured - the game was running without any interruptions (since 1950 -> this save (2022)). Wraston and Senningbury are the towns near the "problems" and nightly ver. r18709.
To be formal - I used:
1.) more_diesel_smoke patch with it (it's not necessary/just for looks),
2.) av8 v 1.501 new .grf,
3.) statically loaded better_veh_names .grf (again not necessary/just for looks),
4.) only_decrease_neutraliser .grf (which in non-temperate disables itself which makes it unnecessary).
That about bambi crossing - well - I really didn't know what to say there. I wasn't exactly there when the AI made that messy track - so I can't say when exactly it decided to place depot off the mainline.
As for the 3 trains - from what I've tested and even tried to modify the old_AI back in the day - 3 trains is nothing bothersome on such longer tracks, trains never get stuck or wait excessively on each-other so you could perhaps consider it a feature for really crowded end-stations...
Anyways only now I re-loaded that game to make a save-game to post here. When above two issues occured - the game was running without any interruptions (since 1950 -> this save (2022)). Wraston and Senningbury are the towns near the "problems" and nightly ver. r18709.
- Attachments
-
- Sindington Transport, 8th Nov 2022.sav
- save-game r18709(M - if with diesel_smoke)
- (584.57 KiB) Downloaded 162 times
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: SimpleAI v1 - trying to remake the old AI
Absolutey fantastic work, Brumi, I'm amazed.
A few little bugs, if you can even call them that.
Here is the first bug. One of SimpleAI's trains were lost and this text was displayed in red. Maybe it was just coincidence, but two SimpleAIs built the same route, which caused a small dilemma. Yellow was just initiated in-game with "start_ai" in console. As seen here, there is the classic "passing lane" used by the old AI. The only problem being that it is drive-on-left when my signals are set to drive-on-right. Could you make a detection for SimpleAI so it can build accordingly?
A few little bugs, if you can even call them that.
Here is the first bug. One of SimpleAI's trains were lost and this text was displayed in red. Maybe it was just coincidence, but two SimpleAIs built the same route, which caused a small dilemma. Yellow was just initiated in-game with "start_ai" in console. As seen here, there is the classic "passing lane" used by the old AI. The only problem being that it is drive-on-left when my signals are set to drive-on-right. Could you make a detection for SimpleAI so it can build accordingly?
Last edited by petert on 05 Jan 2010 03:11, edited 1 time in total.
Re: SimpleAI v1 - trying to remake the old AI
Along with drive-on-right/left signal detection, could you also add an option to enable or disable the use of this type of passing lane with the (very) old double signaled passing lane?
Edit: It seems you wanted to have fours letters for each group name, and to be consistent, you had to include the underscore. Sorry about that. And finally... (Pink and Yellow are SimpleAI)
There is a very small typo in this group name, it is called OIL_ instead of OIL. Edit: It seems you wanted to have fours letters for each group name, and to be consistent, you had to include the underscore. Sorry about that. And finally... (Pink and Yellow are SimpleAI)
- Attachments
-
- profit_company_value_SimpleAI.png (11.66 KiB) Viewed 5115 times
Last edited by petert on 05 Jan 2010 03:13, edited 2 times in total.
Re: SimpleAI v1 - trying to remake the old AI
Here is the save game:
- Attachments
-
- SimpleAI testing.sav
- (49.25 KiB) Downloaded 162 times
Re: SimpleAI v1 - trying to remake the old AI
Thank you for the savegames.
Still no idea about the bambi crossing, but I can verify that a depot was standing in the correct place. It is still a mystery how it got deleted and how the other one was built...
For the 3-train line, I have an explanation:
One of the AI's vehicles crashed. If its vehicleID is still valid, the AI tries to clone it. But the AI was busy when the event occured, the vehicle was cleared from the way, and one of the trains got its ID, so the train was cloned. So I have to check whether the given vehicle has crashed or not.
One more picture from that game, still building in the spirit of the old AI:
I will make a double-way signal setting if you like, but those are a bit worse in my opinion. They certainly cannot handle 3 or more trains. (although the AI shouldn't place 3 trains there)
Anyway, do you have any idea how the AI acquired these vehicles in your game? Paper trucks on temperate, transporting mail at the speed of 80 mph in 1952... Really weird Is that a loaded scenario, or newGRF, or some patched version? Maybe we spotted a bug in OTTD.
Thanks again for your interest!
Still no idea about the bambi crossing, but I can verify that a depot was standing in the correct place. It is still a mystery how it got deleted and how the other one was built...
For the 3-train line, I have an explanation:
One of the AI's vehicles crashed. If its vehicleID is still valid, the AI tries to clone it. But the AI was busy when the event occured, the vehicle was cleared from the way, and one of the trains got its ID, so the train was cloned. So I have to check whether the given vehicle has crashed or not.
One more picture from that game, still building in the spirit of the old AI:
The red text is always displayed when the AI gets a 'vehicle lost' notification because I don't know how to handle that. But there is no problem with that train line in your savegame, so really nothing serious.petert wrote:Here is the first bug. One of SimpleAI's trains were lost and this text was displayed in red.
It is either a coincidence or a subsidy. The AI only ignores industries where the 'last month transported' is higher than the specified value, which is 60% in your game.petert wrote:Maybe it was just coincidence, but two SimpleAIs built the same route, which caused a small dilemma. Yellow was just initiated in-game with "start_ai" in console.
I'd rather not if that's not that important to you, it would make the code much more jumbled and harder to modify later.petert wrote:As seen here, there is the classic "passing lane" used by the old AI. The only problem being that it is drive-on-left when my signals are set to drive-on-right. Could you make a detection for SimpleAI so it can build accordingly?
I will make a double-way signal setting if you like, but those are a bit worse in my opinion. They certainly cannot handle 3 or more trains. (although the AI shouldn't place 3 trains there)
These names are the results of AICargo::GetCargoLabel, I have nothing to do with that.petert wrote:There is a very small typo in this group name, it is called OIL_ instead of OIL.
Edit: It seems you wanted to have fours letters for each group name, and to be consistent, you had to include the underscore. Sorry about that.
Anyway, do you have any idea how the AI acquired these vehicles in your game? Paper trucks on temperate, transporting mail at the speed of 80 mph in 1952... Really weird Is that a loaded scenario, or newGRF, or some patched version? Maybe we spotted a bug in OTTD.
Thanks again for your interest!
Re: SimpleAI v1 - trying to remake the old AI
Ah, ok, just in-case.Brumi wrote:The red text is always displayed when the AI gets a 'vehicle lost' notification because I don't know how to handle that. But there is no problem with that train line in your savegame, so really nothing serious.
I didn't know that either.Brumi wrote:It is either a coincidence or a subsidy. The AI only ignores industries where the 'last month transported' is higher than the specified value, which is 60% in your game.
Isn't a double way signal setting what I asked for? Ok, then, go ahead and Thanks.Brumi wrote:I'd rather not if that's not that important to you, it would make the code much more jumbled and harder to modify later.
I will make a double-way signal setting if you like, but those are a bit worse in my opinion. They certainly cannot handle 3 or more trains. (although the AI shouldn't place 3 trains there)
I had a NewGRF and removed it in-game. Just found out the effect of that.Brumi wrote:Anyway, do you have any idea how the AI acquired these vehicles in your game?
Paper trucks on temperate, transporting mail at the speed of 80 mph in 1952... Really weird Is that a loaded scenario, or newGRF, or some patched version? Maybe we spotted a bug in OTTD.
Re: SimpleAI v1 - trying to remake the old AI
As a little tip you can issue the "gamelog" command in the console of a loaded savegame to see what weird stuff the user has done. Eg. if it has loaded/unloaded grfs in game etc. I think it is outlined in the readme exactly what information that is logged in the save game.
Regarding drive side etc. I think that is up to the AI to decide. If the AI likes it in one way it is up to the AI. It is not like you demand player in MP to follow your preferred driving side.
Nice work Brumi!
Regarding drive side etc. I think that is up to the AI to decide. If the AI likes it in one way it is up to the AI. It is not like you demand player in MP to follow your preferred driving side.
Nice work Brumi!
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: SimpleAI v1 - trying to remake the old AI
Thanks, I didn't know the "gamelog" command before.
Re: SimpleAI v1 - trying to remake the old AI
I was just playing around with SimpleAI. Really good work!
It even got a nice subsidy I also tried using the DBSetXL, but there were some problems with the engine selection of the trains (trying to add good carriages to a passenger train engine).
It even got a nice subsidy I also tried using the DBSetXL, but there were some problems with the engine selection of the trains (trying to add good carriages to a passenger train engine).
Re: SimpleAI v1 - trying to remake the old AI
ThanksKerygma wrote:I was just playing around with SimpleAI. Really good work!
That's the shortest I've ever seen. It's because there is no minimum distance check for subsidies, I'll have to include that as well.Kerygma wrote:It even got a nice subsidy
The AI cannot handle NewGRF trainsets. It's designed for the original set.Kerygma wrote:I also tried using the DBSetXL, but there were some problems with the engine selection of the trains (trying to add good carriages to a passenger train engine).
Re: SimpleAI v1 - trying to remake the old AI
petert - just to clarify - the double signal passing lanes were used in the TT_Original and are really not applicable for more than 2 trains. Of course with the option of double signal passing lanes there could also be the option of path-signal passing lanes which could potentially allow 4 trains on that 2-train design...
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: SimpleAI v1 - trying to remake the old AI
Actually, using double signal passing lanes, you could (if the trains chooses correctly) fit up to three trains.SirkoZ wrote:petert - just to clarify - the double signal passing lanes were used in the TT_Original and are really not applicable for more than 2 trains.
In this screenshot, train 3 has chosen (I made it choose) to go with train 1 to it's destination, Budtown Woods. In this screenshot, train 2 has successfully passed train 1 and train 3, even with double signal passing lanes.
- Attachments
-
- double_signal_passing_lane_passed.png (26.31 KiB) Viewed 5034 times
Re: SimpleAI v1 - trying to remake the old AI
That is true, however, again, TTOriginal had those kind of lanes and with them there's no certainty that if train reverses it won't go to the wrong station - that leading to jams/at least lost messages - I hate those.
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: SimpleAI v1 - trying to remake the old AI
It still should be an option somewhere. Also, I saw that you will implemement airport usage, how did the old AI use airports? Is there a difference between build of airports/airplanes by the old AI and of players using airports?
Would it be possible to add a feature for terraforming, where you are able to set the amount of terraforming that SimpleAI does. One setting I'm looking for is "Flattens all land".
Would it be possible to add a feature for terraforming, where you are able to set the amount of terraforming that SimpleAI does. One setting I'm looking for is "Flattens all land".
Re: SimpleAI v1 - trying to remake the old AI
The old_AI simply landscaped up and down till it got enough flat squares for a wanted airport-size - this usually led to small airports and big planes [strikethrough]landing[/strikethrough] crashing on them.
Anyhow-ing - Brumi - a small inconvenience:
When trying to load a save-game with the earlier version of SimpleAI, AI crashes instantly upon load complaining that it doesn't find a track index....well here's the screenshot: . I realise that is the result of the new save-load feature, but 't would be lovely to have a backward compatibility...or somesuch.
Anyhow-ing - Brumi - a small inconvenience:
When trying to load a save-game with the earlier version of SimpleAI, AI crashes instantly upon load complaining that it doesn't find a track index....well here's the screenshot: . I realise that is the result of the new save-load feature, but 't would be lovely to have a backward compatibility...or somesuch.
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: SimpleAI v1 - trying to remake the old AI
I started playing some 0.6.3 to get a better feel of the old AI's bad habits. Here is an example of the "Flattens land" category :petert wrote:Would it be possible to add a feature for terraforming, where you are able to set the amount of terraforming that SimpleAI does. One setting I'm looking for is "Flattens all land".
- Attachments
-
- bad_terraform_0.6.3.png (70 KiB) Viewed 5010 times
Who is online
Users browsing this forum: No registered users and 37 guests