Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Sep 25, 2017 4:43 pm

All times are UTC




Post new topic  Reply to topic  [ 112 posts ]  Go to page Previous 1 2 3 4 5 6 Next
Author Message
PostPosted: Thu Jan 26, 2012 4:16 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Thanks to the wonderful people on this forum (with a little help from Google and the GRF Crawler), I have managed to find all the files needed. The behavior is...odd. For some reason, my function to find the station at the Fishing Grounds is failing. Most investigation and coding to follow...

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department


Top
   
PostPosted: Sat Mar 03, 2012 11:10 pm 
Offline
Engineer
Engineer

Joined: Sun Oct 11, 2009 9:47 am
Posts: 6
Hi - I am receiving the following error on initialisation of the AI. This is a fresh Windows install, so I downloaded the latest nightly and then downloaded the AI through the in-game online content. I searched the error message and it looks like AIAbstractList is obsolete now?

Image

Usually I'd give up and move on but I love the idea of this AI. Thanks for any help!


Top
   
PostPosted: Sun Mar 04, 2012 12:37 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
doublehappy wrote:
Hi - I am receiving the following error on initialisation of the AI. This is a fresh Windows install, so I downloaded the latest nightly and then downloaded the AI through the in-game online content. I searched the error message and it looks like AIAbstractList is obsolete now?
(..)
Usually I'd give up and move on but I love the idea of this AI. Thanks for any help!

Thanks for the report. AIAbstractList has indeed been replaced, but I guess I must have missed this one :( I'll try and fix it right away, this should be an easy fix :D

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department


Top
   
PostPosted: Sun Mar 04, 2012 1:12 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
I believe that is a bug in SuperLib. I think you could do this at global scope to fix it until version 22 is out:
Code:
AIAbstractList <- AIList

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


Top
   
PostPosted: Sun Mar 18, 2012 3:13 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Version 9 has been released! Available in the first post on or Bananas. Improvements include:
  • Now supports all of FIRS' water industries
  • Code fixes due to updated AI framework (doublehappy's bug and Zuu's solution, among others)
  • Should be better at building ship routes that actually connect! (JacobD88's bug)
Thanks for all your comments!

I will keep trying to fix bugs as they are reported. As for the next addition to WmDOT, I would like to improve the ship pathfinder, improve ship selection, move to dynamic route management, and move OpDOT (the road building) to a grid based system (hopefully to improve speed on larger maps).

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department


Top
   
PostPosted: Tue Mar 20, 2012 1:39 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Apr 08, 2008 9:47 am
Posts: 228
Location: Finland
There appears to be something wrong with WmDOT version 9 on Bananas, in that OpenTTD doesn't load it at all.


Top
   
PostPosted: Thu Mar 22, 2012 12:33 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Core Xii wrote:
There appears to be something wrong with WmDOT version 9 on Bananas, in that OpenTTD doesn't load it at all.
WmDOT v9 requires version 1.2 of the API and so requires r23879 (or thereabouts) or the latest release candidate version. I've updated Bananas so the download shouldn't show up if your version of OpenTTD can't load it. Sorry for the confusion!

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department


Top
   
PostPosted: Sun May 27, 2012 5:40 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Sep 06, 2004 7:38 am
Posts: 269
Location: Vantaa, Finland
First of all, thanks for this great AI: a perfect fix for the ridiculous gridlock 2x StreetTraffic with 500 cars max each causes in cities I'm not connecting myself :)

I was wondering, would it be possible (with the current pathfinder) to make it be able to build motorways? Something simple like this:
Image

I read earlier in the thread about the problems of long-distance roads & calc time. I wonder if that could be reduced by limiting the max # of turns between two cities to one or two (then either bridge/tunnel any obstacles). I just wonder if the stock pathfinder can be used to do this. Or if it even can handle one-way roads for that matter.


Nevertheless this AI will be a great addition to the coop multiplayer games my friends and I have, making the game world feel a bit more "real" ;)


Top
   
PostPosted: Mon May 28, 2012 7:47 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Hey Paasky! So glad to hear you're loving my AI!

Paasky wrote:
First of all, thanks for this great AI: a perfect fix for the ridiculous gridlock 2x StreetTraffic with 500 cars max each causes in cities I'm not connecting myself :)

I was wondering, would it be possible (with the current pathfinder) to make it be able to build motorways? Something simple like this:

I read earlier in the thread about the problems of long-distance roads & calc time. I wonder if that could be reduced by limiting the max # of turns between two cities to one or two (then either bridge/tunnel any obstacles). I just wonder if the stock pathfinder can be used to do this. Or if it even can handle one-way roads for that matter.

Nevertheless this AI will be a great addition to the coop multiplayer games my friends and I have, making the game world feel a bit more "real" ;)

