I&#39;m tempted by your &quot;super-sized choc fish&quot; :)<div>Here&#39;s what I&#39;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 &quot;cogs&quot;- slang for one of the Propeller&#39;s eight 32-bit processors- to validate a queen&#39;s position.  The first queen placed doesn&#39;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<br>
<br><div class="gmail_quote">On Wed, Aug 31, 2011 at 9:36 AM, Charles Manning <span dir="ltr">&lt;<a href="mailto:manningc2@actrix.gen.nz">manningc2@actrix.gen.nz</a>&gt;</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&#39;t want people to understand their code?<br>
<div><div></div><div class="h5"><br>
On Tuesday 30 August 2011 13:52:46 Charles Manning wrote:<br>
&gt; Synco. Since we&#39;re making deals, I&#39;ll lick half the choc off the fish if<br>
&gt; your solution doesn&#39;t work all the time.<br>
&gt;<br>
&gt; Here&#39;s an extra challenge to Propeller fans. A super-sized choc fish for<br>
&gt; any solution that exploits multi-cores.<br>
&gt;<br>
&gt; On Tuesday 30 August 2011 10:15:12 Synco Reynders wrote:<br>
&gt; &gt; You realise asking for an explanation of how it works would cost atleast<br>
&gt; &gt; one chocolate fish. :-)<br>
&gt; &gt; /s<br>
&gt; &gt;<br>
&gt; &gt; On 30 August 2011 09:59, Charles Manning &lt;<a href="mailto:manningc2@actrix.gen.nz">manningc2@actrix.gen.nz</a>&gt; wrote:<br>
&gt; &gt; &gt; On Thursday 25 August 2011 13:48:40 Charles Manning wrote:<br>
&gt; &gt; &gt; &gt; The last set of choc fish were handed out without ceremony at the<br>
&gt; &gt; &gt; &gt; last meeting.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; A new choc fish challege: Write a program or make any other mechanism<br>
&gt; &gt; &gt; &gt; to solve the n queens problem.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; There will be many prizes and categories will be created on a whim.<br>
&gt; &gt; &gt; &gt; There will be prizes for at least the following categories:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * Simplest C solution.<br>
&gt; &gt; &gt; &gt; * Simplest other language solution.<br>
&gt; &gt; &gt; &gt; * Solution not using recursion.<br>
&gt; &gt; &gt; &gt; * Non-programming solutions<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Background<br>
&gt; &gt; &gt; &gt; The n-queens problem is a  classical computer science problem. What<br>
&gt; &gt; &gt; &gt; you need to do is place n queens on an nxn chess board so that none<br>
&gt; &gt; &gt; &gt; of the queens can take eachother.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; For example, on a normal 8x8 board you must place 8 queens so that<br>
&gt; &gt; &gt; &gt; none<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; may<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; take eachother.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; An example solution for 4 queens is:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; XQXX<br>
&gt; &gt; &gt; &gt; XXXQ<br>
&gt; &gt; &gt; &gt; QXXX<br>
&gt; &gt; &gt; &gt; XXQX<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Deadline: three days before the next meeting.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; So far, one very intriguing C entry from Synco. I&#39;ve only looked at it<br>
&gt; &gt; &gt; a short<br>
&gt; &gt; &gt; while and have not quite figured out how it works.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; -- Charles<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz">Chchrobotics@lists.linuxnut.co.nz</a><br>
&gt; &gt; &gt; <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
&gt; &gt; &gt; Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
&gt; &gt; &gt; Web site: <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a><br>
&gt; &gt; &gt; Meetings 3rd Monday each month at Tait Radio Communications, 175<br>
&gt; &gt; &gt; Roydvale Ave, 6.30pm<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; When replying, please edit your Subject line to reflect new content.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.linuxnut.co.nz">Chchrobotics@lists.linuxnut.co.nz</a><br>
&gt; <a href="http://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">http://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
&gt; Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
&gt; Web site: <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a><br>
&gt; Meetings 3rd Monday each month at Tait Radio Communications, 175 Roydvale<br>
&gt; Ave, 6.30pm<br>
&gt;<br>
&gt; 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">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>