Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Nov 18, 2017 12:20 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
 Post subject: Re: WmDOT v6
PostPosted: Thu Apr 28, 2011 6:05 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Leanden wrote:
I tried this AI, and it crashed straight out of the box.

Thanks for the report Leanden. This has been fixed with WmDOT v6 as well. The problem was caused by WmDOT failing to build a HQ, and then not knowing what to do next. WmDOT will now search a bigger area to build the HQ, and will try other towns if the first one doesn't work. If it still can't build a HQ, it will pass a parameter so at least it won't crash! :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
   
 Post subject: Re: WmDOT v6
PostPosted: Thu Apr 28, 2011 6:11 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
OTTDmaster wrote:
You lucky few - whenever I get WmDOT - I merely get a failed to compile /WmDOT-3/ and a failed to compile /WmDOT-5/.

EDIT: Downloaded from BaNaNas

Matthew:out


Matthew, this is strange... If you downloaded it from Bananas, you should have gotten the dependcies automatically, but you could check for them. With v6 of WmDOT, they are SuperLib v7, MinchinWeb's MetaLibrary (MetaLib) v1, Graph.AyStar v6, and Queue.FibonacciHeap v2. But many things could cause a crash because the AI's are compiled on-the-fly. Post a screenshot here of the crash and I'll see if I can tell you what's wrong.

_________________
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
   
 Post subject: Re: WmDOT v6
PostPosted: Fri Apr 29, 2011 1:13 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
Thanks for the update and the Cleanup Crew :)

MinchinWeb wrote:
Leanden wrote:
I tried this AI, and it crashed straight out of the box.

Thanks for the report Leanden. This has been fixed with WmDOT v6 as well. The problem was caused by WmDOT failing to build a HQ, and then not knowing what to do next. WmDOT will now search a bigger area to build the HQ, and will try other towns if the first one doesn't work. If it still can't build a HQ, it will pass a parameter so at least it won't crash! :D


Hm, does it need to build a HQ at all? I found it a bit strange when I came across a HQ WmDOT built since it's not a real competitor, but more of a "utility AI" ;) In one game I also killed off WmDOT via console (sorry :P) as soon as it had built a nice road network, so that on removal its roads became public (and thus removable by me when in the way).
AFAIK building a HQ has no advantage (apart from a few pax generated) or disadvantage (apart from costing some money).

Quote:
I'm not sure how to fix the problem more as WmDOT really has no conception of the network as a whole or really the map as a whole. Suggestions on how to improve this are welcome!

In the long run, I'd suggest the AI to abstract a bit from towns ("I need to connect every town with every other town") to routes, i.e. figure out some place (e.g. between two rather big towns rather far away) where a main route (think highway, it could even be made one with one way roads every x tiles) is constructed, and then normal roads splitting off from that highway wherever another town is nearby.

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: WmDOT v6
PostPosted: Fri Apr 29, 2011 4:55 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Mon Jul 23, 2007 3:13 pm
Posts: 294
Location: Somewhere in this page
MinchinWeb wrote:
OTTDmaster wrote:
You lucky few - whenever I get WmDOT - I merely get a failed to compile /WmDOT-3/ and a failed to compile /WmDOT-5/.

EDIT: Downloaded from BaNaNas

Matthew:out


Matthew, this is strange... If you downloaded it from Bananas, you should have gotten the dependcies automatically, but you could check for them. With v6 of WmDOT, they are SuperLib v7, MinchinWeb's MetaLibrary (MetaLib) v1, Graph.AyStar v6, and Queue.FibonacciHeap v2. But many things could cause a crash because the AI's are compiled on-the-fly. Post a screenshot here of the crash and I'll see if I can tell you what's wrong.


It appears to be the info.nut - that's killing WmDOT...
Attachment:
Unnamed, 6th Jan 1970.png [105.33 KiB]
Downloaded 3 times

After getting the newest version (6), it would appear to also be killing MetaLib.

I'd use the debug console - but I don't use windows...

EDIT: Dependencies are fine - except they aren't (see above)...

Matthew:out

_________________
Yay! I'm back! Did you miss me?


...


I thought not.


Top
   
PostPosted: Sat Apr 30, 2011 8:18 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
Hello, while taking a look at your MetaLib I found this function.