Motorways (or freeways) would indeed be possible. Building one way roads instead of two way roads is a simple change. The pathfinder is directional, so running it both directions would give you both sides of the freeway. This would double your pathfindering time, but that would be fine as long as you don't try to go from one end of the map to the other at once (where pathfinding time is already a problem).

The hard part is actually more in the aesthetics. Running the pathfinder as it is, there is no way to enforce 'drive on the right' or 'drive on the left' rules, or to keep the two highways from crossing each other, or to keep the two highways side by side. How do you find the end of existing freeways to continue them? How long do you make the access road?

To some extent, the fact that the highways might not be side by side is a feature rather than a bug - it's used often in the real world where it's called 'independent gradelines' and used to get gentler hills.

But I love the idea, so I'll see what can be done with it next time I sit down to work on WmDOT.

P.S. I think they'd rather you upload pictures to the forum here, rather than use something like Imgur. That way, they can better make sure that the images don't disappear before the post does.

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department


Top
   
PostPosted: Tue May 29, 2012 9:42 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Sat Aug 16, 2008 5:51 pm
Posts: 672
Location: Long Eaton, Nottinghamshire. UK
Hi Minchinweb,

With regards to motorways i envisage one more problem; junctions...

Once the AI has built the motorways you won't be able to join roads on to them unless you buy the AI out as you can't add junctions to one-way roads and you can't modify the road section to stop it being one-way because you don't own it.

Unless a solution can be found this would make WMDot a pain, as one of the things i love about the AI now is you can just join on to its road network as you please, even if the AI's company isn't purchased...

_________________
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
Image
I now work for DE PHOTO - CLICK TO BOOK US TO SHOOT YOUR EVENT! We Shoot Kids with Canons!


Top
   
PostPosted: Tue May 29, 2012 6:56 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
Regarding junctions:
Convert wmDOT into a GameScript, then players who want a junction can propose that by placing a sign where they want a junction with some pre-defined content (eg. "junction please") Or, keep wmDOT as an AI and create a game script that reads player signs that contain human readable commands to AIs and post that using SCP to the AI.

Or, build highways with one-way signs only every X tiles. Eg. every 3-4 tiles. That then allows players, towns or AIs to add junctions if they wish.

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


Top
   
PostPosted: Thu Jun 28, 2012 4:06 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Version 10 released! The most notable improvement is that WmDOT is dynamically add ships. It isn't smart enough to delete ships yet, so we'll just cross our fingers that industry production just never goes down... Ship depots also will not longer be built right next to docks.

I hope the next version will add the ability to delete ships if too many are in circulation and replace ships when they get old.

No freeways have been built yet... I'm still considering the best way deal with junctions and access roads.

Available at the first post of this thread or on Bananas.

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department


Top
   
PostPosted: Thu Jun 28, 2012 8:26 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
Junctions/freeways: Could it detect the presence of player-built roads leading up to the freeway, and then build a junction to them?

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.


Top
   
PostPosted: Fri Jun 29, 2012 5:46 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
If you accept a delay of 1-2 months, it is possible for the GS to detect your road. If you want quicker action (and saved CPU time), it can be made that the player must tell the GS by placing a sign with a specific message at near the road.

Scanning the list of signs is a few times a month is much quicker than doing advanced scanning of the map several times a month.

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


Top
   
PostPosted: Thu Jul 19, 2012 8:13 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
More junctions/motorways: Surely not every tile needs to be one-way? If every 4th tile (say) was one-way, this would still ensure that the road was used correctly, while still allowing other roads to be connected to the motorway.

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.


