Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 10, 2018 9:55 am

All times are UTC




Post new topic  Reply to topic  [ 627 posts ]  Go to page Previous 126 27 28 29 3032 Next
Author Message
 Post subject: Re: AdmiralAI v25
PostPosted: Sat Aug 14, 2010 10:01 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
If you can reproduce that problem I'd like to see that savegame very much. It's something that is definitely not fixed between version 22 and 25, I suspect you have been changing newgrfs, but I'm not sure that is the cause of the problem. Even in that case I'd like to try and fix it in my AI.


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Sun Aug 15, 2010 11:50 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Apr 24, 2005 9:21 pm
Posts: 387
Location: Torquay, England
After updating to v25, I got a more serious crash:

viewtopic.php?f=31&t=49683&p=896556#p896556


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Aug 17, 2010 12:32 pm 
Offline
Engineer
Engineer

Joined: Tue Aug 17, 2010 12:18 pm
Posts: 6
Hi all,

I just got an error in a game where I played against seven Admiral AI's (v25).
I think the problem occured when Electric loc's were introduced and the (only) AI having trains tried to change his tracks into wired tracks.


Regards


Attachments:
screencap1.JPG [353.9 KiB]
Downloaded 2 times
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Wed Aug 18, 2010 9:12 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 09, 2004 9:14 pm
Posts: 50
Location: Leiden
Hi, I'm playing a game against 3 AdmiralAI's and just ran into a crash of it.
I've attached a screenshot of the crash, a savegame which I made just after the crash and the last autosave before the crash.


Attachments:
File comment: Screenshot of the crash
Admiral_AI_crash.png [473.75 KiB]
Downloaded 2 times
File comment: Savegame made just after the crash
United movers, 12th Jan 1967.sav [1.17 MiB]
Downloaded 66 times
File comment: Last autosave before the crash
autosave4.sav [1.16 MiB]
Downloaded 59 times
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Wed Aug 18, 2010 10:35 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
Flaggerdagger and Yisc thanks for your reports. I suspect that the save/load code is still not working correctly, I'm currently trying to fix this bug.


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Aug 19, 2010 4:20 pm 
Offline
Engineer
Engineer

Joined: Tue Feb 23, 2010 3:44 pm
Posts: 103
It's a little bit offtopic, but it would be interesting for me: Is it really better to initialise variables with 'null'? Why not just set new variables to digital '0'?
I often read this error with the 'invalid type null' in bug reports.
I think you're really a good programer and you know what you are doing. So, what is the advantage of using null?


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Aug 19, 2010 4:38 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
This way I get a much better bug report. If I initialized the value to 0 I could get a "divide by zero" error a few lines later, which would then leave me wondering whether I forgot to initialize the value completely or whether the value was incorrectly initialized to 0. With null when I see the bug report I know immediately that I forgot to initialize this variable somewhere. Where exactly that is I still need to find out, but at least the cause of the bug is clear.

In this particular case when the value was initialized to 0 instead of null the AI would not crash but would instead build stations incorrectly. That would give other (much more obscure) bug reports, which are much harder to trace. In general I prefer a crash of the AI above unexpected behavior, because a crash if a lot easier to trace and fix.


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Aug 19, 2010 7:32 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 09, 2004 9:14 pm
Posts: 50
Location: Leiden
I've investigated a little more and started playing tonight with the already supplied autosave.
At the 1st of january 1967 the SH30 electric train is introduced and then again the AI crashed at the 12th of januari 1967. (which happened at the same date yesterday)
Hopefully this will give you some extra information to determine where it's going wrong.


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Mon Aug 23, 2010 6:51 am 
Offline
Engineer
Engineer

Joined: Tue Aug 17, 2010 12:18 pm
Posts: 6
Lol! That was exactly the same with my game. When E-locs (SH30) were introduced, error came up.
Good luck with the fix! If you need any other info / files, just say so :)


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Aug 31, 2010 12:00 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
Another null/integer crash - in year 1974...
Screenie:


Attachments:
Valencia Transport r20676, 13th Jan 1974.png [200.54 KiB]
Downloaded 2 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'!
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Fri Sep 03, 2010 6:10 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 09, 2004 9:14 pm
Posts: 50
Location: Leiden
I don't want to sound impatient, but any chance this problem will be fixed soon?


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Sat Oct 02, 2010 11:57 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
not a bug as such, but while running the AI trains only i got this train jam:


Attachments:
admiralai train jam.png [268 KiB]
Downloaded 1 time
File comment: can't remember what version but it was definitely <r20600
admiralai train jam.sav [198.53 KiB]
Downloaded 63 times

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Sun Oct 24, 2010 1:01 pm 
Offline
Tycoon
Tycoon

Joined: Sat Jun 12, 2004 12:37 am
Posts: 1395
Location: United Kingdom of Great Britain and Northern Ireland
Running v25 with FIRS and the Japanese trainset. The AI builds a valid route between unserved stations, it builds a train, it gives the train orders, but it doesn't start the train. The reason is because the particular wagons it's using for that train require a brake-van but the AI doesn't build one. Is there a way for Admiral to discover this requirement without it having to be hard-coded for each GRF?


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Sun Oct 24, 2010 2:11 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
Unfortunately not, because there is no way for the newgrf to specify that requirement to OpenTTD other than by disallowing to start the vehicle (which can be for a number of reasons). What AdmiralAI can do is detect the failure to start the vehicle and not build that combination of engine+wagons again. It'll have to rediscover that ever game, so it's not a very good solution but better than nothing.


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Oct 26, 2010 2:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
hmm.

i could swear that i saw SimpleAI add a brake van to one of its trains...
I'd confirm it now but my computer is out of action :(

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Oct 26, 2010 3:05 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 888
Lord Aro wrote:
i could swear that i saw SimpleAI add a brake van to one of its trains...

??? Really? :D
SimpleAI doesn't have support for NewGRF trainsets. It may work in some cases, but the term 'brake van' is unknown for SimpleAI.
I think you saw a mail wagon attached to a passenger train instead... :wink:


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Oct 26, 2010 3:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
nope, was definately a brake van, i checked on the train info :?

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Oct 26, 2010 3:12 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
Can you provide a savegame where simpleai does that?


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Oct 26, 2010 5:07 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
ok, i take that back.
I can't find the savegame a originally noticed it in, but testing shows that it was probably UKRS2 with it adding a lookalike on the end of the train

Sorry for wasting your time :lol:

However, perhaps this is something to add to the NewGRF/AI spec? Whether the wagon needs a brake van or not, and defining a brake wagon. Perhaps?

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Nov 09, 2010 11:20 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 09, 2004 9:14 pm
Posts: 50
Location: Leiden
Any news about a possible new version of this AI?
I would really like to play on with it, but am still stuck with this crash when SH30 is introduced.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 627 posts ]  Go to page Previous 126 27 28 29 3032 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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.