DictatorAI
Moderator: OpenTTD Developers
Re: DictatorAI
Krinn, for information the "AI_" prefix has been dropped in the 1.2 API. (if that is why the problem occurs) This happened short after NoGo was merged.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: DictatorAI
Zuu: Thank you zuu, will watch that as soon as 1.2 hit the streets
MAG101: You are seeing that because your current open NOAI API doesn't handle that event.
This mean you are playing an openttd version that is older than 1.1.0.
This is actually a bug, thank you for reporting it, i will try to put an update soon, but the fix is just to setup correctly the API version need to handle the AI
If you wish test it more (or avoid this bug), i'm afraid you will need to update openttd to 1.1.0 or better.
MAG101: You are seeing that because your current open NOAI API doesn't handle that event.
This mean you are playing an openttd version that is older than 1.1.0.
This is actually a bug, thank you for reporting it, i will try to put an update soon, but the fix is just to setup correctly the API version need to handle the AI
If you wish test it more (or avoid this bug), i'm afraid you will need to update openttd to 1.1.0 or better.
Re: DictatorAI
Krinn, take a look again at his screenshot. He definitely uses 1.2 or at least a version at least from December 2011 when Nogo was merged with trunk. Otherwise, why would he have a Game Scripts button in the AI debug window?
Now taking a look at your AI, I'm a bit puzzeled. I though the cause of this was that you used API version 1.2 which doesn't provide the compatibility layer. However you use 1.0 API. But perhaps the issue is that you have used this constant that is not part of 1.0, but still visible in newer OpenTTD versions. However as it was not part of 1.0, the compat.nut for 1.0 doesn't provide an AI_.. compatibility constant for the renamed constant.
Now taking a look at your AI, I'm a bit puzzeled. I though the cause of this was that you used API version 1.2 which doesn't provide the compatibility layer. However you use 1.0 API. But perhaps the issue is that you have used this constant that is not part of 1.0, but still visible in newer OpenTTD versions. However as it was not part of 1.0, the compat.nut for 1.0 doesn't provide an AI_.. compatibility constant for the renamed constant.
155b wrote:Code: Select all
function GetAPIVersion() { return "1.0"; }
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: DictatorAI
That's the issue yep, miss to change the API version, if only all bugs could be as easy !
Here's my current work that should fix it, i'm not quiet sure how the AI state is, full of debug/tweaks i'm trying, but here's the latest version i have (on page 1)
edit: lol just saw 1.2 is out, i should build that one to try it, but it should works still with 1.1 set
Here's my current work that should fix it, i'm not quiet sure how the AI state is, full of debug/tweaks i'm trying, but here's the latest version i have (on page 1)
edit: lol just saw 1.2 is out, i should build that one to try it, but it should works still with 1.1 set
Re: DictatorAI
Thank you for the report ReisRyos i will correct it and post a "b" release when i'm back from work tonight.
I'm not working on it currently because of a heavy workload. And even i couldn't make it evolve like i wish, i could still correct bugs in it.
So except the bug correction, sadly don't expect more from that "b" release.
I'm not working on it currently because of a heavy workload. And even i couldn't make it evolve like i wish, i could still correct bugs in it.
So except the bug correction, sadly don't expect more from that "b" release.
Re: DictatorAI
I was running 1.2 Openttd. 104 never crashes, 154 crashes lot .krinn wrote:Zuu: Thank you zuu, will watch that as soon as 1.2 hit the streets
MAG101: You are seeing that because your current open NOAI API doesn't handle that event.
This mean you are playing an openttd version that is older than 1.1.0.
This is actually a bug, thank you for reporting it, i will try to put an update soon, but the fix is just to setup correctly the API version need to handle the AI
If you wish test it more (or avoid this bug), i'm afraid you will need to update openttd to 1.1.0 or better.
wip and any inprovement planned?
Re: DictatorAI
I guess it is a typo, but your manual says that one need OpenTTD 1.5 to run DictatorAI.
You need openttd 1.5 to run this AI.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: DictatorAI
yep of course, it was 1.1.5 by that time i think
i will fix it and fix the 1.2 API bug soon, my spare time is going back to a less stressful normality. I'm just using the few i have right now to fix other things i couldn't do while spring work (lol mostly getting out for a beer with my friends)
i will fix it and fix the 1.2 API bug soon, my spare time is going back to a less stressful normality. I'm just using the few i have right now to fix other things i couldn't do while spring work (lol mostly getting out for a beer with my friends)
Re: DictatorAI
Your AI crashed with last nightly of OpenTTD (r24526). This error probably exist since december 2012 when NoGo was merged and the constants that start with 'AI_' or 'AI' had the 'AI_' part removed.
The EVENT flag that you use was introduced in API version 1.1, and for that compatibility layer there exist code do handle backward compatibility with the AI_ET_TOWN_FOUNDED constant. However your info.nut set API version to 1.0 for your AI, and since the constant didn't exist in the 1.0 API, no compatibility for that constant exist in compat_1.0.nut.
The EVENT flag that you use was introduced in API version 1.1, and for that compatibility layer there exist code do handle backward compatibility with the AI_ET_TOWN_FOUNDED constant. However your info.nut set API version to 1.0 for your AI, and since the constant didn't exist in the 1.0 API, no compatibility for that constant exist in compat_1.0.nut.
- Attachments
-
- Tynspång Transport, 14th Mar 1982.png (14.25 KiB) Viewed 4850 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: DictatorAI
I have fix it zuu it's in bananas, it was fixed in the testing version but i have forget the released one.
Funny but if none tell me this is thing i cannot see as i only own the testing version in my openttd
Funny but if none tell me this is thing i cannot see as i only own the testing version in my openttd
Re: DictatorAI
A new stable release 1.60 should be available thru bananas.
- Many bugfixes
- Add handling of subsidy
- Add support for SCP
- Add handing of NoCargoal . See source here to if you want add it to your AI easy, or as sample on howto implement it.
- No trains yet (sorry, a real lot of more work to do to add that).
- Now blacklisting aircraft with limited range, in my tests it show only av8 newGRF set use it, but sadly all the aircrafts in it use that, so the AI won't play with aircrafts from that newGRF at all.
This AI is made for openttd API 1.2, but you will need a newer API to play with it and nocargoal as nocargoal need a newer API (see its thread for requierements).
I will upload here another test version with trains when i get one ready, so, even lacking trains, this version is the newest.
- Many bugfixes
- Add handling of subsidy
- Add support for SCP
- Add handing of NoCargoal . See source here to if you want add it to your AI easy, or as sample on howto implement it.
- No trains yet (sorry, a real lot of more work to do to add that).
- Now blacklisting aircraft with limited range, in my tests it show only av8 newGRF set use it, but sadly all the aircrafts in it use that, so the AI won't play with aircrafts from that newGRF at all.
This AI is made for openttd API 1.2, but you will need a newer API to play with it and nocargoal as nocargoal need a newer API (see its thread for requierements).
I will upload here another test version with trains when i get one ready, so, even lacking trains, this version is the newest.
Re: DictatorAI
Your dictator was extradicted in my current game, see attached image.
- Attachments
-
- End of a dictator.png
- (590.69 KiB) Downloaded 9 times
Re: DictatorAI
It wasn't a good period for dictators.
I will fix that tonight, i've work hard to fix a lot of stuff for the road and air parts, and forget totally the train part, as this is not finished. This bug is from the train part, something i will work on soon as my todo list is now smaller.
Thank you for your report.
For your information, the latest version is 1.68, and this bug is in it too. Look for 1.69 for the fixed version.
I will fix that tonight, i've work hard to fix a lot of stuff for the road and air parts, and forget totally the train part, as this is not finished. This bug is from the train part, something i will work on soon as my todo list is now smaller.
Thank you for your report.
For your information, the latest version is 1.68, and this bug is in it too. Look for 1.69 for the fixed version.
Re: DictatorAI
Your welcome and I'll have a look for 1.69 .krinn wrote:It wasn't a good period for dictators.
I will fix that tonight, i've work hard to fix a lot of stuff for the road and air parts, and forget totally the train part, as this is not finished. This bug is from the train part, something i will work on soon as my todo list is now smaller.
Thank you for your report.
For your information, the latest version is 1.68, and this bug is in it too. Look for 1.69 for the fixed version.
Re: DictatorAI
Ok bugfixes, look for 1.69 in bananas.
Do you have a savegame to provide, as the bug came out when AI fail to select a train engine, and as your screenshot prove, some trains exists in that game, It's not the bug by itself : that was a real one in the code ; and not even a real bug, as for many reasons the AI may not select an engine, not because none exists to work with, but none matching its selection critera exists (per example, a too huge cost train engine...).
So i'm curious to see why it couldn't pickup one.
Do you have a savegame to provide, as the bug came out when AI fail to select a train engine, and as your screenshot prove, some trains exists in that game, It's not the bug by itself : that was a real one in the code ; and not even a real bug, as for many reasons the AI may not select an engine, not because none exists to work with, but none matching its selection critera exists (per example, a too huge cost train engine...).
So i'm curious to see why it couldn't pickup one.
Re: DictatorAI
Sure, but it's not from the exact date as my report see http://tinyurl.com/b6d4wtk.krinn wrote:Ok bugfixes, look for 1.69 in bananas.
Do you have a savegame to provide, as the bug came out when AI fail to select a train engine, and as your screenshot prove, some trains exists in that game, It's not the bug by itself : that was a real one in the code ; and not even a real bug, as for many reasons the AI may not select an engine, not because none exists to work with, but none matching its selection critera exists (per example, a too huge cost train engine...).
So i'm curious to see why it couldn't pickup one.
Re: DictatorAI
Hi. Reporting a crash
the index 'GetRoadStationEntry' does not exist.
the index 'GetRoadStationEntry' does not exist.
- Attachments
-
- Unnamed, 2016-11-07.sav
- (4.36 MiB) Downloaded 340 times
-
- screenshot#4.png
- (50.72 KiB) Downloaded 4 times
Re: DictatorAI
Thank you for your report Samu. I will work on it.
Re: DictatorAI
I have put my current work on dictatorai with trains as i have convert it to use cEngineLib, it will gave a good playground for anyone.
The ai nearly handle trains, i have still plenty stuff to do to finish that. But it works more or less
This include bugfixes and changes for other aspect of the AI too.
It should works for everyone if you disable trains ("should") because many debug and testing are in it, that may impact it even without using trains.
But as some love to test things, and as this could provide me feedback, you can download it from the first post.
The big change : AI savegame for older versions has been drop (except 168 & 169), a new savegame is use (that save nearly nothing).
So if you want load old savegame to play with it, better load it with dictatorai 168 or 169 and resave them.
The ai nearly handle trains, i have still plenty stuff to do to finish that. But it works more or less
This include bugfixes and changes for other aspect of the AI too.
It should works for everyone if you disable trains ("should") because many debug and testing are in it, that may impact it even without using trains.
But as some love to test things, and as this could provide me feedback, you can download it from the first post.
The big change : AI savegame for older versions has been drop (except 168 & 169), a new savegame is use (that save nearly nothing).
So if you want load old savegame to play with it, better load it with dictatorai 168 or 169 and resave them.
Who is online
Users browsing this forum: No registered users and 0 guests