Top
   
PostPosted: Thu Jul 19, 2012 8:43 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Zuu wrote:
Convert wmDOT into a GameScript, (...)
I've considered this and even started working on a conversion, and had it running, but ran into issues as at the time because GameScripts couldn't build tunnels or bridges, and couldn't remove road tiles. I think the tunnels and bridges issue has been fixed, but I don't know if road removal works yet. Can anyone confirm that GameScripts can remove roads?

Zuu wrote:
Or, build highways with one-way signs only every X tiles. Eg. every 3-4 tiles. That then allows players, towns or AIs to add junctions if they wish.
FLHerne wrote:
More junctions/motorways: Surely not every tile needs to be one-way? If every 4th tile (say) was one-way, this would still ensure that the road was used correctly, while still allowing other roads to be connected to the motorway.
I'm thinking out loud trying to figure out what problems I might run into... the biggest one that comes to mind is that if I run the pathfinder in one direction, built the road with one-ways every few titles, and then run the pathfinder the other direction, what's to keep the two directions from continually merging and un-merging? (see picture below) Or worse yet, put a one-way arrow on the common (merged) piece effectively rendering the whole road one-way?
Attachment:
McAlpine & Co., 31st Jan 1950.png
McAlpine & Co., 31st Jan 1950.png [ 91.83 KiB | Viewed 3315 times ]


One option is to build a pathfinder that finds both directions at the same time (I know one of the AI's does that for rail pathfinding). This would probably help for pathfinding speed, but would require me to write (or heavy modify) a new pathfinder. One idea I've been playing with is a sort of 'meta-pathfinder' that would break longer pathfinding tasks into finding shorter paths between a series of grid points; maybe that could be easily expanded... Unfortunately, no code for that has been written yet either.

Thanks for taking an interest and helping me problem solve!

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department


Top
   
PostPosted: Thu Jul 19, 2012 8:57 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
Perhaps you could build it with all one-way signs, and then remove many of them?

Totally unrelated: When used with TownCars (and presumably if any other player was using the network), the Cleanup Crew tend to leave cars stranded on single tiles while removing road links. Would it be possible to make it remove roads carefully in order to avoid trapping cars?

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.


Top
   
PostPosted: Thu Jul 19, 2012 9:03 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
Dubious routing decision...
Attachment:
Unnamed, 2nd Sep 2002.png
Unnamed, 2nd Sep 2002.png [ 92.37 KiB | Viewed 3313 times ]


Fails to build a bridge...(also random loop)
Attachment:
Unnamed, 5th Apr 2002.png
Unnamed, 5th Apr 2002.png [ 81 KiB | Viewed 3313 times ]


What the... :shock:
Attachment:
Unnamed, 16th Nov 2001.png
Unnamed, 16th Nov 2001.png [ 138.09 KiB | Viewed 3313 times ]

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.


Top
   
PostPosted: Thu Jul 19, 2012 9:04 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
As previous, but with expensive bridge...
Attachment:
Unnamed, 25th Feb 2004.png [980.77 KiB]
Downloaded 3 times


EDIT: Too many crossroads :P
Attachment:
Black & Co., 17th Oct 2015.png
Black & Co., 17th Oct 2015.png [ 61.09 KiB | Viewed 3309 times ]


EDIT2: A random bridge thing.
Attachment:
Black & Co., 1st Apr 2018.png
Black & Co., 1st Apr 2018.png [ 109.93 KiB | Viewed 3308 times ]

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.


Top
   
PostPosted: Thu Jul 19, 2012 9:57 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
Two examples of useless bridges...


Attachments:
Black & Co., 13th May 2021#1.png
Black & Co., 13th May 2021#1.png [ 65.37 KiB | Viewed 3307 times ]
Black & Co., 13th May 2021.png
Black & Co., 13th May 2021.png [ 157.06 KiB | Viewed 3307 times ]

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 112 posts ]  Go to page Previous 1 2 3 4 5 6 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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-2017 phpBB Limited

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