Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Nov 15, 2018 1:04 am

All times are UTC




Post new topic  Reply to topic  [ 97 posts ]  Go to page Previous 1 2 3 4 5 Next
Author Message
 Post subject: Re: DictatorAI
PostPosted: Mon Apr 16, 2012 7:29 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
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)


Top
   
 Post subject: Re: DictatorAI
PostPosted: Tue Apr 17, 2012 9:56 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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.


Top
   
 Post subject: Re: DictatorAI
PostPosted: Tue Apr 17, 2012 7:33 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
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.

155b wrote:
Code:
   function GetAPIVersion()    { return "1.0"; }

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: DictatorAI
PostPosted: Tue Apr 17, 2012 9:15 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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 :)


Top
   
 Post subject: Re: DictatorAI
PostPosted: Sun Jun 10, 2012 7:03 pm 
Offline
Engineer
Engineer

Joined: Tue Apr 27, 2010 8:50 am
Posts: 11
version: 156a
no newGRF


Attachments:
bug.png
bug.png [ 19.65 KiB | Viewed 4907 times ]
Top
   
 Post subject: Re: DictatorAI
PostPosted: Mon Jun 11, 2012 9:56 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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.


Top
   
 Post subject: Re: DictatorAI
PostPosted: Sun Jun 17, 2012 10:49 am 
Offline
Engineer
Engineer

Joined: Wed Dec 14, 2011 12:55 am
Posts: 28
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.


I was running 1.2 Openttd. 104 never crashes, 154 crashes lot .
wip and any inprovement planned?


Top
   
 Post subject: Re: DictatorAI
PostPosted: Sun Sep 02, 2012 12:09 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
I guess it is a typo, but your manual says that one need OpenTTD 1.5 to run DictatorAI.

Quote:
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)


Top
   
 Post subject: Re: DictatorAI
PostPosted: Mon Sep 03, 2012 11:41 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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)


Top
   
 Post subject: Re: DictatorAI
PostPosted: Sun Sep 16, 2012 4:47 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
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.


Attachments:
Tynspång Transport, 14th Mar 1982.png [14.25 KiB]
Downloaded 7 times

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Top
   
 Post subject: Re: DictatorAI
PostPosted: Mon Sep 17, 2012 10:55 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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 :P


Top
   
 Post subject: Re: DictatorAI
PostPosted: Tue Nov 06, 2012 11:41 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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.


Top
   
 Post subject: Re: DictatorAI
PostPosted: Wed Jan 02, 2013 3:51 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
Your dictator was extradicted in my current game, see attached image.


Attachments:
End of a dictator.png [590.69 KiB]
Downloaded 9 times

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10
Top
   
 Post subject: Re: DictatorAI
PostPosted: Wed Jan 02, 2013 5:39 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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.


Top
   
 Post subject: Re: DictatorAI
PostPosted: Wed Jan 02, 2013 8:28 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
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.

Your welcome and I'll have a look for 1.69 :).

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject: Re: DictatorAI
PostPosted: Wed Jan 02, 2013 10:15 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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.


Top
   
 Post subject: Re: DictatorAI
PostPosted: Thu Jan 03, 2013 10:11 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
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.

Sure, but it's not from the exact date as my report see http://tinyurl.com/b6d4wtk.

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject: Re: DictatorAI
PostPosted: Sat Apr 13, 2013 8:46 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Tue Apr 17, 2007 2:28 pm
Posts: 236
Hi. Reporting a crash

the index 'GetRoadStationEntry' does not exist.


Attachments:
Unnamed, 2016-11-07.sav [4.36 MiB]
Downloaded 82 times
screenshot#4.png [50.72 KiB]
Downloaded 4 times
Top
   
 Post subject: Re: DictatorAI
PostPosted: Mon Apr 15, 2013 10:15 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
Thank you for your report Samu. I will work on it.


Top
   
 Post subject: Re: DictatorAI
PostPosted: Wed Jul 31, 2013 2:31 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 97 posts ]  Go to page Previous 1 2 3 4 5 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.