View unanswered posts | View active topics It is currently Sun Dec 28, 2025 9:56 am



Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
 using SWATH and finding bubbles and dead ends. Help PLZ 
Author Message
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Right... I can see running a quick ZTM with one of SWATHs basic algorithms to find the class 0s. This doesn't even require a full pass. But Rev's algorithm doesn't directly benefit from this. The run time for a some other algorithm + Rev's algorithm will be longer than the run time for Rev's algorithm alone. The only advantage to combining algorithms is that you get some information sooner.

_________________
Suddenly you're Busted!


Tue Dec 03, 2013 5:05 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Mongoose wrote:
Right... I can see running a quick ZTM with one of SWATHs basic algorithms to find the class 0s. This doesn't even require a full pass. But Rev's algorithm doesn't directly benefit from this. The run time for a some other algorithm + Rev's algorithm will be longer than the run time for Rev's algorithm alone. The only advantage to combining algorithms is that you get some information sooner.
I don't know about REV's algorithm, but others will skip their quick ZTM pass if you have already run one. Every path that you already know will also speed up the pass that is avoiding sectors. I would have to do some testing to be sure, but I think pass 3 would take much longer in ProZTM, if you reconfigured it to skip the Quick ZTM pass.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Tue Dec 03, 2013 5:32 pm
Profile ICQ YIM WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1133
Location: Augusta, GA
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Mongoose wrote:
I'm using the term "single-pass" in the SWATH sense of "single-algorithm". My understanding of Rev's algorithm is that you plot courses out of each sector, setting an avoid on each adjacent sector as it is discovered. When there are no remaining routes out of the sector, clear all avoids and move on to the next sector.
Not quite, and the difference is significant. Specifically, the algorithm is as follows:

Pass 1 - Find 1 warp for every sector. Accomplish this by iterating from 1 to SECTORS and if the warp has zero known warps, plot from that sector to some other sector. The TO sector can be optimized to provide slightly better results.

Pass 2 - Find 2 warps for every sector. Accomplish this by iterating from 1 to SECTORS, and if a given sector has exactly 1 known warp, void that warp and plot to some other sector. The TO sector can be optimized slightly.

Pass 3 - Find 3 warps for every sector. Accomplish this as above, but you will only focus on sectors that have exactly 2 known warps.

Repeat for Passes 4-6, and follow up with the One-Way pass.

Can I elaborate on this further? Do you see the difference in this approach versus what you stated? It's brilliant, and it's a dramatic difference from the approach you outlined, especially regarding efficiency/time.

