View unanswered posts | View active topics It is currently Mon Jun 24, 2019 3:39 pm



Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
 Some ZTM questions 
Author Message
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post 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?

_________________
Suddenly you're Busted!


Tue Dec 11, 2012 12:13 am
Profile WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1398
Location: Boo! inc. Ireland
Unread post 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.


Tue Dec 11, 2012 8:02 am
Profile
Gameop
User avatar

Joined: Thu Mar 08, 2001 3:00 am
Posts: 886
Location: USA
Unread post 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).

_________________
twgs : telnet://twgs.thereverend.org:5023
web : http://www.thereverend.org
games : http://www.thestardock.com/twgssearch/i ... verend.org
helper : http://svn.thereverend.org:8080/revhelper/


Tue Dec 11, 2012 9:49 am
Profile
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post 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.)

_________________
Suddenly you're Busted!


Tue Dec 11, 2012 12:04 pm
Profile WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1398
Location: Boo! inc. Ireland
Unread post 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.


Tue Dec 11, 2012 12:41 pm
Profile
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 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).

_________________
               / Promethius / Enigma / Wolfen /

"A man who has no skills can be taught, a man who has no honor has nothing."


Tue Dec 11, 2012 7:54 pm
Profile ICQ
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post 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.

_________________
Suddenly you're Busted!


Tue Dec 11, 2012 10:19 pm
Profile WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1398
Location: Boo! inc. Ireland
Unread post 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.


Wed Dec 12, 2012 8:26 am
Profile
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1312
Location: Canada
Unread post 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 285 times

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
-= There are 10 types of people in the world: Those that understand Binary and those who do not
-= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs?
-= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark
Wed Dec 12, 2012 9:09 am
Profile ICQ YIM
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 852
Location: USA
Unread post 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..

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Wed Dec 12, 2012 1:14 pm
Profile
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 852
Location: USA
Unread post 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?

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Wed Dec 12, 2012 1:15 pm
Profile
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post 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?

_________________
Suddenly you're Busted!


Wed Dec 12, 2012 1:27 pm
Profile WWW
Boo! inc.
User avatar

Joined: Sat Oct 09, 2004 2:00 am
Posts: 852
Location: USA
Unread post 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?

_________________
“The object of war is not to die for your corp but to make the other bastard die for his.”

Boo! inc.


Wed Dec 12, 2012 2:12 pm
Profile
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: Some ZTM questions
I'd be down. I'd like to see how Weapon M stacks up against TWX.

_________________
Suddenly you're Busted!


Wed Dec 12, 2012 2:45 pm
Profile WWW
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1312
Location: Canada
Unread post 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 311 times

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
-= There are 10 types of people in the world: Those that understand Binary and those who do not
-= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs?
-= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark
Wed Dec 12, 2012 7:14 pm
Profile ICQ YIM
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page 1, 2  Next

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, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.