Popular recipes tagged "queen"http://code.activestate.com/recipes/tags/queen/2013-05-10T03:44:56-07:00ActiveState Code RecipesEight queen problem (Javascript) (JavaScript)
2013-03-20T19:03:44-07:00Thomas Lehmannhttp://code.activestate.com/recipes/users/4174477/http://code.activestate.com/recipes/578497-eight-queen-problem-javascript/
<p style="color: grey">
JavaScript
recipe 578497
by <a href="/recipes/users/4174477/">Thomas Lehmann</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/queen/">queen</a>, <a href="/recipes/tags/queens/">queens</a>).
</p>
<ul>
<li>Adding this for my old <a href="http://code.activestate.com/recipes/577438/">recipe 577438</a> (in Python).</li>
<li>Use node.js or HTML as execution (see comments in "log" function)</li>
</ul>
Eight queen problem (Python)
2013-05-10T03:44:56-07:00Thomas Lehmannhttp://code.activestate.com/recipes/users/4174477/http://code.activestate.com/recipes/577438-eight-queen-problem/
<p style="color: grey">
Python
recipe 577438
by <a href="/recipes/users/4174477/">Thomas Lehmann</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/queen/">queen</a>).
Revision 5.
</p>
<p><strong>Task</strong>:</p>
<ul>
<li>Think of a chess field 8x8.</li>
<li>Place 8 queens in a way that no one threaten another one.</li>
</ul>
<p><strong>Intention</strong>:</p>
<ul>
<li>Writing an algorithm to provide all solutions</li>
<li>Adjusting the algorithm in a way that it can handle chess fields by other sizes n x n.</li>
</ul>
<p><strong>Changes</strong>:</p>
<ul>
<li><strong>Revision 5</strong>:
<ul>
<li>can run providing "n" via command line parameter and </li>
<li>run half of board adding the other solutions by mirroring (12x12 takes 4 seconds instead of 8 on my slow notebook)</li>
</ul></li>
<li>...</li>
</ul>
<p><strong>Other languages</strong>:</p>
<ul>
<li>My <a href="http://code.activestate.com/recipes/578497/">recipe 578497</a> for JavaScript</li>
<li>...</li>
</ul>