www.ClassicTW.com
https://mail.black-squirrel.com/

Bubble Script for TWX
https://mail.black-squirrel.com/viewtopic.php?f=15&t=20773
Page 1 of 2

Author:  LoneStar [ Sat Jul 12, 2008 12:24 pm ]
Post subject:  Bubble Script for TWX

K. I made a bubble script for TWX. Took me a long, long time, and alot of contemplation, as I'm not very good at this sort of thing and it became a personal challenge to complete. Now it's on Grimy's.

It will take on average 15mins to run in a 20k Universe -depends on number of passes. And. Unfortuantely I'm not able to figure out how to find those Gold Bubbles. I would be very interested in any solution someone might come up with, just so I can slap my forehead and exclaim: Doh!


Lone

[EDIT]
You can load another instance of TWX and select the Game-DBase you want, then run the script. It actually runs w/o eating up 100% of the CPU.

Author:  Cerne [ Sat Jul 12, 2008 12:37 pm ]
Post subject:  Re: Bubble Script for TWX

LS do you need to increase the bubble size in the twx settings for this to get bubbles bigger than 25?

Cerne

Author:  LoneStar [ Sat Jul 12, 2008 4:23 pm ]
Post subject:  Re: Bubble Script for TWX

Unfortunately no. Script is independent of TWX settings, as it works strictly off of Warp Data.

Author:  the reverend [ Sat Jul 12, 2008 10:11 pm ]
Post subject:  Re: Bubble Script for TWX

i'm pretty sure you can look forward to pretty accurate bubble reports in twx soon... at least EP and i have recently held many discussions on the algorithm level and there are some promising (and fast) methods for doing this sort of thing - certainly an order of magnitude faster than 15 minutes for a 20k universe.

Author:  Singularity [ Sun Jul 13, 2008 12:01 am ]
Post subject:  Re: Bubble Script for TWX

You guys find a fast way to do multi-door bubbles yet?

Author:  LoneStar [ Sun Jul 13, 2008 4:53 am ]
Post subject:  Re: Bubble Script for TWX

the reverend wrote:
i'm pretty sure you can look forward to pretty accurate bubble reports in twx soon... at least EP and i have recently held many discussions on the algorithm level and there are some promising (and fast) methods for doing this sort of thing - certainly an order of magnitude faster than 15 minutes for a 20k universe.


Put your code is a CTS script and see how fast it runs. TWX doesn't like nested While loops --execution slows dramatically, and you should see how much ram TWX eats up when using large complicated arrays. But then again this prob speaks to my lack of programming exp. In any event, I will enjoy studying your methods if ever possible.

Author:  the reverend [ Sun Jul 13, 2008 7:01 pm ]
Post subject:  Re: Bubble Script for TWX

Singularity wrote:
You guys find a fast way to do multi-door bubbles yet?

i think so... but i haven't chatted with EP in a few weeks, so i dunno if his theory paid out.

Author:  the reverend [ Sun Jul 13, 2008 7:06 pm ]
Post subject:  Re: Bubble Script for TWX

LoneStar wrote:
the reverend wrote:
i'm pretty sure you can look forward to pretty accurate bubble reports in twx soon... at least EP and i have recently held many discussions on the algorithm level and there are some promising (and fast) methods for doing this sort of thing - certainly an order of magnitude faster than 15 minutes for a 20k universe.


Put your code is a CTS script and see how fast it runs. TWX doesn't like nested While loops --execution slows dramatically, and you should see how much ram TWX eats up when using large complicated arrays. But then again this prob speaks to my lack of programming exp. In any event, I will enjoy studying your methods if ever possible.

i think EP's test code was in a .cts script. it wasn't super fast; my versions of the same code ran considerably faster in rexx; but the twx version wasn't on the order of 15 minutes either.

we're still having problems solving the circularity issue...

Author:  Singularity [ Mon Jul 14, 2008 2:10 am ]
Post subject:  Re: Bubble Script for TWX

Quote:
i think so... but i haven't chatted with EP in a few weeks, so i dunno if his theory paid out.


Is it the iterative checking, or an avoid-based approach, or something else?

Quote:
we're still having problems solving the circularity issue...


You are facing a classical problem w/ tree searches. Good luck.

Author:  LoneStar [ Mon Jul 14, 2008 5:30 am ]
Post subject:  Re: Bubble Script for TWX

the reverend wrote:
we're still having problems solving the circularity issue...


You've inspired me to keep trying. I don't know if you have time to look at my approach; all I'll say is that my method doesn't rely on a Tree search. And. I have dreamed up a way to avoid nested while-loops realizing that a lookup 'table' has probably the most promise with repsect to performance. So I'm hopeful I can bring the processing time down dramatically.

With respect to Large bubbles. I've notice they usually have a particular characteristic that can single them out. So I guess it's the 'Tree' vs 'Tail'

Author:  Singularity [ Mon Jul 14, 2008 5:31 am ]
Post subject:  Re: Bubble Script for TWX

Well, all BFS and DFS based approaches are tree searches... how'd you manage to get around that?

Author:  LoneStar [ Mon Jul 14, 2008 6:28 am ]
Post subject:  Re: Bubble Script for TWX

Singularity wrote:
Well, all BFS and DFS based approaches are tree searches... how'd you manage to get around that?


Sorry I don't know what a DFS is. But I did was to simply build a list of 'tails' starting with Dead Ends. Followed the length of the tail until I reached an adjacent that has more than 2warps and then matched up and joined together other 'tails' with the same 'head'

11427--12397--5968--6479
|
2563--6032--9859(GATE)
|
17152--14674


Tails woudl look like:
(First Pass)
11427 12397 5968 6479 6032
2563 6032
17152 14674 6032

(Second Pass - Heads '6032' are merged)
11427 12397 5968 6479 2563 17152 14674 6032


and so on. I don't believe this would fall into any kind of 'basic breadth first' search.

Author:  Singularity [ Mon Jul 14, 2008 6:30 am ]
Post subject:  Re: Bubble Script for TWX

How do you compensate for bubbles that have no dead ends?

Author:  LoneStar [ Mon Jul 14, 2008 6:35 am ]
Post subject:  Re: Bubble Script for TWX

I first populate an array that removes all references to a oneway out. This has the effect of making the sector that is a 2way appear to be a Dead End

Where my script really suffers in performace is the search for other 'heads' even though the resulting array is usually approx 4k elements, this process takes up alot of the time. I've decided to instead use an array table which should speed things up considerably --I hope.

Author:  Singularity [ Mon Jul 14, 2008 6:40 am ]
Post subject:  Re: Bubble Script for TWX

I'm not talking about sectors w/ just 1 ways out, I'm talking about sectors w/ no single warps in. Loops, in other words, sometimes single door, sometimes multi-door.

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