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 128 29 30 31 32 Next
Author Message
 Post subject: Re: AdmiralAI v25
PostPosted: Sat Jan 08, 2011 4:11 pm 
Offline
Engineer
Engineer

Joined: Sun Apr 01, 2007 1:08 pm
Posts: 2
Location: Brno, Czech Republic
I'm playing with eGRVTS and AdmiralAI consistently makes bad choices of vehicles. eGRVTS inlcudes some vehicles that are almost never profitable, mainly the early steam cars, but AdmiralAI seems to like them for some reason. It will inevitably bankrupt.

See the included image


Attachments:
Brünschalinen, 19th Nov 1874.png [213.14 KiB]
Downloaded 1 time
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Fri Feb 18, 2011 10:13 am 
Offline
Engineer
Engineer

Joined: Fri Feb 18, 2011 10:07 am
Posts: 1
Hi,

I have the following problem with AdmiralAI, it occurs just after the electric rails have been discovered.

Image

Uploaded with ImageShack.us

How can it be resolved ?

Many thanks.

kiome


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Mar 17, 2011 6:52 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9062
Location: Sol d
In some tests I had AdmiralAI start. It did start well with a train route and air service. Looking at the train routes I wondered though whether it might not want to pick slightly longer, more profitable routes (AdmiralAI: yellow. The blue company came 2nd).

Also I noticed that the track building algorithm by AIAI and AdmiralAI vary a lot. To me it seems that AdmiralAI always builds one direction first and only then builds the other direction of tracks between stations, with quite some thought time passing between that (and also between building stations and building track). It might be an idea to jointly path find both tracks or only build the path is found. AIAI builds both directions at the same time and it looks like an interesting concept (upper unfinished tracks which are being build that very moment)


Attachments:
Unnamed, 2021-01-05.png [79.35 KiB]
Downloaded 1 time

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Mar 17, 2011 6:56 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
It is not AIAI. AIAI is constructing first track and later it is trying to build second.

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Sun Apr 10, 2011 5:38 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
I had AdmiralAI crash with the same error as kiome. As his screenshot is on a slow external server I've attached a screenshot of my error even if it is a duplicate.

Edit: I'm using r22302 + the OpenGFX+ sets. I've also attached the savegame if it is of any help. I believe the crash happened quite some time ago as I didn't notice it until I was to save the game.


Attachments:
Hinwood Transport, 10th Jul 1970.png [22.07 KiB]
Downloaded 1 time
Me and AI.sav [518.09 KiB]
Downloaded 84 times

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Wed Apr 20, 2011 8:14 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9062
Location: Sol d
I did it again, let the AIs have fun with my NewGRF testgame while I was at work. This time AdmiralAI crashed on me (savegame and custom newgrfs attached):

