https://www.chess.com/forum/view/general/how-many-moves-does-a-knight-need-to-get-somewhere
someone in the forum has ever discussed the problem.
https://www.chess.com/forum/view/general/how-many-moves-does-a-knight-need-to-get-somewhere
someone in the forum has ever discussed the problem.
https://www.chess.com/forum/view/general/how-many-moves-does-a-knight-need-to-get-somewhere
someone in the forum has ever discussed the problem.
Yes, as I said in my first paragraph. But no one has yet tried to find another approach to solving the problem to provide a check on my solution. Is that something you might be thinking about doing?
Here's something useful to note about m(x,y). Due to chessboard symmetry, it's clear that
m(x,y)=m(-x,y)=m(x,-y)=m(-x,-y)=m(y,x)=m(-y,x)=m(y,-x)=m(-y,-x). So a formula that works for the one-eighth of the board where 0≤y≤x can easily be extended by symmetry to cover the whole board. This might be helpful to anyone trying to come up with a formula for m(x,y). There is someone out there doing that, right?
I worked on this for a while and gave up, but I found a formula that seems to work here. Note that this formula does give m(-257,-3186)=1593.
I worked on this for a while and gave up, but I found a formula that seems to work here. Note that this formula does give m(-257,-3186)=1593.
That's a good find. The formula you found has a different form than my formula, but every knight journey I have tested has gotten the same shortest path length from both formulas. I would say you have succeeded in locating an independently-derived formula which also solves the shortest path length problem correctly.
Some readers may want see the actual formulas. They are simplest to express when written for the one-eighth of the board where 0≤y≤x. As I mentioned, the results there can easily be extended by symmetry to cover the whole board.
Here is the formula I posted two years ago at another site where I first saw the problem being discussed:
[r] means integer part of r
WOLOG, assume 0≤y≤x.
m(1,0)=3
m(2,2)=4
else if 2y>x, m(x,y)=x-y+2[(2y-x+2)/3]
else m(x,y)=x-y-2[(x-2y)/4]
Here is the simplified form of the formula Lugarian found a link to:
⌈r⌉ means the smallest integer greater than or equal to r
WOLOG, assume 0≤y≤x.
m(1,0)=3
m(2,2)=4
else let z=⌈max(x/2,(x+y)/3)⌉
m(x,y)=z+((x+y+z) mod 2)
Okay so here are 15 squares for a knight on a1.
Squares that are red, the knight gets to in one move.
Squares that are green take two moves.
Squares that are blue take three moves.
Squares that are yellow take 4 moves.
Okay so here are 15 squares for a knight on a1.
Squares that are red, the knight gets to in one move.
Squares that are green take two moves.
Squares that are blue take three moves.
Squares that are yellow take 4 moves.
Those are correct answers to a different question. My question is about a knight near the middle of a board so large that the knight never has to get close to an edge. On such a board, your square at b2 would be green.
I came across and worked on an interesting unsolved chess-related math problem in a forum at another site. I posted about it on this site in the General Chess Discussion forum, which I have decided was the wrong place for it. Only a couple of readers were interested in the math problem. There were more comments from armchair philosophers who wanted to argue about word definitions or call the problem meaningless. I'm thinking I might get more useful comments in this forum.
The problem involves a knight near the middle of a non-standard chessboard which is about to travel to a different square. The board is laid out like a regular chessboard, but instead of being an 8 by 8 board, it has a very large number of ranks and files. For convenience, the starting square of the knight is given coordinates (0,0). A square two files to the right and five ranks below would be at (2,-5), and so on. The problem is to find the length of the shortest path, using standard knight-moves, for the knight to travel from its starting square at (0,0) to a given target square at (x,y), for any particular values of x and y, given that the board is large enough to keep the shortest path from ever reaching the edge of the board. So the answer will be a formula for a function m(x,y) which calculates the shortest path length for any given x and y.
For a couple of examples, m(2,2)=4, since a knight needs at least four moves to get from d3 to f5 on a regular board, and m(1,1)=2 since a knight can go from d3 to e4 in two moves.
I found a formula for m(x,y) which I believe gives the correct minimum move number for any values of x and y. There can be more than one correct way to solve a math problem, and I hoped a mathematically-minded reader would be inspired to develop another solution. If two solutions found independently give the same path length for the same starting and target squares in every case, it would increase our confidence that our solutions are correct. You could be the first to find an alternate approach to solving the problem, and we could compare our results.
Here are a few results from my formula, for comparison purposes.
m(7,7)=6
m(13,-11)=8
m(-233,512)=257
m(2317,1449)=1256