www.ClassicTW.com
http://www.classictw.com/

Some ZTM questions
http://www.classictw.com/viewtopic.php?f=13&t=33614
Page 1 of 2

Author:  Mongoose [ Tue Dec 11, 2012 12:13 am ]
Post subject:  Some ZTM questions

1. Who came up with the ZTM algorithm where you avoid all the known warps around each sector and try to plot a course from it?

2. Is it still considered a good algorithm?

3. How long does it typically take to run on a universe of a particular size?

Author:  Kavanagh [ Tue Dec 11, 2012 8:02 am ]
Post subject:  Re: Some ZTM questions

If you are planning on writing a ztm, suggest that you watch the TWASSIST ztm run a few times. It is very fast and accurate, gives better than 99.9% of the warps. It only works up to 5K sectors, but you will see the method watching it run. In a 5K, it takes less than 5K passes to get the warps, which are usually in the region of 12,500 or so if memory serves.

I usually ran it 500 passes at a time. In a universe with everything except 1-10 unexplored, it starts off plotting 11 to 12, 13 to 14, etc. up to 1007 to 1008 or whatever. Next pass, lets say for example that it saw 1009 in one of the previous course plots - it will not use that as a start or end point. After it has seen every sector once, things get a bit hairy, wouldn't attempt to describe it.

Its available here
http://wiki.classictw.com/index.php?tit ... +(TWASSIST)

No need for an old dos emulator to run it unless you want the graphic map functionality.

A minor issue with TWGS - it was written for MBBS and the TWGS course plot must be parsed to work with twassist. Nothing hard, in TWGS, if the plot is more than one line, a leading space is placed at the start of each subsequent line. TWASSIST does not see this as whitespace, so gotta remove it. I have telix scripts to get the ztm, strip the spaces, update twassist if of interest. Telix is now freeware. The scripts are an embarrassment, wrote them pushing 20 years ago, lotsa legacy rubbish and generally kludge but they work fine. Too lazy to tidy up.

Last, it used take 45-50 mins with a 19,200 baud connection, but I reckon you can figure out todays speed from the fact that it always took less than 5000 plots to map a 5K.

Author:  the reverend [ Tue Dec 11, 2012 9:49 am ]
Post subject:  Re: Some ZTM questions

/raises hand

i'm pretty sure that i was the first person to use voids in ztm methodologies. it's a bit more complicated than just voiding all the known outbound warps, but at the root, that is the basic concept. the speed optimizations happen in how you order the plots. my method is still pretty much the fastest unless there have been tweaks i'm not aware of. i don't think anything revolutionary has come out to dramatically improve the performance. it's been a few years since i played, so i don't recall how long it takes, but it kicks twassist to the curb (no offense, kav).

Author:  Mongoose [ Tue Dec 11, 2012 12:04 pm ]
Post subject:  Re: Some ZTM questions

I'm curious because I wrote a similar script for my helper and I'm planning to make it the subject of a tutorial. The version in the tutorial won't have any optimizations for the sake of clarity, but the version I distrubute with the helper might, if testing shows that it makes a difference. For example, I'm going to try keeping a few plots queued on the server - an idea I got from EP that I've used in SWATH scripts.

I noticed that even with my unoptimized version, the speed increases as it runs. I attribute this to more warps being known, and thus more "no route" messages and fewer plots. Thinking about it now, this natural optimization is more likely to affect high-traffic sectors, and cannot affect dead-ends unless a route passes through them via a one-way back door. So the total run time might be improved if I started with a simple, fast algorithm like the one Kav describes or the "distance map" I've used in the past (Stardock -> all, skipping sectors that have been seen) and then examining sectors that appear to be dead ends first. Is that similar to your ordering, Rev? (BTW, your svn appears to be down.)

Author:  Kavanagh [ Tue Dec 11, 2012 12:41 pm ]
Post subject:  Re: Some ZTM questions

the reverend wrote:
/raises hand

i'm pretty sure that i was the first person to use voids in ztm methodologies. it's a bit more complicated than just voiding all the known outbound warps, but at the root, that is the basic concept. the speed optimizations happen in how you order the plots. my method is still pretty much the fastest unless there have been tweaks i'm not aware of. i don't think anything revolutionary has come out to dramatically improve the performance. it's been a few years since i played, so i don't recall how long it takes, but it kicks twassist to the curb (no offense, kav).


Absolutely none taken, I did not write twassist .

A truly comparative measure of time efficiency might be the number of course plots needed to complete the map.

Accuracy is very simple to determine, just needs an "admin" CIM compared to the scripted ZTM.

