| Author |
Message |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
Say, I was chatting with Muss the other night, and whipped up a bubble finding script based off of the new getNearestWarps function in 2.04. It works reasonably fast in a 5k sector game, which is all I tested it in. The thought occured to me that basic bubble finding might make a great subject for another TWX scripting clinic.
Give a shout out if this is of interest to you. This is a bit more advanced than previous sessions, but the amount of material to go over will be minimal, leaving lots of time to answer questions, and digress into tangents.
And hey, if you don't have a basic knowledge of arrays or twx scripting, there will still be some short interludes of unmanaged mic access for open dialog, which in the past have offered glimpses of MisB's Joysey accent and Jester's comically-noisy keystrokes. Good times.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Tue Jun 19, 2007 11:42 am |
|
 |
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1401 Location: Canada
|
ElderProphet wrote: Say, I was chatting with Muss the other night, and whipped up a bubble finding script based off of the new getNearestWarps function in 2.04. It works reasonably fast in a 5k sector game, which is all I tested it in. The thought occured to me that basic bubble finding might make a great subject for another TWX scripting clinic.
Give a shout out if this is of interest to you. This is a bit more advanced than previous sessions, but the amount of material to go over will be minimal, leaving lots of time to answer questions, and digress into tangents.
And hey, if you don't have a basic knowledge of arrays or twx scripting, there will still be some short interludes of unmanaged mic access for open dialog, which in the past have offered glimpses of MisB's Joysey accent and Jester's comically-noisy keystrokes. Good times.
+EP+
Funny you should mention bubble finding script.. i've started working on one myself. I'm deffinately interested in participating if my schedule permits.
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
|
| Tue Jun 19, 2007 12:06 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
I wrote this a while back...
Code: setVar $file GAMENAME & "_bubble_gates.txt" delete $file getNearestWarps $terra_stack 1 setArray $checked SECTORS setArray $bfsdone SECTORS setVar $gate_idx 1 while ($gate_idx <= $terra_stack) setVar $gate_test $terra_stack[$gate_idx] if (SECTOR.WARPCOUNT[$gate_test] > 1) AND ($checked[$gate_test] = FALSE) setAvoid $gate_test setVar $bubble_loop_idx 1 while ($bubble_loop_idx <= SECTOR.WARPCOUNT[$gate_test]) setVar $bubble_test SECTOR.WARPS[$gate_test][$bubble_loop_idx] if (SECTOR.WARPCOUNT[$bubble_test] > 1) AND ($bfsdone[$bubble_test] = FALSE) setVar $bfsdone[$bubble_test] TRUE getNearestWarps $bubble_stack $bubble_test if ($bubble_stack <= 300) setVar $mark_idx 1 while ($mark_idx <= $bubble_stack) setVar $checked[$bubble_stack[$mark_idx]] TRUE setVar $bfsdone[$bubble_stack[$mark_idx]] TRUE add $mark_idx 1 end write $file $gate_test end end add $bubble_loop_idx 1 end clearAvoid $gate_test end add $gate_idx 1 end
Which was fast in a 5k, but slow as dirt in a 20k. I'm sure it's improveable, but really most of this code could be made obsolete if we gave twxproxy a way to spit out it's bubble results into an array. I doubt there's a way to improve over native pointers.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Tue Jun 19, 2007 12:14 pm |
|
 |
|
Muss
Veteran Op
Joined: Mon Jun 16, 2003 2:00 am Posts: 639 Location: USA
|
Ive also found that the build in list of bubbles that twx gives out is not quite as accurate as a swath bubble list. I had Alieron come in an a game to run his swath version of a bubble list then compared it my twx generated list. Most results were the same.. although.. the largest bubble was not detected by twx. The swath version did pick it up though.
This is after I had explored all 20k sectors. Not just a ztm.
Im sure many know this.. but.. why?
|
| Tue Jun 19, 2007 12:38 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
There's a max bubble setting in twxproxy you have to change if you want the larger bubbles. This is because larger bubble sizes take nearly exponential amounts of processing time... so setting it to just the size you need helps to reduce the processing time a lot.
Then there is, as you mentioned, the ztm. If that's a factor.
I don't think the twx proxy algo handles multiple doors, either. Swath's does.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Tue Jun 19, 2007 1:12 pm |
|
 |
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1401 Location: Canada
|
Singularity wrote: Which was fast in a 5k, but slow as dirt in a 20k. I'm sure it's improveable, but really most of this code could be made obsolete if we gave twxproxy a way to spit out it's bubble results into an array. I doubt there's a way to improve over native pointers.
Interesting approachl. will be intersting to compare routines when I get mine finished
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
|
| Tue Jun 19, 2007 1:49 pm |
|
 |
