Hi all
This week's vba problem is a classic. We've all heard of it sometime and it may not be so simple as one would think.
Problem:
Place a knight on a corner of a chess board. Can you move the knight over all the other squares visiting each one just once?
- If yes, display one possible path.
MVPs and experienced users, please wait 24 hours before posting a solution.
Suggestion: it takes a while for the code to find a solution (at least with my algorithm). You may want to try it first on a board 5 * 5 where it takes less than a second.
It would be interesting to have some discussion about this. Don't wait till you have a top notch solution to post. Possible themes for discussion: how to move the knight, how to represent the board, how to check if all the squares have been visited, etc.
Have fun.
Cheers
This week's vba problem is a classic. We've all heard of it sometime and it may not be so simple as one would think.
Problem:
Place a knight on a corner of a chess board. Can you move the knight over all the other squares visiting each one just once?
- If yes, display one possible path.
MVPs and experienced users, please wait 24 hours before posting a solution.
Suggestion: it takes a while for the code to find a solution (at least with my algorithm). You may want to try it first on a board 5 * 5 where it takes less than a second.
It would be interesting to have some discussion about this. Don't wait till you have a top notch solution to post. Possible themes for discussion: how to move the knight, how to represent the board, how to check if all the squares have been visited, etc.
Have fun.
Cheers