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 22 of 40 Topic 22308 of 23383
Post > Topic >>

Re: One for the programmers or maths/logic geeks

by ebenZEROONE@[EMAIL PROTECTED] (Hactar) May 14, 2008 at 07:07 AM

In article <68v7q8F2s69q1U1@[EMAIL PROTECTED]
>,
Greg Goss  <gossg@[EMAIL PROTECTED]
> wrote:
> xhoster@[EMAIL PROTECTED]
 wrote:
> 
> >Snidely <Snidely.too@[EMAIL PROTECTED]
> wrote:
> >> On May 11, 2:52 pm, xhos...@[EMAIL PROTECTED]
 wrote:
> >> > How im****tant is the even coverage?  I'd be tempted to just make it
fly
> >> > around at pseudo-random (or maybe depth-first systematically),
checking
> >> > each non-checked square before entering it and remembering the
result
> >> > for future use. That way it would cover all accessible land
regardless
> >> > of the shape, although perhaps not evenly.
> >>
> >> I'd be tempted to just set it up as a random walk, choosing dir->next
> >> if dir-Owner !match.  And let it wind its own way through the plot,
> >> rather than manually moving it.  You only have to have it move one
> >> square at a time at some arbitrary interval ~= len(birdsong).  And
why
> >> bother remembering?
> >
> >Because he said checking is slow, so why do it gratuitously?
> 
> The app would keep its own internal check function that would
> gradually learn all the Yesses and Nos.  So the function would
> gradually speed up over time.

How about something like this:
(This assumes it starts at (0.0) and the world goes to (+/- 255, +/-
255)
Check the owner of (0,0).  Store it.
steplength=128
Check owner****p of here+steplength northward
  Same owner?
    Assume every cell along the way has the same owner.
  Different owner?
    Divide steplength by 2 and try again.

(Do this until you can take a step and have it be the same owner.)

move northward by steplength

OK, now see how far you can go northward before you hit the next owner's
plot of land.  You know you can't go another steplength because you've
already checked and found it belongs to someone else.    So start
with steplength/2 and go down.

When you've gone as far as you can northward, maybe use an
edge-following algorithm to find the land boundaries?

This does fail if you own two discontiguous plots, or maybe if the plot
is non-convex, or if another player's land is completely surrounded by
your own (like Lesotho in South Africa).

-- 
-eben     QebWenE01R@[EMAIL PROTECTED]
     royalty.mine.nu:81

Only two things are infinite, the universe and human stupidity,
    and I'm not sure about the former." -- Albert Einstein
 




 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 Thu Jul 24 7:13:38 CDT 2008.