Code:
dbg: [ai] [1] [S] Your script made an error: assertion failed
dbg: [ai] [1] [S]
dbg: [ai] [1] [S] *FUNCTION [BuildPath()] AdmiralAI-25.tar/admiralai-25/rail/railroutebuilder.nut line [571]
dbg: [ai] [1] [S] *FUNCTION [TestBuildPath()] AdmiralAI-25.tar/admiralai-25/rail/railroutebuilder.nut line [541]
dbg: [ai] [1] [S] *FUNCTION [ConnectRailStations()] AdmiralAI-25.tar/admiralai-25/rail/railroutebuilder.nut line [307]
dbg: [ai] [1] [S] *FUNCTION [BuildNewRoute()] AdmiralAI-25.tar/admiralai-25/rail/trainmanager.nut line [354]
dbg: [ai] [1] [S] *FUNCTION [Start()] AdmiralAI-25.tar/admiralai-25/main.nut line [701]
dbg: [ai] [1] [S]
dbg: [ai] [1] [S] [orig_path] INSTANCE
dbg: [ai] [1] [S] [prevprev] 85990
dbg: [ai] [1] [S] [prev] 85989
dbg: [ai] [1] [S] [path] INSTANCE
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [test] INSTANCE
dbg: [ai] [1] [S] [path] INSTANCE
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [building_ok] false
dbg: [ai] [1] [S] [num_retries] 0
dbg: [ai] [1] [S] [first_path] INSTANCE
dbg: [ai] [1] [S] [path] INSTANCE
dbg: [ai] [1] [S] [path2] false
dbg: [ai] [1] [S] [pf2] INSTANCE
dbg: [ai] [1] [S] [track_near_station_b_already_build] false
dbg: [ai] [1] [S] [track_near_station_a_already_build] false
dbg: [ai] [1] [S] [platform_length] 4
dbg: [ai] [1] [S] [tile] 87016
dbg: [ai] [1] [S] [goals] ARRAY
dbg: [ai] [1] [S] [sources] ARRAY
dbg: [ai] [1] [S] [pf] INSTANCE
dbg: [ai] [1] [S] [ignored] INSTANCE
dbg: [ai] [1] [S] [station_b] 372
dbg: [ai] [1] [S] [station_a] 371
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [station_to] INSTANCE
dbg: [ai] [1] [S] [station_from] INSTANCE
dbg: [ai] [1] [S] [@ITERATOR@] 266
dbg: [ai] [1] [S] [dummy] 95
dbg: [ai] [1] [S] [ind_to] 266
dbg: [ai] [1] [S] [ind_acc_list] INSTANCE
dbg: [ai] [1] [S] [@ITERATOR@] 144
dbg: [ai] [1] [S] [dummy] 91
dbg: [ai] [1] [S] [ind_from] 144
dbg: [ai] [1] [S] [val_list] INSTANCE
dbg: [ai] [1] [S] [@ITERATOR@] 6
dbg: [ai] [1] [S] [dummy] 724
dbg: [ai] [1] [S] [cargo] 6
dbg: [ai] [1] [S] [cargo_list] INSTANCE
dbg: [ai] [1] [S] [rail_type_list] INSTANCE
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [veh_list] INSTANCE
dbg: [ai] [1] [S] [build_route] false
dbg: [ai] [1] [S] [last_type] 1
dbg: [ai] [1] [S] [build_road_route] 3
dbg: [ai] [1] [S] [build_busses] false
dbg: [ai] [1] [S] [start_tick] 2
dbg: [ai] [1] [S] [group_list] INSTANCE
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] The AI died unexpectedly.
dbg: [ai] The AI died unexpectedly.