I guess you already use it without any problems, but to me it looks like this would not create a 3-dimensional array with independent cells. As far as I remember, Squirrel objects/arrays etc. are assigned by reference and not by value. But it could be that Squirrel don't model arrays as objects, but rather as a built in type (like eg. integers, floats etc.) and thus assign them by value.

Code:
function _MetaLib_Array_::Create3D(length, width, height)
{
    local ReturnArray = [length];
    local tempArray = [width];
    local tempArray2 = [height];
   
    for (local i=0; i < width; i++) {
        tempArray[i] = tempArray2;
    }
   
    for (local i=0; i < length; i++) {
        ReturnArray[i] = tempArray;
    }
   
    return ReturnArray;
}

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


Top
   
 Post subject: Re: WmDOT v6
PostPosted: Sat Apr 30, 2011 5:10 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Roujin wrote:
Thanks for the update and the Cleanup Crew :)

You're welcome!

Roujin wrote:
Hm, does it need to build a HQ at all?

Because every bureaucracy needs a place to keep their minions! Actually, it's the first thing I got WmDOT to do, mostly because I thought it would look cool, and I thought it strange when AI's didn't build a HQ. Today, it is used as a rough form of save/load functionality - on reload, WmDOT looks for its HQ and recommences building the road network from there. The other place it's used is if you load up more then one copy of WmDOT, the HQ's is how they 'tell' each other where they are (otherwise the second copy keep trying to rebuild the roads the first one built and never actually builds anything new...)

Roujin wrote:
In one game I also killed off WmDOT via console (sorry :P) as soon as it had built a nice road network, so that on removal its roads became public (and thus removable by me when in the way).