|
Mind Dagger
Chief Warrant Officer
Joined: Wed Jan 04, 2006 3:00 am Posts: 136 Location: USA
|
I can't wait to do another one of these. The last one was a lot of fun to listen to.
MD
|
| Tue Jun 19, 2007 9:59 pm |
|
 |
|
Muss
Veteran Op
Joined: Mon Jun 16, 2003 2:00 am Posts: 639 Location: USA
|
I usually have my max bubble size in Twx set to 500 or so. Seems to work well.. and Ive never seen anything much above 250 or so using twx.
Concerning a ztm.. last I used was ZTMSupG with middle passes set to the highest setting, which is 5 I believe.
Any other ztm scripts that would give me a better reading?
|
| Tue Jun 19, 2007 11:13 pm |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
Muss wrote: Concerning a ztm.. last I used was ZTMSupG with middle passes set to the highest setting, which is 5 I believe.
Any other ztm scripts that would give me a better reading?
None that are open source
But hey, maybe in a future script clinic...
Besides, to make a ZTM more accurate than rev's 6 pass method + one-way check, you need a bubble finder.
See, it's all connected. The bubble bone's connected to the... ztm bone. But the cheese stands alone.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Wed Jun 20, 2007 12:24 am |
|
 |
|
Cerne
Gameop
Joined: Sun Oct 08, 2006 2:00 am Posts: 991
|
Prom's ZTM (14a, I think) is really accurate, I use it and the swath bubble checker.
Cerne
_________________ "All warfare is based on deception..." - Art of War "Time will tell all tales" - SG Any advanced tactic in TW is indistinguishable from cheating.
|
| Wed Jun 20, 2007 1:19 am |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Prome's is very similar to supg's in method. It still can miss certain warps tho.
EP, the reason I've wanted twxproxy to be able to dump out bubble info is to build a fast and accurate ztm. I rarely play 5k, so all of my tests are in 20k... and I have yet to find a decent way of testing for large bubbles in a 20k.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Wed Jun 20, 2007 2:57 pm |
|
 |
|
Xentropy
Lieutenant J.G.
Joined: Fri Apr 05, 2002 3:00 am Posts: 332 Location: USA
|
If anyone would know, it's you guys...
I assume TW uses A* (well, Dijkstra's to be exact, since there's really no heuristic for how close a sector is to another sector in a random mapping like this) to determine pathing, but if two paths are the same length, which does TW itself return? Does it preference lowest sector number, highest sector number, does it appear entirely random, or is there some other pattern?
_________________ Creator of the TWGS Data Access Library
http://twgs.xiuhtec.com
|
| Wed Jun 20, 2007 3:41 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
No, simple breadth-first search. This can be easily emulated using an array that holds checked sectors. Mark off any avoids you have and it'll automatically find the shortest route between 2 points, that's what a BFS does.
It doesn't need to check all paths, if 2 paths are identical in distance to the destination then it'd go by the layout of the nodes, along the earliest set of edges (lowest doors first).
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Wed Jun 20, 2007 3:53 pm |
|
 |
|
Xentropy
Lieutenant J.G.
Joined: Fri Apr 05, 2002 3:00 am Posts: 332 Location: USA
|
So preferences lower sector number. Thanks.
_________________ Creator of the TWGS Data Access Library
http://twgs.xiuhtec.com
|
| Wed Jun 20, 2007 6:32 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Well no, not neccessarily. It goes by order of doors, not destination sector number. Once it finds the first valid path (starting with the left most, lower most, door number on each sector it hits) the routine is done. Because in a BFS the first path you find will be the shortest possible path, it's done there. It might be possible for another path to be at the same distance tho, in that case (the one you asked about) it would simply pull out the first one it found.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Wed Jun 20, 2007 7:06 pm |
|
 |
|