Attachments:
File comment: savegame
random_AI_test2.sav [662.86 KiB]
Downloaded 78 times
File comment: required industries newgrf
ogfx-industries.zip [16.11 KiB]
Downloaded 86 times

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Apr 21, 2011 8:45 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 09, 2004 9:14 pm
Posts: 50
Location: Leiden
Is there any developement going on for this AI?
I really liked to play a game against it, but the crashes prevents it.
Hopefully an update for this AI will be released soon.


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Wed Apr 27, 2011 9:43 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9062
Location: Sol d
Same bug as Zuu describes, after 36 game years. But it was stressed hard, but did better for years than most AI, when I activated mid-game the cargo destinations in my YACD game (before it was ranked 2nd or 3rd):
Code:
dbg: [ai] [1] [S] Your script made an error: parameter 2 has an invalid type 'null' ; expected: 'integer'
dbg: [ai] [1] [S]
dbg: [ai] [1] [S] *FUNCTION [ConvertRailType()] AdmiralAI-25.tar/admiralai-25/stationmanager.nut line [333]
dbg: [ai] [1] [S] *FUNCTION [_UpdateRailType()] AdmiralAI-25.tar/admiralai-25/rail/trainline.nut line [371]
dbg: [ai] [1] [S] *FUNCTION [CheckVehicles()] AdmiralAI-25.tar/admiralai-25/rail/trainline.nut line [413]
dbg: [ai] [1] [S] *FUNCTION [CheckRoutes()] AdmiralAI-25.tar/admiralai-25/rail/trainmanager.nut line [236]
dbg: [ai] [1] [S] *FUNCTION [DoMaintenance()] AdmiralAI-25.tar/admiralai-25/main.nut line [545]
dbg: [ai] [1] [S] *FUNCTION [Start()] AdmiralAI-25.tar/admiralai-25/main.nut line [680]
dbg: [ai] [1] [S]
dbg: [ai] [1] [S] [tile] 184512
dbg: [ai] [1] [S] [tiles] INSTANCE
dbg: [ai] [1] [S] [rail_type] 1
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [new_type] 1
dbg: [ai] [1] [S] [rail_type_list] INSTANCE
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [@ITERATOR@] 1
dbg: [ai] [1] [S] [route] INSTANCE
dbg: [ai] [1] [S] [@INDEX@] 0
dbg: [ai] [1] [S] [need_money] false
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [ret2] false
dbg: [ai] [1] [S] [ret1] false
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [last_type] 1
dbg: [ai] [1] [S] [build_road_route] 3
dbg: [ai] [1] [S] [build_busses] false
dbg: [ai] [1] [S] [start_tick] 5
dbg: [ai] [1] [S] [group_list] INSTANCE
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] The AI died unexpectedly.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Fri May 27, 2011 3:58 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 888
I got a similar crash to Zuu's and planetmaker's crash, only the line number in stationmanager.nut is different.
I'm playing OpenTTD without patches, with the Generic Tram Set and the Temperate Oil Wells Only Decrease Neutraliser as the only NewGRFs. I have a savegame before the crash as well, but quite a long time has passed since then...


Attachments:
AdmiralAI crash.png
AdmiralAI crash.png [ 25.05 KiB | Viewed 4734 times ]
AI testing.sav [647.86 KiB]
Downloaded 80 times
Top
   
 Post subject: Admiral AI crash report
PostPosted: Wed Jun 15, 2011 12:19 am 
Offline
Engineer
Engineer

Joined: Fri Feb 27, 2009 4:57 pm
Posts: 2
Admiral AI consistently crashes in the current game.

I am attempting to attach screen shots of two error messages but I'm not very tech savvy so please excuse any error.


Attachments:
AICrashCapture.JPG [80.3 KiB]
Downloaded 1 time
AdmiralAI.JPG
AdmiralAI.JPG [ 72.96 KiB | Viewed 4634 times ]
Top
   
PostPosted: Wed Jun 15, 2011 12:20 am 
Offline
Engineer
Engineer

Joined: Fri Feb 27, 2009 4:57 pm
Posts: 2
Here is the other promised screen shot.

Thanks for any guidance you may offer.


Attachments:
File comment: Alternate screen shot of error report
AdmiralAI.JPG
AdmiralAI.JPG [ 72.96 KiB | Viewed 4633 times ]
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Wed Jun 15, 2011 12:27 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9062
Location: Sol d
The savegame itself might be sometimes interesting, though the screenshots you provided often go a loong way :-)

Please attach bug reports with a specific AI to its respective thread, e.g.. this one in the case of Admiral AI ;-)

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Jun 23, 2011 8:38 pm 
Offline
Engineer
Engineer

Joined: Thu Feb 11, 2010 8:05 pm
Posts: 29
AdmiralAI crashed when electric rails was introduced.


Attachments:
Nardingstone Bay Transport, 8th May 1966.png [308.33 KiB]
Downloaded 1 time
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Fri Jun 24, 2011 11:54 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 888
I took the liberty and tried to fix the bug in ConvertRailType. The problem is that after loading from a savegame, the _platform_length field of the StationManager instances remain uninitialised. So I inserted an AfterLoadSetPlatformLength function into the StationManager class, which is a slightly modified version of SimpleAI's GetRailStationPlatformLength. It took me quite a while to realise that you don't even use the Save() and Load() functions of StationManager :)
Here are the diffs: (these are my first diff files ever made, so they may be wrong :) )
Attachment:
stationmanager.diff [1.29 KiB]
Downloaded 97 times

