Super-sized fish please!<div>See attached for a Propeller program that uses all 8 cogs to solve the queen's problem.</div><div>Hanno<br><div><br><br><div class="gmail_quote">On Wed, Aug 31, 2011 at 10:04 AM, Hanno Sander <span dir="ltr"><<a href="mailto:hanno@mydancebot.com">hanno@mydancebot.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I'm tempted by your "super-sized choc fish" :)<div>Here's what I'm thinking:</div><div><br></div>
<div>The only part of the queens problem that lends itself to parallel programming is checking to see if a solution is valid. We can use up to 7 "cogs"- slang for one of the Propeller's eight 32-bit processors- to validate a queen's position. The first queen placed doesn't need to be validated. Each of these cogs waits until a start signal and then checks if its queen is not in danger from the other 7 queens- by looking for row/column/diagonal attacks. Once finished, it sets a stop signal and indicates its result.</div>
<div><br></div><div>The eight cog generates test patterns, indicates the start condition, waits for all cogs to finish, and stops when a valid pattern is found.</div><div><br></div><div>Want some code?</div><div>Hanno<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Wed, Aug 31, 2011 at 9:36 AM, Charles Manning <span dir="ltr"><<a href="mailto:manningc2@actrix.gen.nz" target="_blank">manningc2@actrix.gen.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Three examples so far, all of which are obfuscated.<br>
<br>
Why don't want people to understand their code?<br>
<div><div></div><div><br>
On Tuesday 30 August 2011 13:52:46 Charles Manning wrote:<br>
> Synco. Since we're making deals, I'll lick half the choc off the fish if<br>
> your solution doesn't work all the time.<br>
><br>
> Here's an extra challenge to Propeller fans. A super-sized choc fish for<br>
> any solution that exploits multi-cores.<br>
><br>
> On Tuesday 30 August 2011 10:15:12 Synco Reynders wrote:<br>
> > You realise asking for an explanation of how it works would cost atleast<br>
> > one chocolate fish. :-)<br>
> > /s<br>
> ><br>
> > On 30 August 2011 09:59, Charles Manning <<a href="mailto:manningc2@actrix.gen.nz" target="_blank">manningc2@actrix.gen.nz</a>> wrote:<br>
> > > On Thursday 25 August 2011 13:48:40 Charles Manning wrote:<br>
> > > > The last set of choc fish were handed out without ceremony at the<br>
> > > > last meeting.<br>
> > > ><br>
> > > > A new choc fish challege: Write a program or make any other mechanism<br>
> > > > to solve the n queens problem.<br>
> > > ><br>
> > > > There will be many prizes and categories will be created on a whim.<br>
> > > > There will be prizes for at least the following categories:<br>
> > > ><br>
> > > > * Simplest C solution.<br>
> > > > * Simplest other language solution.<br>
> > > > * Solution not using recursion.<br>
> > > > * Non-programming solutions<br>
> > > ><br>
> > > ><br>
> > > > Background<br>
> > > > The n-queens problem is a classical computer science problem. What<br>
> > > > you need to do is place n queens on an nxn chess board so that none<br>
> > > > of the queens can take eachother.<br>
> > > ><br>
> > > > For example, on a normal 8x8 board you must place 8 queens so that<br>
> > > > none<br>
> > ><br>
> > > may<br>
> > ><br>
> > > > take eachother.<br>
> > > ><br>
> > > > An example solution for 4 queens is:<br>
> > > ><br>
> > > > XQXX<br>
> > > > XXXQ<br>
> > > > QXXX<br>
> > > > XXQX<br>
> > > ><br>
> > > > Deadline: three days before the next meeting.<br>
> > ><br>
> > > So far, one very intriguing C entry from Synco. I've only looked at it<br>
> > > a short<br>
> > > while and have not quite figured out how it works.<br>
> > ><br>
> > > -- Charles<br>
> > ><br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.co.nz</a><br>
> > > <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
> > > Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
> > > Web site: <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a><br>
> > > Meetings 3rd Monday each month at Tait Radio Communications, 175<br>
> > > Roydvale Ave, 6.30pm<br>
> > ><br>
> > > When replying, please edit your Subject line to reflect new content.<br>
><br>
> _______________________________________________<br>
> Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.co.nz</a><br>
> <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
> Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
> Web site: <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a><br>
> Meetings 3rd Monday each month at Tait Radio Communications, 175 Roydvale<br>
> Ave, 6.30pm<br>
><br>
> When replying, please edit your Subject line to reflect new content.<br>
<br>
<br>
<br>
_______________________________________________<br>
Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz" target="_blank">Chchrobotics@lists.linuxnut.co.nz</a><br>
<a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
Web site: <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a><br>
Meetings 3rd Monday each month at Tait Radio Communications, 175 Roydvale Ave, 6.30pm<br>
<br>
When replying, please edit your Subject line to reflect new content.<br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>