If only we could do that when the real life version DOT builds a freeway in front of your house :wink: But no worries, I could see myself doing the same thing! Be aware though that with WmDOT will go any bridges or tunnels its built (that's also true if WmDOT goes bankrupt).

I'll keep thinking about the extra road issue...

_________________
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 Apr 30, 2011 5:31 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Zuu wrote:
Hello, while taking a look at your MetaLib I found this function.

I guess you already use it without any problems, but to me it looks like this would not create a 3-dimensional array with independent cells. As far as I remember, Squirrel objects/arrays etc. are assigned by reference and not by value. But it could be that Squirrel don't model arrays as objects, but rather as a built in type (like eg. integers, floats etc.) and thus assign them by value.

Code:
function _MetaLib_Array_::Create3D(length, width, height)


I'm pretty new with programming and this AI stuff is a way to learn more, so although I (think) I understand the difference between by reference and by value, and I have no idea how to test which Squirrel is doing... I don't know if I've ever used the 3D version, but I'm pretty sure I've used the 2D one; it does create an array that you can use .push() to right away and it seems to work for that...

_________________
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 Apr 30, 2011 11:54 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2544
Location: Kent
Well it works well, but it takes ages!!!! Anyway to make it go a bit faster. I'd only be running it until the road network was complete, so CPU speed wouldn't be an issue.

_________________
Image


Top
   
PostPosted: Fri Dec 30, 2011 4:36 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Feb 07, 2011 10:04 pm
Posts: 1183
Location: East Coast, United States
Sorry for the bump, I have no idea if this is still being maintained or not, great AI though.

The cleanup crew cleaned too much, apparently. :(

Attachment:
WmDOT.PNG
WmDOT.PNG [ 142.79 KiB | Viewed 3940 times ]


Also, re:how to make the program 'smarter', here's my suggestion (no idea if it's feasible, should be though):

1. Choose two large towns on opposite ends of the map (as far away as possible).

2. Construct a road between them, going near but not through as many towns as possible on the way, while keeping it straight.

3. Connect said towns to the highway with short roads.

4. For each other town, find the 'ideal' way to connect it to the network (short road to another town on the network? dedicated road to the highway?), having the AI 'prefer' an existing road, but not too much.

I don't know too much about programming, but this should be possible with a special pathfinder (maybe even something from SuperLib).

_________________
Like my avatar? See my screenshot thread
Chill's Patchpack, an awesome collection of OTTD patches


Top
   
PostPosted: Fri Dec 30, 2011 7:44 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Mon Jul 23, 2007 3:13 pm
Posts: 294
Location: Somewhere in this page
Yet another WmDOT problem:

Compile error: Error wmdot-6/info.nut:1/1: expression expected
Compile error: Error minchinwebs_metalibrary-1/library.nut:1/1: expression expected

Yawn.

Matthew:out

_________________
Yay! I'm back! Did you miss me?


...


I thought not.


Top
   
PostPosted: Sat Dec 31, 2011 2:02 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Level Crossing wrote:
Sorry for the bump, I have no idea if this is still being maintained or not, great AI though.
It is! And the Christmas holidays give me a great time to hopefully implement a few lurking ideas.

Level Crossing wrote:
The cleanup crew cleaned too much, apparently. :(
I've been having some troubles with this, and haven't figured out a good fix yet. I also have some issues on slopes sometimes. I'll look into it again.

Level Crossing wrote:
Also, re:how to make the program 'smarter', here's my suggestion (no idea if it's feasible, should be though):

1. Choose two large towns on opposite ends of the map (as far away as possible).
2. Construct a road between them, going near but not through as many towns as possible on the way, while keeping it straight.
3. Connect said towns to the highway with short roads.
4. For each other town, find the 'ideal' way to connect it to the network (short road to another town on the network? dedicated road to the highway?), having the AI 'prefer' an existing road, but not too much.

I don't know too much about programming, but this should be possible with a special pathfinder (maybe even something from SuperLib).
This indeed would be possible, and the pathfinder, as such, I think I have figured out. The problem with running the pathfinder on long distances is the time it takes goes up exponentially as distance increases (i.e. as your distance doubles, your time goes up 4x)*. The other current problem with the pathfinder is that if it can't find a path, which is often because the towns in question are on two different islands, it can take a very long time to fail. The combination has meant that I've favoured small steps, but I can see if I can dream up to make the network stretch across the map faster.

* The numbers might be a little off; I've never done the testing, but I hope the idea come across...

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ZirconiumX wrote:
Yet another WmDOT problem:

Compile error: Error wmdot-6/info.nut:1/1: expression expected
Compile error: Error minchinwebs_metalibrary-1/library.nut:1/1: expression expected
Hey Matthew,
Thanks for the report, but I'm not really sure how to 'fix' this... My guess is that your computer can't read the text files that make up WmDOT. Let me ask you some questions to see if I can figure out what the problem is:
    - Did you download my AI from here or from Bananas or through the OpenTTD downloader?
    - Do other AI's work?
    - Has WmDOT ever worked on your machine?
    - What OS are you running?
    - What version of OpenTTD are you running?
Thanks.

_________________
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 Jan 01, 2012 10:07 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Mon Jul 23, 2007 3:13 pm
Posts: 294
Location: Somewhere in this page
MinchinWeb wrote:
<snip>

ZirconiumX wrote:
Yet another WmDOT problem:

Compile error: Error wmdot-6/info.nut:1/1: expression expected
Compile error: Error minchinwebs_metalibrary-1/library.nut:1/1: expression expected
Hey Matthew,
Thanks for the report, but I'm not really sure how to 'fix' this... My guess is that your computer can't read the text files that make up WmDOT. Let me ask you some questions to see if I can figure out what the problem is:
  • Did you download my AI from here or from Bananas or through the OpenTTD downloader?
  • Do other AI's work?
  • Has WmDOT ever worked on your machine?
  • What OS are you running?
  • What version of OpenTTD are you running?
Thanks.


  1. Bananas - however even Bananas doesn't recognise the fact that it has been downloaded.
  2. Yes - I have a whole fleet of AIs working - except yours
  3. No - WmDOT is never recognised, ever.
  4. Mac OS X 10.4.11.
  5. 1.2.0-beta1.

/Off-topic
MinchinWeb - use [*] for each phrase to get the desired effect.

Matthew:out

_________________
Yay! I'm back! Did you miss me?


...


I thought not.


Top
   
PostPosted: Fri Jan 13, 2012 4:40 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Version 7 has been released!!

The biggest change is the addition of Operation Hibernia, which transports oil from Oil Rigs to Oil Refineries.

Image

The function has been written to transport cargo from sea-based industries. With this, it might just be enough to keep WmDOT from being destined for bankruptcy.

Please report bugs or other oddities.

For updates, I hope they will come quickly and include fixes to the issues in Operation Hibernia reported here, and improvements to the road pathfinder (bridge over rivers and railroads), and clean up crew improvements.

@ZiconiumX / Matthew: try the new version. The fact that both were error-ing out at the first character suggests it might be an encoding issue. I hope this will fix it...

_________________
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: Fri Jan 13, 2012 4:35 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9022
Location: Sol d
ZirconiumX wrote:
MinchinWeb wrote:
<snip>

ZirconiumX wrote:
Yet another WmDOT problem:


Do you have an Intel or a PowerPC CPU?

_________________
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
   
PostPosted: Sun Jan 22, 2012 12:45 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
Version 8 Released!

Mostly to take advantage of the improvements available thru an update to MetaLibrary. Improvements include:
  • Fixes a bug where WmDOT would crash if there were no towns above the population limit.
  • Can now bridge over canals, rivers, and railroad tracks.
  • Operation DOT's initial spread is based on the speed of available buses, rather than hardcoded.
  • Operation Hibernia will now make use of existing buoys.
  • Operation Hibernia can now join distance stations.
  • Minor improvements to Cleanup Crew (but I think it still has some bugs to be worked out...)

Available at the first post 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: Tue Jan 24, 2012 9:10 pm 
Offline
Chief Executive
Chief Executive
User avatar

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

I have a bug report for you, regarding operation Hibernia. For some reason when using FIRS; the AI is insistent that it has to build a buoy next to fishing grounds and set a route between the buoy, a depot, and a port (that is obstructed by the depot)... The result is that the AI ploughs thousands into a group of ships that make no money, and the AI goes bankrupt... Game started in 1860, currently at 1965... You can also see some of the oddities of WMDot building roads between towns over the 100+ years...

Savegame and Screen Below...

Interestingly, if i take-over the AI and a new one sets up, it builds the exact same route on the same part of the map, just in the tile next to the previous companies buoy/port/depot

Attachment:
File comment: Screenie
Fishergate Logistics, 7th Feb 1963.png [124.09 KiB]
Downloaded 3 times


Regards

Jacob


Attachments:
File comment: Savegame
Fishergate Logistics NewGRF Modded (UKRS2+ FIRS).sav [267.07 KiB]
Downloaded 117 times

_________________
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: Wed Jan 25, 2012 12:48 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 226
JacobD88 wrote:
I have a bug report for you, regarding operation Hibernia. (..)


Thanks for the bug report. I can't open the savegame because of a number of GRF files that aren't on Bananas, and don't show up in Google. Would you be able to send me them, or a link to where to download them, please?
Attachment:
screenshot.png
screenshot.png [ 6.54 KiB | Viewed 3586 times ]


Operation Hibernia starts with a list of unserviced sea-based industries, and so until someone provides service to the fishing grounds in question, it will likely always be the best pick.

The 'extra' buoy is kind of odd... as for the harbour, it should still be reachable...

_________________
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: Wed Jan 25, 2012 12:50 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2544
Location: Kent
I can see at least one GRF which is in there that you won't get sent to you or find on the internet. (SACSobjects)

_________________
Image


Top
   
PostPosted: Wed Jan 25, 2012 1:23 am 
Offline
Tycoon
Tycoon

Joined: Sun Dec 16, 2007 10:24 pm
Posts: 1628
Location: Idaho, USA
Leanden wrote:
I can see at least one GRF which is in there that you won't get sent to you or find on the internet. (SACSobjects)


O RLY?! viewtopic.php?f=26&t=8919&p=884508#p884508

:wink:

_________________
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton


Top
   
PostPosted: Wed Jan 25, 2012 6:32 pm 
Offline
Chief Executive
Chief Executive
User avatar

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

Thanks for the prompt reply, as mentioned above, im not really able to send you GRFs due to some of the licences, but i can tell you what they are...

The Seaplane Airport is in the forums
As is newobjects_mq
SACs objects has already been linked; i didn't know it had been released
TreesW.GRF is the October 2007 release of SACs Trees (By George)
TTD Landscape is on Bananas and in the forums/grfcrawler
FIRS Nightlies are available on the development thread
All the others are on Bananas or GRF Crawler

I'll PM you if you need help finding anything else...

Many thanks

Jacob

_________________
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!


Last edited by JacobD88 on Thu Jan 26, 2012 10:25 am, edited 1 time in total.

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

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