Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Celebrities > Cecil Adams > Re: One for the...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 40 Topic 22308 of 25528
Post > Topic >>

Re: One for the programmers or maths/logic geeks

by John Hatpin <RemoveThisjfhopkin@[EMAIL PROTECTED] > May 11, 2008 at 03:30 PM

huey.callison@[EMAIL PROTECTED]
 wrote:

>John Hatpin <RemoveThisjfhopkin@[EMAIL PROTECTED]
> wrote:
>> OK, I've just run a test that simply tests the whole sim, with an
>> accurate timer called "counting seconds in my head".  Each 255 'row'
>> of cells takes about one second, so it would take about four minutes
>> to test the whole sim.  That's a bit long for this application, not to
>> mention for me developing the damned thing, with repeated re-runs.
>
>I think you're doing it wrong. 
>
>You've got this invisible thing that makes bird noises, and it loads in 
>a place you control. Why not use that thing as a database cursor? 
>
>Here's your algorithm. Thing loads at X,Y. Store that.
>1) Go "cheep cheep cheep"
>2) Do you own X+1,Y?
>     If yes, go there.
>     If no, you've found an edge. Store that. Do you own X,Y+1? 
>       If yes, go there
>       If no, you've found an edge. Store that. Do you own X-1,Y?
>         If yes, go there. 
>         If no, you've found an edge. Store that. Do you own X,Y-1? 
>           If yes, go there
>           If no, you've found an edge. Store that. 
>3) Are you in X,Y? 
>     If yes, you're done. You've mapped a rectangle you own, bounded by 
>       the other four locations you stored, and you can walk randomly 
>       within the bounds of that. 
>     If no, you're not done yet. Goto 1.
>
>This breaks down if the shape is irregular (like an L, or pretty much
>anything else) since it's only going to find one rectangular space
>inside that, but once you've stored that in an array, you can walk
>randomly within that space, but the initial 'finding of the borders' can 
>be done by the bird itself, can't it?

Well, during the discovery stage there's no reason at all for the boid
to actually fly - it can sit at home requesting owner****p or anywhere.
And, in fact, the calculations won't be done by the flying object -
there's a controller object with buttons and displays and **** that
does the UI and acts as shepherd to its flock of birds, telling them
where to go.

But that's by the by, since the edge-walking algorithm can be equally
used from the comfort of your own X,Y.  In fact, that's a lot better
too, since moving objects around takes time.

The problem is, you're doing fine at finding coordinates at the edge,
but we're looking for the largest contiguous rectangle, not the same
as the edge when the plot itself is not rectangular.  

The reason I've defined a rectangle of contiguous owner****p as the
largest unit, by the way, is so that it's easy to calculate random
paths around the place once it's all up and running.  Also, it's
easier to subdivide - if one drone ain't making enough noise, slot in
another and they'll each take on half your plot by default, ad
infinitum etc.

Crude maybe, but the simplicity's im****tant because there are other
complications such as not wanting to fly too close to people on the
land - nothing worse than a blackbird coming out of nowhere and
shouting right in your ear.  And astute people may have noticed I've
not mentioned the Z axis and yes, SL has hills and valleys.  That's
enough to do without trying to cover an irregular area evenly without
trespassing.

Besides, probably 95% of plots are indeed rectangular, and most people
with irregular plots already accept compromises.  For example, my
Spanish now-ex-cyber-lover and I used to rent for our home an L-shaped
plot that was formed by two rectangular plots being conjoined.    I
had to buy and fit two separate, networked intruder alert systems to
cover the land, not because of its size but because of its shape.  You
shrug and you do it.
-- 
John Hatpin
 




 40 Posts in Topic:
One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-10 18:23:04 
Re: One for the programmers or maths/logic geeks
UaNeill@[EMAIL PROTECTED]  2008-05-10 10:33:01 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-11 01:12:21 
Re: One for the programmers or maths/logic geeks
huey.callison@[EMAIL PROT  2008-05-11 02:20:50 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-11 15:30:04 
Re: One for the programmers or maths/logic geeks
huey.callison@[EMAIL PROT  2008-05-14 00:34:41 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-20 01:24:38 
Re: One for the programmers or maths/logic geeks
spam.sc@[EMAIL PROTECTED]  2008-05-20 09:34:23 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-21 04:34:33 
Re: One for the programmers or maths/logic geeks
Snidely <Snidely.too@[  2008-05-12 20:47:49 
Re: One for the programmers or maths/logic geeks
"Don K" <dk@  2008-05-10 14:35:57 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-11 15:36:15 
Re: One for the programmers or maths/logic geeks
"Don K" <dk@  2008-05-11 13:17:01 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-20 01:31:39 
Re: One for the programmers or maths/logic geeks
xhoster@[EMAIL PROTECTED]  2008-05-11 21:52:24 
Re: One for the programmers or maths/logic geeks
Snidely <Snidely.too@[  2008-05-12 20:39:33 
Re: One for the programmers or maths/logic geeks
xhoster@[EMAIL PROTECTED]  2008-05-13 16:47:25 
Re: One for the programmers or maths/logic geeks
Greg Goss <gossg@[EMAI  2008-05-13 22:23:09 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-14 06:31:58 
Re: One for the programmers or maths/logic geeks
huey.callison@[EMAIL PROT  2008-05-14 01:40:34 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-20 01:50:25 
Re: One for the programmers or maths/logic geeks
ebenZEROONE@[EMAIL PROTEC  2008-05-14 07:07:41 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-14 06:27:08 
Re: One for the programmers or maths/logic geeks
huey.callison@[EMAIL PROT  2008-05-14 00:40:32 
Re: One for the programmers or maths/logic geeks
Snidely <Snidely.too@[  2008-05-13 10:55:01 
Re: One for the programmers or maths/logic geeks
Bob Ward <bobward@[EMA  2008-05-13 13:19:29 
Re: One for the programmers or maths/logic geeks
Opus the Penguin <opus  2008-05-14 02:26:49 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-14 06:28:15 
Re: One for the programmers or maths/logic geeks
huey.callison@[EMAIL PROT  2008-05-14 01:24:52 
Re: One for the programmers or maths/logic geeks
Snidely <Snidely.too@[  2008-05-13 23:01:18 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-20 01:52:57 
Re: One for the programmers or maths/logic geeks
Snidely <Snidely.too@[  2008-05-13 23:03:26 
Re: One for the programmers or maths/logic geeks
huey.callison@[EMAIL PROT  2008-05-14 02:31:41 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-20 02:03:57 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-20 01:45:19 
Re: One for the programmers or maths/logic geeks
Snidely <Snidely.too@[  2008-05-20 12:21:44 
Re: One for the programmers or maths/logic geeks
xhoster@[EMAIL PROTECTED]  2008-05-20 19:42:30 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-21 05:12:16 
Re: One for the programmers or maths/logic geeks
huey.callison@[EMAIL PROT  2008-05-21 01:56:55 
Re: One for the programmers or maths/logic geeks
John Hatpin <RemoveThi  2008-05-21 19:39:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:40:48 CST 2008.