Mongoose wrote:
You're right that every warp can be discovered by ZTM, but some warps can only be discovered if you specify the origin and destination exactly. To be assured of finding them, you would have to run n * (n - 1) plots, where n is the number of sectors. That's almost 25 million plots for a 5K universe. The game would be over before you finished.
That, sir, is also incorrect. There are only a handful of instances where the above 6-Pass+1-Way approach will miss a warp. You just have to know what those instances are, and plot specifically for them. I roughly estimate (as it's been a while since I studied it) that this would be < 1000 plots.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Tue Dec 03, 2013 5:51 pm
Profile WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Using this approach, at what point would you clear the avoids?

_________________
Suddenly you're Busted!


Tue Dec 03, 2013 6:00 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Mongoose wrote:
Using this approach, at what point would you clear the avoids?
The avoids are cleared after each sector is processed. Either a new path is found or no path is found. If no path is found, you can flag that sector as complete.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Tue Dec 03, 2013 8:14 pm
Profile ICQ YIM WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
ElderProphet wrote:
That, sir, is also incorrect. There are only a handful of instances where the above 6-Pass+1-Way approach will miss a warp. You just have to know what those instances are, and plot specifically for them. I roughly estimate (as it's been a while since I studied it) that this would be < 1000 plots.
The main problem is that you don't know exactly how many warps there are, so you don't know how many you might be missing.

I know that tradewars will not plot a course if the path is too long, and that avoiding a sector can sometimes cause this. What other instances will cause a warp to be missed?

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Tue Dec 03, 2013 8:23 pm
Profile ICQ YIM WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Micro wrote:
The avoids are cleared after each sector is processed.


That's what I thought, because otherwise you could miss a lot of warps because of too-long routes. But I think any theoretical time gains to the multi-pass technique EP describes would be eaten up by the delay of setting and testing individual avoids. With my approach it can burst up to five avoids at once, and the average size of each avoid burst will increase as the map becomes more complete. Now I'm going to have to write a simulation to test it both ways. :lol:

IIRC, there are two configurations of sectors where you cannot discover a warp unless you plot it exactly. I forget what one of them is. The other is this:

1   2
\ /
3
/ \


If a warp exists from 1 to 2, you cannot discover it by plotting from 1 to any other sector except 2. But I think EP is right that you don't need to try every combination of sectors. After you have a decent map, you could rule out a lot of sector pairs that could not possibly be part of a configuration like this.[/i]

_________________
Suddenly you're Busted!


Tue Dec 03, 2013 8:41 pm
Profile WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1133
Location: Augusta, GA
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Mongoose wrote:
But I think any theoretical time gains to the multi-pass technique EP describes would be eaten up by the delay of setting and testing individual avoids.
That's actually part of the brilliance to Rev's method. Because of it's simplicity, you are only reaching for one additional warp per pass, at most. So you can likewise burst and queue plots against the server with every pass. In my testing, I found 2 queued plots to be optimal (meaning 3 plots are sent initially). So with 2 queued plots, the only potential inefficiency is that one or both of the queued plots might be made unnecessary by the results of the current plot. Whereas in an example where you queue hundreds (or Kav's thousands) of plots, many are made fruitless long before they are dequeued and plotted.

So to be clear, on Pass 2 and further, a well-written ZTM will queue the void set, plot, and void clear (not clear all) - and it will keep 2 such void-plot-clear commands queued in addition to the current void-plot-clear.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Tue Dec 03, 2013 8:59 pm
Profile WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1133
Location: Augusta, GA
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Micro wrote:
I know that tradewars will not plot a course if the path is too long, and that avoiding a sector can sometimes cause this. What other instances will cause a warp to be missed?
If memory serves, missed plots are always due to a gate. To locate them, you'll need to perform a bubble search (meaning a search for bubbles - another fine subject), and identify all of the gates. I'm not sure if anyone else uses that term, but I use the term gate to refer to the bottleneck sector through which all of the bubble sectors must pass in order to reach the rest of the map. Any warp that leads laterally or deeper into the bubble will be missed. Do you see how that rule applies to Mongoose's illustration?

So to find the missing warps, you'll need to plot from each bubble sector (including the gateway) to all other bubble sectors of equal or greater depth. In Mongoose's illustrated bubble, it would require 4 plots to ensure all warps were found, but 2 would already have been performed by the one-way pass - so only the 2 lateral plots are needed: 1->2, 2->1. The actual number of plots will vary based on the layout of the bubble, but it will be approximately (bubble sectors + 1)*2, after the one-way plots are accounted for. So a bubble with 12 sectors will require approximately 26 plots. Or for an entire map, the number of additional plots would be approximately (total_bubble_sectors + number_of_bubbles)*2.

As you can see, other than just the cool factor, there's little use for these additional warps, especially considering the extra effort required to find them.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Tue Dec 03, 2013 9:36 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
I'm analyzing ProZTM, and it is slightly different than what EP describes above.

Pass 1 - Same as what EP describes above, with the endpoint also being decremented from SECTORS to 1 skipping any sectors with more than zero warps. Sectors flagged as "Explored" are also skipped. I don't think that is necessary, as any sector you have visited, scanned, probed, or imported would not have 0 warps. Warp plots are burst one at a time during this pass. No avoids are needed as this will always add at least one warp to each sector.

Pass 2 - Same as pass 1, but processing sectors with < 2 warps. Surprisingly, no avoids are used during this pass. Warp plots are burst 5 at a time during this pass.

Pass 3 - Processes all sectors with < 6 warps. All known outbound warps are avoided in a single burst, and then new outbound paths found are avoided at this time until path not found is received. The endpoint is also being decremented from SECTORS to 1 like the previous passes.

Pass 4 - Verifies all back doors by plotting the reverse course. Also known as a one-way pass. Warp plots are burst 5 at a time during this pass.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Tue Dec 03, 2013 10:35 pm
Profile ICQ YIM WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Micro wrote:
I'm analyzing ProZTM, and it is slightly different than what EP describes above.

Pass 1 - Same as what EP describes above, with the endpoint also being decremented from SECTORS to 1 skipping any sectors with more than zero warps. Sectors flagged as "Explored" are also skipped. I don't think that is necessary, as any sector you have visited, scanned, probed, or imported would not have 0 warps.


If this is off topic, I apologize, and will understand if it is deleted - it speaks more to the warps from ZTM than the script.

In HVS, and I _think_ in early TWGS, occasionally "orphan" sectors, and sometimes "black holes" would be found after a bang. The orphan sectors could not be reached, even by twarp. The black holes were "no returns" with no exit to anywhere, but you could X from them to any pers or corp ship anywhere in the universe, even from a pod or a scout. Ship graveyard, whatever warped in, stayed in. Very annoying if a maxed ISS.


Wed Dec 04, 2013 8:11 am
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
TWGS versions currently in use check for orphans during BigBang, but a gameop can create them with tedit.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Wed Dec 04, 2013 8:33 am
Profile ICQ YIM WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1133
Location: Augusta, GA
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
Micro wrote:
I'm analyzing ProZTM, and it is slightly different than what EP describes above.
I believe what you're seeing are his efforts to optimize the routine. I do not believe that will work better than the basic method, but he may have had a specific goal in mind. I know Prom has tried several approaches over the years.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Wed Dec 04, 2013 4:17 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: using SWATH and finding bubbles and dead ends. Help PLZ
ElderProphet wrote:
Micro wrote:
I'm analyzing ProZTM, and it is slightly different than what EP describes above.
I believe what you're seeing are his efforts to optimize the routine. I do not believe that will work better than the basic method, but he may have had a specific goal in mind. I know Prom has tried several approaches over the years.
I agree. It might be faster, but would not produce any additional warps.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Wed Dec 04, 2013 6:56 pm
Profile ICQ YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 32 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, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.