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!Leanden wrote:I tried this AI, and it crashed straight out of the box.
WmDOT v14 [2016-08-29]
Moderator: OpenTTD Developers
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v6
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v6
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.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
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Re: WmDOT v6
Thanks for the update and the Cleanup Crew
AFAIK building a HQ has no advantage (apart from a few pax generated) or disadvantage (apart from costing some money).
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 ) 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).MinchinWeb wrote: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!Leanden wrote:I tried this AI, and it crashed straight out of the box.
AFAIK building a HQ has no advantage (apart from a few pax generated) or disadvantage (apart from costing some money).
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.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!
-
- Transport Coordinator
- Posts: 294
- Joined: 23 Jul 2007 15:13
- Location: Somewhere in this page
Re: WmDOT v6
It appears to be the info.nut - that's killing WmDOT... After getting the newest version (6), it would appear to also be killing MetaLib.MinchinWeb wrote: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.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
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.
...
I thought not.
Re: WmDOT v6 [2011-04-28]
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.
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: Select all
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)
Junctioneer (a traffic intersection simulator)
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v6
You're welcome!Roujin wrote:Thanks for the update and the Cleanup Crew
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:Hm, does it need to build a HQ at all?
If only we could do that when the real life version DOT builds a freeway in front of your house 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).Roujin wrote:In one game I also killed off WmDOT via console (sorry ) 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).
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v6 [2011-04-28]
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...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: Select all
function _MetaLib_Array_::Create3D(length, width, height)
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Re: WmDOT v6 [2011-04-28]
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.
- Level Crossing
- Tycoon
- Posts: 1187
- Joined: 07 Feb 2011 22:04
- Location: East Coast, United States
Re: WmDOT v6 [2011-04-28]
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.
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).
The cleanup crew cleaned too much, apparently.
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
-
- Transport Coordinator
- Posts: 294
- Joined: 23 Jul 2007 15:13
- Location: Somewhere in this page
Re: WmDOT v6 [2011-04-28]
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
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.
...
I thought not.
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v6 [2011-04-28]
It is! And the Christmas holidays give me a great time to hopefully implement a few lurking ideas.Level Crossing wrote:Sorry for the bump, I have no idea if this is still being maintained or not, great AI though.
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:The cleanup crew cleaned too much, apparently.
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.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).
* The numbers might be a little off; I've never done the testing, but I hope the idea come across...
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hey Matthew,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
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?
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
-
- Transport Coordinator
- Posts: 294
- Joined: 23 Jul 2007 15:13
- Location: Somewhere in this page
Re: WmDOT v6 [2011-04-28]
MinchinWeb wrote: <snip>
Hey Matthew,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
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:Thanks.
- 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?
- Bananas - however even Bananas doesn't recognise the fact that it has been downloaded.
- Yes - I have a whole fleet of AIs working - except yours
- No - WmDOT is never recognised, ever.
- Mac OS X 10.4.11.
- 1.2.0-beta1.
MinchinWeb - use [*] for each phrase to get the desired effect.
Matthew:out
Yay! I'm back! Did you miss me?
...
I thought not.
...
I thought not.
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v7 [2012-01-12]
Version 7 has been released!!
The biggest change is the addition of Operation Hibernia, which transports oil from Oil Rigs to Oil Refineries.
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...
The biggest change is the addition of Operation Hibernia, which transports oil from Oil Rigs to Oil Refineries.
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: WmDOT v6 [2011-04-28]
Do you have an Intel or a PowerPC CPU?ZirconiumX wrote:MinchinWeb wrote: <snip>
ZirconiumX wrote:Yet another WmDOT problem:
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
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v8 [2012-01-21]
Version 8 Released!
Mostly to take advantage of the improvements available thru an update to MetaLibrary. Improvements include:
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...)
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
- JacobD88
- Chief Executive
- Posts: 708
- Joined: 16 Aug 2008 17:51
- Location: Long Eaton, Nottinghamshire. UK
- Contact:
Re: WmDOT v8 [2012-01-21]
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
Regards
Jacob
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
Regards
Jacob
- Attachments
-
- Fishergate Logistics NewGRF Modded (UKRS2+ FIRS).sav
- Savegame
- (267.07 KiB) Downloaded 263 times
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: WmDOT v8 [2012-01-21]
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? 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.JacobD88 wrote:I have a bug report for you, regarding operation Hibernia. (..)
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Re: WmDOT v8 [2012-01-21]
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)
-
- Tycoon
- Posts: 1660
- Joined: 16 Dec 2007 22:24
- Location: Idaho, USA
Re: WmDOT v8 [2012-01-21]
O RLY?! http://www.tt-forums.net/viewtopic.php? ... 08#p884508Leanden 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)
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
- JacobD88
- Chief Executive
- Posts: 708
- Joined: 16 Aug 2008 17:51
- Location: Long Eaton, Nottinghamshire. UK
- Contact:
Re: WmDOT v8 [2012-01-21]
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
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
Last edited by JacobD88 on 26 Jan 2012 10:25, edited 1 time in total.
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
Who is online
Users browsing this forum: No registered users and 35 guests