MinchinWeb's MetaLibrary v.9 [2015-01-10]

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

R2dical
Traffic Manager
Traffic Manager
Posts: 163
Joined: 18 Mar 2013 22:22

Re: MinchinWeb's MetaLibrary v.7 [2014-02-28]

Post by R2dical »

MinchinWeb wrote:Can you show me what tile 0x7F6F looks like? (Or alternately upload your test map here.) Did this tile used to be land and then was terraformed to be water?
Looked through the autosaves, but unfortunately it was overwritten by subsequent test runs. I was tweaking my pathfinder and doing random starts. I can say that it is extremely unlikely that 0x7F6F (32623?) was changed since map gen. Industry changes off, no DoCommands for AI and I was only watching the log, no landscaping etc. I usually save the seed on crashes but didn't in these tests :roll: If it would help attached are the mapgen settings. I will continue testing with the new version, thnx for fix.
MinchinWeb wrote:So extrapolating, a 6,000 tile path could take 14k-422k ticks (Lakes) + 7k-77k ticks (or more!) (pathfinding) ... in any case, many years (a game day is about 74 ticks, so a year is about 27k ticks). I keep working on the pathfinder so I hope to bring both those numbers down.
:shock: Yeah maybe good the crash interrupted this, I was sitting waiting patiently for it to finish... :lol: (FYI looks like that particular path, as returned by my pathfinder, was 600 not 6000 as even with step of 10 it returns a GetLength of ~ the actual...weird)
MinchinWeb wrote:On a practical level, do you plan on running ships along 6,000 tile routes? Once your ships take more than ~4 months to travel the route (one way), it gets much more complicated to determine whether a route is making you money...
Well the thing is you(or your AI) don't know at runtime what distance the end path will be (or if one is even possible, i.e the same water body). Sure in most practical cases an AI will say ignore candidates for a shipping route > 500 tiles manhattan apart, but if your tiles are 499 apart there is always the (likely) possibility of a very circular path existing which ends up at say 5000 tiles. Sure, then you can limit pathfinder by a max_cost factor (or equivalent max_length, say 750), but then this will discount perfectly feasible paths on other searches between somewhat closer points. Also an AI may decide to limit ship route length by est travel time, so a function of ship speed, and end game long paths may be perfectly usable.
Attachments
mapsettings.png
mapsettings.png (30.35 KiB) Viewed 3256 times
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: MinchinWeb's MetaLibrary v.8 [2014-03-10]

Post by MinchinWeb »

Version 8 is released! Available at the top or on Bananas.

This update brings a speed improvement to Lakes, allowing it to run 9-30x faster than v7.
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
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: MinchinWeb's MetaLibrary v.8 [2014-03-10]

Post by MinchinWeb »

Version 9 is released! The changes here are in the backend - updating the Python build script so that the GameScript version imports the correct libraries and make the build script work with Python 3.

Available at the top 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
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: MinchinWeb's MetaLibrary v.9 [2015-01-10]

Post by Kogut »

main.nut has

Code: Select all

 *			Import("util.MinchinWeb", "MinchinWeb", 5);

Code: Select all

 *			import("util.MinchinWeb", "MinchinWeb", 9);
would be better (new version, I instead of i results in a crash).
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: MinchinWeb's MetaLibrary v.9 [2015-01-10]

Post by MinchinWeb »

@Kogut: main.nut would be part of an AI. Which AI are you looking at?
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
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: MinchinWeb's MetaLibrary v.9 [2015-01-10]

Post by Kogut »

MinchinWeb wrote:@Kogut: main.nut would be part of an AI. Which AI are you looking at?
There is a main.nut in Metalibrary.

At least there is one in downloaded archive - I attached what gets downloaded from BaNaNaS.

http://minchin.ca/openttd-metalibrary/index.html#faq is also affected
Attachments
MinchinWebs_MetaLibrary-9.tar
(250 KiB) Downloaded 113 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: MinchinWeb's MetaLibrary v.9 [2015-01-10]

Post by MinchinWeb »

@Kugot: I think the documentation you point to has been updated. Let me know if I've missed something on the site. As for main.nut, that code is actually the source of the documentation, and so isn't used directly. I've updated the files post-release, but haven't put out a release with just documentation fixes. Do you think it's worthwhile to put out a documentation-fixes-only release?
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
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 10 guests