diff options
author | unknown <tools@python.org> | 2001-07-04 22:11:22 (GMT) |
---|---|---|
committer | unknown <tools@python.org> | 2001-07-04 22:11:22 (GMT) |
commit | 31569561fdba94cce39a55a1e033755d06ee8640 (patch) | |
tree | eb9ed6ae3bce4bd5041a0ca419b0526532fb4033 /Mac | |
parent | a5aa0b5261314ea0d5675de6aab48a0db37ce316 (diff) | |
download | cpython-31569561fdba94cce39a55a1e033755d06ee8640.zip cpython-31569561fdba94cce39a55a1e033755d06ee8640.tar.gz cpython-31569561fdba94cce39a55a1e033755d06ee8640.tar.bz2 |
Added a non-recursive implementation of conjoin(), and a Knight's Tour
solver. In conjunction, they easily found a tour of a 200x200 board:
that's 200**2 == 40,000 levels of backtracking. Explicitly resumable
generators allow that to be coded as easily as a recursive solver (easier,
actually, because different levels can use level-customized algorithms
without pain), but without blowing the stack. Indeed, I've never written
an exhaustive Tour solver in any language before that can handle boards so
large ("exhaustive" == guaranteed to find a solution if one exists, as
opposed to probabilistic heuristic approaches; of course, the age of the
universe may be a blip in the time needed!).
Diffstat (limited to 'Mac')
0 files changed, 0 insertions, 0 deletions