Write the shortest code that bring to a solution of "The old curious knight with a lazy horse" problem

2

The Story:
Once upon a time there was a curious Knight that lived on a never used chessboard in the Realm, an antique store. He spent all his career over there and when it came the moment of the retirement he decided to satisfy the wish of all his life: to explore the whole world. Unfortunately his horse was the most lazy ever seen in the Realm, and didn't agree to join in this wide quest: they discuss a long but at the end it was possible to find an agreement. The horse allowed to the Knight to have the last ride, but only with 64 steps, not only one more. Moreover with the last move the Knight had to return to the starting place (home). Not in the least the horse was known as the most lazy of the Realm !.

Rules and goals:
To write a code that finds a valid solution and allows to the Knight and his horse to explore all the chessboard. Specification for the code:

  • It have to accept the starting point (each ones valid: I suggest the central ones d4,d5,e4,e5 to try to speed-up the code).
  • The chessboard is a classic one 8x8.
  • The Knight have to follow the standard rules (L moves)
  • The Knight have to start and arrive to same square exactly in 64 moves.
  • The Knight have to touch one time each square on the chessboard.
    The only exception is the starting-ending square.
  • It is not valid to print the string with a pre-made solution: too easy!.

Input, Output, Winner

  • Take as input the original position, e.g d4
  • Give as output a string of 64 positions separated by a space. e.g. d4 e6 ...
  • As often here the shorter the better. In case of a tie, the earlier solution wins.

Suggestion and references

It's a well known problem studied from centuries... something like from 9th century AD!

Hastur

Posted 2014-06-08T17:17:00.143

Reputation: 277

Question was closed 2014-06-09T17:42:49.850

3

Seems awfully close to this question

– Kyle Kanos – 2014-06-08T18:34:18.063

5"It is not valid to print the string with a pre-made solution: too easy!" Then what's not too easy? In my mind I have a hardcoded closed knight's tour, which I simply rotate to the given starting point. In any case, I agree with Kyle that this doesn't really seem to add a lot over the other question. – Martin Ender – 2014-06-08T18:48:41.597

No answers