Skip to main content
added 38 characters in body
Source Link
Cruncher
  • 217
  • 1
  • 5

I know this is a super old question. I made a program that outputs all the positions a knight can be relative to starting position within fivesix moves.(which happens to be the maximum number of moves needed to get anywhere)

0: (0, 0) 
1: (2, 1) 
2: (2, 0) (3, 3) (4, 2) (3, 1) (1, 1) (4, 0) 
3: (3, 2) (5, 4) (4, 1) (3, 0) (6, 1) (6, 3) (4, 3) (5, 0) (1, 0) (5, 2) 
4: (7, 3) (6, 4) (8 2) (5, 5) (6, 6) (7, 1) (4, 4) (8 0) (6, 0) (8 4) (6, 2) (7, 5) (2, 2) (5, 1) (5, 3) 
5: (9 4) (10 1) (8 7) (10 3) (9, 64) (6 5) (8, 5) (7 2) (8 3) (9, 0) (7 0) (10 5) (8, 16) (97, 2) (7  
6): (7, 47)

Number on the left is turn number, and the list on the right corresponds to all the positions the knight can be in with duplicate positions removed (we don't care that you can go back to your starting position for example, these are the shortest paths to each of these positions). Also, no negative numbers are represented. For example 2,1 -2,1, 2,-1 and -2,-1 are all considered the same position. Also the biggest number is always shown first. For example (4,2) means the night can move 4 spaces in some direction, and then 2 in an orthogonal direction.

One more caveat is that these numbers are the theoretical minimum with no pieces in the way, and a theoretical infinite plane to work with. That is, to achieve this could potentially require moves that exit the game board and come back. I think it only requires exiting in rare cases. For example, if you're in a corner of a board and want to move 1,1 toward the center, the 2 moves that should be able to do this require you going out of bounds first.

Memorizing this is probably not that useful, but there's some interesting takeaways that may be worth noting.

For example, it takes a whole 3 moves to move a knight 1 square forward.

I know this is a super old question. I made a program that outputs all the positions a knight can be relative to starting position within five moves.

0: (0 0)
1: (2 1) 
2: (2 0) (3 3) (4 2) (3 1) (1 1) (4 0)
3: (3 2) (5 4) (4 1) (3 0) (6 1) (6 3) (4 3) (5 0) (1 0) (5 2)
4: (7 3) (6 4) (8 2) (5 5) (6 6) (7 1) (4 4) (8 0) (6 0) (8 4) (6 2) (7 5) (2 2) (5 1) (5 3)
5: (9 4) (10 1) (8 7) (10 3) (9 6) (6 5) (8 5) (7 2) (8 3) (9 0) (7 0) (10 5) (8 1) (9 2) (7 6) (7 4)

Number on the left is turn number, and the list on the right corresponds to all the positions the knight can be in with duplicate positions removed (we don't care that you can go back to your starting position for example, these are the shortest paths to each of these positions). Also, no negative numbers are represented. For example 2,1 -2,1, 2,-1 and -2,-1 are all considered the same position. Also the biggest number is always shown first. For example (4,2) means the night can move 4 spaces in some direction, and then 2 in an orthogonal direction.

One more caveat is that these numbers are the theoretical minimum with no pieces in the way, and a theoretical infinite plane to work with. That is, to achieve this could potentially require moves that exit the game board and come back.

Memorizing this is probably not that useful, but there's some interesting takeaways that may be worth noting.

For example, it takes a whole 3 moves to move a knight 1 square forward.

I know this is a super old question. I made a program that outputs all the positions a knight can be relative to starting position within six moves(which happens to be the maximum number of moves needed to get anywhere)

0: (0, 0) 
1: (2, 1) 
2: (2, 0) (3, 3) (4, 2) (3, 1) (1, 1) (4, 0) 
3: (3, 2) (5, 4) (4, 1) (3, 0) (6, 1) (6, 3) (4, 3) (5, 0) (1, 0) (5, 2) 
4: (7, 3) (6, 4) (5, 5) (6, 6) (7, 1) (4, 4) (6, 0) (6, 2) (7, 5) (2, 2) (5, 1) (5, 3) 
5: (7, 4) (6, 5) (7, 0) (7, 6) (7, 2)  
6: (7, 7)

Number on the left is turn number, and the list on the right corresponds to all the positions the knight can be in with duplicate positions removed (we don't care that you can go back to your starting position for example, these are the shortest paths to each of these positions). Also, no negative numbers are represented. For example 2,1 -2,1, 2,-1 and -2,-1 are all considered the same position. Also the biggest number is always shown first. For example (4,2) means the night can move 4 spaces in some direction, and then 2 in an orthogonal direction.

One more caveat is that these numbers are the theoretical minimum with no pieces in the way, and a theoretical infinite plane to work with. That is, to achieve this could potentially require moves that exit the game board and come back. I think it only requires exiting in rare cases. For example, if you're in a corner of a board and want to move 1,1 toward the center, the 2 moves that should be able to do this require you going out of bounds first.

Memorizing this is probably not that useful, but there's some interesting takeaways that may be worth noting.

For example, it takes a whole 3 moves to move a knight 1 square forward.

Code bug, numbers were wrong
Source Link
Cruncher
  • 217
  • 1
  • 5

I know this is a super old question. I made a program that outputs all the positions a knight can be relative to starting position within five moves.

0: (0, 0)
1: (2, 1) 
2: (2 0) (3 3) (4, 2) (2,3 01) (1 1) (4, 0)
3: (6, 3 2) (3,5 24) (4 1,) (3 0) (6, 1) (6 3) (4, 3) (5 0) (1 0) (5 2)
4: (7 3) (6 4) (8, 2) (2,5 25) (8,6 06) (7 1) (4, 4) (3,8 10) (6, 0) (8 4) (6, 2) (8,7 45) (5,2 12) (1,5 1) (5, 3)
5: (9 4) (10, 31) (8, 37) (10, 53) (7,9 06) (3,6 05) (8, 15) (7, 42) (4,8 3) (10,9 10) (5,7 0) (7,10 25) (5,8 1) (9 2) (7 6,) 5(7 4)

Number on the left is turn number, and the list on the right corresponds to all the positions the knight can be in with duplicate positions removed (we don't care that you can go back to your starting position for example, these are the shortest paths to each of these positions). Also, no negative numbers are represented. For example 2,1 -2,1, 2,-1 and -2,-1 are all considered the same position. Also the biggest number is always shown first. For example (4,2) means the night can move 4 spaces in some direction, and then 2 in an orthogonal direction.

One more caveat is that these numbers are the theoretical minimum with no pieces in the way, and a theoretical infinite plane to work with. That is, to achieve this could potentially require moves that exit the game board and come back.

Memorizing this is probably not that useful, but there's some interesting takeaways that may be worth noting.

First interesting thing is thatFor example, it takes a whole 3 moves to move a knight 1 square forward.

Second, is that the shortest way to move a knight 3 squares in some direction is 3 moves.

Third, something as simple as moving 3 squares in some direction without moving at all in another direction requires a whopping 5 moves!

I know this is a super old question. I made a program that outputs all the positions a knight can be relative to starting position within five moves.

0: (0, 0)
1: (2, 1)
2: (4, 2) (2, 0) (4, 0)
3: (6, 3) (3, 2) (1, 0) (6, 1) (4, 1)
4: (8, 2) (2, 2) (8, 0) (4, 4) (3, 1) (6, 0) (6, 2) (8, 4) (5, 1) (1, 1) (5, 3)
5: (10, 3) (8, 3) (10, 5) (7, 0) (3, 0) (8, 1) (7, 4) (4, 3) (10, 1) (5, 0) (7, 2) (5, 2) (6, 5)

Number on the left is turn number, and the list on the right corresponds to all the positions the knight can be in with duplicate positions removed (we don't care that you can go back to your starting position for example, these are the shortest paths to each of these positions). Also, no negative numbers are represented. For example 2,1 -2,1, 2,-1 and -2,-1 are all considered the same position. Also the biggest number is always shown first. For example (4,2) means the night can move 4 spaces in some direction, and then 2 in an orthogonal direction.

One more caveat is that these numbers are the theoretical minimum with no pieces in the way, and a theoretical infinite plane to work with. That is, to achieve this could potentially require moves that exit the game board and come back.

Memorizing this is probably not that useful, but there's some interesting takeaways that may be worth noting.

First interesting thing is that it takes a whole 3 moves to move a knight 1 square forward.

Second, is that the shortest way to move a knight 3 squares in some direction is 3 moves.

Third, something as simple as moving 3 squares in some direction without moving at all in another direction requires a whopping 5 moves!

I know this is a super old question. I made a program that outputs all the positions a knight can be relative to starting position within five moves.

0: (0 0)
1: (2 1) 
2: (2 0) (3 3) (4 2) (3 1) (1 1) (4 0)
3: (3 2) (5 4) (4 1) (3 0) (6 1) (6 3) (4 3) (5 0) (1 0) (5 2)
4: (7 3) (6 4) (8 2) (5 5) (6 6) (7 1) (4 4) (8 0) (6 0) (8 4) (6 2) (7 5) (2 2) (5 1) (5 3)
5: (9 4) (10 1) (8 7) (10 3) (9 6) (6 5) (8 5) (7 2) (8 3) (9 0) (7 0) (10 5) (8 1) (9 2) (7 6) (7 4)

Number on the left is turn number, and the list on the right corresponds to all the positions the knight can be in with duplicate positions removed (we don't care that you can go back to your starting position for example, these are the shortest paths to each of these positions). Also, no negative numbers are represented. For example 2,1 -2,1, 2,-1 and -2,-1 are all considered the same position. Also the biggest number is always shown first. For example (4,2) means the night can move 4 spaces in some direction, and then 2 in an orthogonal direction.

One more caveat is that these numbers are the theoretical minimum with no pieces in the way, and a theoretical infinite plane to work with. That is, to achieve this could potentially require moves that exit the game board and come back.

Memorizing this is probably not that useful, but there's some interesting takeaways that may be worth noting.

For example, it takes a whole 3 moves to move a knight 1 square forward.

Source Link
Cruncher
  • 217
  • 1
  • 5

I know this is a super old question. I made a program that outputs all the positions a knight can be relative to starting position within five moves.

0: (0, 0)
1: (2, 1)
2: (4, 2) (2, 0) (4, 0)
3: (6, 3) (3, 2) (1, 0) (6, 1) (4, 1)
4: (8, 2) (2, 2) (8, 0) (4, 4) (3, 1) (6, 0) (6, 2) (8, 4) (5, 1) (1, 1) (5, 3)
5: (10, 3) (8, 3) (10, 5) (7, 0) (3, 0) (8, 1) (7, 4) (4, 3) (10, 1) (5, 0) (7, 2) (5, 2) (6, 5)

Number on the left is turn number, and the list on the right corresponds to all the positions the knight can be in with duplicate positions removed (we don't care that you can go back to your starting position for example, these are the shortest paths to each of these positions). Also, no negative numbers are represented. For example 2,1 -2,1, 2,-1 and -2,-1 are all considered the same position. Also the biggest number is always shown first. For example (4,2) means the night can move 4 spaces in some direction, and then 2 in an orthogonal direction.

One more caveat is that these numbers are the theoretical minimum with no pieces in the way, and a theoretical infinite plane to work with. That is, to achieve this could potentially require moves that exit the game board and come back.

Memorizing this is probably not that useful, but there's some interesting takeaways that may be worth noting.

First interesting thing is that it takes a whole 3 moves to move a knight 1 square forward.

Second, is that the shortest way to move a knight 3 squares in some direction is 3 moves.

Third, something as simple as moving 3 squares in some direction without moving at all in another direction requires a whopping 5 moves!