On Wed, 2010-03-10 at 02:37 -0300, Gabriel Genellina wrote:
Warnsdorff's algorithm is heuristic; it works most of the time, but in
some cases leads to a dead end and you have to backtrack and try another
alternative.
The starting square is important; if you start at 1,1 (instead of 0,0)
On 3/10/2010 12:37 AM, Gabriel Genellina wrote:
if (next != 0):
(self.y, self.x) = (next.y, next.x)
In Python3, next is a builtin function.
Choose a different name, at least in public code ;=).
--
http://mail.python.org/mailman/listinfo/python-list
In message mailman.527.1268199449.23598.python-l...@python.org, Gabriel
Genellina wrote:
Warnsdorff's algorithm is heuristic ...
Then it shouldn’t be called an “algorithm”.
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-03-10 15:49 PM, Lawrence D'Oliveiro wrote:
In messagemailman.527.1268199449.23598.python-l...@python.org, Gabriel
Genellina wrote:
Warnsdorff's algorithm is heuristic ...
Then it shouldn’t be called an “algorithm”.
There are lots of algorithms that use heuristics or are heuristics.
On 2010-03-10, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote:
In message mailman.527.1268199449.23598.python-l...@python.org, Gabriel
Genellina wrote:
Warnsdorff's algorithm is heuristic ...
Then it shouldn???t be called an ???algorithm???.
Why? An algorithm is just a
On 3/10/2010 4:49 PM, Lawrence D'Oliveiro wrote:
In messagemailman.527.1268199449.23598.python-l...@python.org, Gabriel
Genellina wrote:
Warnsdorff's algorithm is heuristic ...
Then it shouldn’t be called an “algorithm”.
Heuristic algorithms correctly compute some function, just not the
Hi all
I'm having some troubles with writing Knight's tour
(http://en.wikipedia.org/wiki/Knight%27s_tour) solution in Python 3. I'm
using Warnsdorff's algorithm (http://en.wikipedia.org/wiki/Knight%
27s_tour#Algorithm) and I'm wondering why it doesn't work with boards of
certain sizes. I've
El 9 mar, 22:57, Robin Rytich escribió:
I'm having some troubles with writing Knight's tour
(http://en.wikipedia.org/wiki/Knight%27s_tour) solution in Python 3. I'm
using Warnsdorff's algorithm (http://en.wikipedia.org/wiki/Knight%
27s_tour#Algorithm) and I'm wondering why it doesn't work with