Attachment:
trainmanager.diff [839 Bytes]
Downloaded 86 times

Is the fix OK?

By the way, your SVN repository at http://noai.openttd.org/svn/ai-admiralai/ doesn't seem to work, it's giving me error 502 (Bad gateway).


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Fri Jun 24, 2011 3:05 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
The NoAI SVN has been down for ages. Most AI in active development have moved to openttdcoop

Also i think (not sure) Yexo may have already fixed the bug, just never bothered to release a fixed version

_________________
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: Fri Jun 24, 2011 4:09 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 888
Hmm... I realised that there is a new version just one page back after I posted my diffs :)

It seems to me that this particular bug has been fixed, but there is a typo in the code where it loads pre-v26 savegames. Loading this savegame fails:


Attachments:
crash this.sav [373.38 KiB]
Downloaded 79 times
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Thu Jul 28, 2011 10:43 am 
Offline
Engineer
Engineer

Joined: Sun Oct 25, 2009 9:56 am
Posts: 69
Location: Belgium
It seems to have problems finding the second rail outgoing of this station and so it gave up and started building a new route (the station at the bottom of the screenshot).

Immediately after it had the same problem although if pathfinder would have looked a bit harder it might have found a possible route.


Attachments:
File comment: unfinished route
admiral.png [235.9 KiB]
Downloaded 1 time
File comment: immediately after
admiral2.png [887.57 KiB]
Downloaded 1 time

_________________
--------------------------------------------------
MailAI, a casual postal service for openTTD.
--------------------------------------------------
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Tue Oct 25, 2011 9:43 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Small suggestion, in function TownManager::ImproveTownRating

Code:
      foreach (tile, dummy in list) {
         AITile.PlantTree(tile);
      }
      /* Check whether the current rating is good enough. */
      if (AITown.GetRating(town_id, AICompany.COMPANY_SELF) >= min_rating) return true;


may be replaced with

Code:
      foreach (tile, dummy in list) {
         AITile.PlantTree(tile);
         /* Check whether the current rating is good enough. */
         if (AITown.GetRating(town_id, AICompany.COMPANY_SELF) >= min_rating) return true;
      }


or even entire loop may be modified

Code:
   for (local size = 3; size <= 1000; size++) {
      local list = AITileList();
      SafeAddRectangle(list, location, size);
      list.Valuate(AITile.IsBuildable);
      list.KeepValue(1);
      /* Don't build trees on tiles that already have trees, as this doesn't
       * give any town rating improvement. */
      list.Valuate(AITile.HasTreeOnTile);
      list.KeepValue(0);
      foreach (tile, dummy in list) {
         if(AITile.GetClosestTown(tile) != town_id)return false;
         AITile.PlantTree(tile);
         /* Check whether the current rating is good enough. */
         if (AITown.GetRating(town_id, AICompany.COMPANY_SELF) >= min_rating) return true;
      }
   }

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Sun Jan 29, 2012 9:51 pm 
Offline
Tycoon
Tycoon

Joined: Sat Jun 12, 2004 12:37 am
Posts: 1395
Location: United Kingdom of Great Britain and Northern Ireland
I had it crash out of the blue:


Attachments:
Clipboard01.jpg
Clipboard01.jpg [ 68.53 KiB | Viewed 3769 times ]
Top
   
 Post subject: Re: AdmiralAI v25
PostPosted: Mon Jan 30, 2012 10:21 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 888
There is a newer version posted on the previous page (link), which AFAIK doesn't have this bug. Loading the savegame may be a problem, but it's only a typo in the code, so you should be able to fix it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 627 posts ]  Go to page Previous 128 29 30 31 32 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.