Author:  Promethius [ Tue Dec 11, 2012 7:54 pm ]
Post subject:  Re: Some ZTM questions

The first ztm I saw in TWX was by SupG which I believe was based off of Rev's ztm. The source code for proZTM4xx is in forums (scripting probably) and was posted 2-3 years ago, maybe longer. It uses a few different methods, is very accurate and I thought very fast (but I am biased).

Author:  Mongoose [ Tue Dec 11, 2012 10:19 pm ]
Post subject:  Re: Some ZTM questions

Kavanagh wrote:
A truly comparative measure of time efficiency might be the number of course plots needed to complete the map.


It's not quite that simple. I've seen significant speed improvements by buffering a few plots on the server. In other words, instead of this:

plot course #1
analyze result #1
plot course #2
analyze result 2
etc.

A script with buffering will do this:

plot course #1
plot course #2
plot course #3
analyze result #1
plot course #4
analyze result #2
etc.

This way, the server is constantly working instead of being idle between plots for the network round trip time plus the time it takes your helper to analyze a plot. And some ZTM algorithms lend themselves to buffering more than others.

Author:  Kavanagh [ Wed Dec 12, 2012 8:26 am ]
Post subject:  Re: Some ZTM questions

You are correct.

In the case of the way that I used to ztm, had I set it to do one or two passes at a time and then analyze before the next interrogation, there would have been far fewer plots at completion but elapsed time would have been greater, most particularly since I was patching applications by shelling to msdos.

IIRC I tried 200, 400, 500 and 1,000 passes at a time, with almost no difference, but I was running two scripts, each started by hand, which probably added minutes or so to the whole. If I had seamlessly automated it, with today's CPUs it would be a lot faster.

Obviously there is a tradeoff somewhere; I recall Prestone raised that issue maybe ten years ago, it was never really examined though.

Author:  LoneStar [ Wed Dec 12, 2012 9:09 am ]
Post subject:  Re: Some ZTM questions

To support REV's claim I've attached Cherokee's ZTM script. You might find this handy because it parses the course information, and uses a pretty neat burst method.

Attachments:
File comment: # CREDITS
# -------
# Written by Cherokee
# Method invented by The Reverend

_ck_ztm_150.ts [15.86 KiB]
Downloaded 893 times

Author:  mob [ Wed Dec 12, 2012 1:14 pm ]
Post subject:  Re: Some ZTM questions

LoneStar wrote:
To support REV's claim I've attached Cherokee's ZTM script. You might find this handy because it parses the course information, and uses a pretty neat burst method.



You make me want to get back into scripting..

Author:  mob [ Wed Dec 12, 2012 1:15 pm ]
Post subject:  Re: Some ZTM questions

mob wrote:
LoneStar wrote:
To support REV's claim I've attached Cherokee's ZTM script. You might find this handy because it parses the course information, and uses a pretty neat burst method.



You make me want to get back into scripting..



Would anyone be interested in a fun little scripting challenge?? Maybe do a ZTM challenge?

Author:  Mongoose [ Wed Dec 12, 2012 1:27 pm ]
Post subject:  Re: Some ZTM questions

mob wrote:
Would anyone be interested in a fun little scripting challenge?? Maybe do a ZTM challenge?


Maybe. What did you have in mind?

Author:  mob [ Wed Dec 12, 2012 2:12 pm ]
Post subject:  Re: Some ZTM questions

Mongoose wrote:
mob wrote:
Would anyone be interested in a fun little scripting challenge?? Maybe do a ZTM challenge?


Maybe. What did you have in mind?


Well, not an entire script but maybe just the guts. We have done scripting challenges before. Examples: Amtrak Challenge, basically who could write the shortest routine. There was one other one but I couldn't find it.

So the main routine for the ZTM? Least amount of errors, shortest routine, most original?

Author:  Mongoose [ Wed Dec 12, 2012 2:45 pm ]
Post subject:  Re: Some ZTM questions

I'd be down. I'd like to see how Weapon M stacks up against TWX.

Author:  LoneStar [ Wed Dec 12, 2012 7:14 pm ]
Post subject:  Re: Some ZTM questions

I already have a script. It uses the 'Avoid Method', with a few key enhancements ie: Continuity check, creates a 7Warp and Traffic file on the fly, etc.

If mine isn't the fastest, it sure as heck is the prettiest 8)

Attachments:
File comment: LONESTARS ZERO TURN MAPPING!
..and the crowd goes wild!

LSZTM_11.ts [27.19 KiB]
Downloaded 926 times

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/