How many moves does a knight need to get somewhere?

Sort:
llama47
Mr-Mudd wrote:

there has been an invitation given to offer an alternate formula (as it has been by the OP)  

Disclaimer... I'm drunk right now

His seems efficient. The wave patterns I made are no thicker than 4, and he has two different statements that use division and a floor function meaning each statement could yield two different answers, and 2x2=4.

There are a few special cases he takes care of (when the destination is very close).

So it seems very efficient. There may be some tricks to make it even more efficient, but I'm not experienced with anything like that, so I wont even try.

n9531l1

As the originator of this thread, I can verify that the question in its title was intended to get people's attention, and that the actual intent of the question was spelled out in the initial post clearly enough for many people to understand it. One reader in particular was so unnerved by the idea of an infinite chessboard that he declared the question meaningless. For his benefit, I provided an alternate version of the question in which the board is not infinite, but whose size is so large that a knight near its center cannot have its shortest path to a specified target square influenced by the edge of the board, and noted that it's easy to prove that there is such a size for any given target square.

Later a few armchair philosophers weighed in with comments addressing only the question in the title, and ignoring its intended meaning as explained in the initial post. I don't have any objection to those comments, but I am curious about whether is has occurred to those making them to attempt a positive contribution to the actual intent of the question as explained in the initial post. At this point I don't believe that's likely to happen, but maybe one of them will surprise me.

MagicalScarecrow

i have a very simple solution. we give the knight self awareness and force it to move to the square at gunpoint. it should get there pretty fast.

MagicalScarecrow
MagicalScarecrow wrote:

i have a very simple solution. we give the knight self awareness and force it to move to the square at gunpoint. it should get there pretty fast.

just count how many jumps it makes

EasonXiong

Good question...

llama47
MagicalScarecrow wrote:
MagicalScarecrow wrote:

i have a very simple solution. we give the knight self awareness and force it to move to the square at gunpoint. it should get there pretty fast.

just count how many jumps it makes

Nc2-d4-b3-d2-c4 is 4 moves, but that isn't the shortest path. Nc2-e3-c4 is shorter.

llama47
n9531l1 wrote:

As the originator of this thread, I can verify that the question in its title was intended to get people's attention, and that the actual intent of the question was spelled out in the initial post clearly enough for many people to understand it. One reader in particular was so unnerved by the idea of an infinite chessboard that he declared the question meaningless. For his benefit, I provided an alternate version of the question in which the board is not infinite, but whose size is so large that a knight near its center cannot have its shortest path to a specified target square influenced by the edge of the board, and noted that it's easy to prove that there is such a size for any given target square.

Later a few armchair philosophers weighed in with comments addressing only the question in the title, and ignoring its intended meaning as explained in the initial post. I don't have any objection to those comments, but I am curious about whether is has occurred to those making them to attempt a positive contribution to the actual intent of the question as explained in the initial post. At this point I don't believe that's likely to happen, but maybe one of them will surprise me.

Chess.com forum's largest two groups:

1) Kids
2) Retirees slowly slipping into dementia

StormCentre3

Incorrect- I will shortly provide the explanation.

The graphs provided by llama elegantly express the shortest Knight moves - on an infinite plane of 360 degrees. 4 quadrants - mirror images. The  expanding symmetry is easily viewed. A formula easily written than can be applied for any starting point. 
However- 

In practical matters- with a chess board that has boundaries which limits the options of possible moves- the chart  is at best 50% correct !

A formula that works on the 360 % chart does not apply to a single quadrant (as in a chess board.)

StormCentre3

It is soon realized that the resulting depiction provided by the graphs shortest Knight moves is not at all what the true story is on a chess board.  It seemed the OP was looking to solve a real life math problem to be applied to chess on a practical matter.

StormCentre3

An elegant chart depicting the shortest Knight moves provide by llama

Divide the chart on x/y axis into four quadrants. All symmetrical. The resulting picture of each quadrant is not a true representation of the shortest Knight moves of a bordered chess arena. (By the nature of the Knight move). If a Queen - the repeating logarithm works, but not for the Knight.

Ilampozhil25

so you are saying

4 quadrants= equal

4 quadrants alone= different from shown

so, diagram=false?

n9531l1
Ilampozhil25 wrote:

4 quadrants alone= different from shown

I couldn't decide what you meant by this, but it appears to me that the pattern is perfectly symmetrical. In checking the symmetry, you have to ignore the leftmost column of pixels, since the corresponding rightmost column is off the edge of the graph. Likewise the bottom row of pixels matches a top row that is off the edge of the graph.

n9531l1
Mr-Mudd wrote:

Not so long as you only expect your own answer reflected back to you.

As I suggested, a positive contribution is not something I will hold my breath while waiting for. I'm happy about the very positive contributions already made by some, particularly those of llama47.

n9531l1
StormCentre3 wrote:

It seemed the OP was looking to solve a real life math problem to be applied to chess on a practical matter.

Actually, the OP had no interest at all in applying the problem solution to chess as a practical matter. The OP was looking for an efficient way to solve an interesting mathematical problem that had been posed but not solved by someone else in another forum.

The mention of an infinite chessboard in the initial post might have been a clue that the problem was not about real chessboards and practical chess. (And please remember that the same problem with the same solution can be framed in a way that does not require any mention of infinity.)

llama47
n9531l1 wrote:
Ilampozhil25 wrote:

4 quadrants alone= different from shown

I couldn't decide what you meant by this, but it appears to me that the pattern is perfectly symmetrical. In checking the symmetry, you have to ignore the leftmost column of pixels, since the corresponding rightmost column is off the edge of the graph. Likewise the bottom row of pixels matches a top row that is off the edge of the graph.

I read it once, didn't understand. I'm not going to read it 5 times to try and decipher it.

In any case it's not symmetrical because it's a 50x50 board, which means there is no single center square (just like an 8x8 board). I could have done it with 51x51 but I didn't care.

n9531l1
llama47 wrote:

I read it once, didn't understand. I'm not going to read it 5 times to try and decipher it.

Sorry, I'll try to be clearer next time.

EasonXiong

50x50 boards have four squares in the center.

ThrillerFan
BossBlunder wrote:
m(-1,-2)=1 m(7,7)=6 m(12,-15)=9 m(2163,999)=1082 m(-257,-3186)=1149 m(3186,257)=1593

 

m(-257,-3186) cannot possibly be 1149.

A knight moves 2 squares in one direction and 1 square in either perpendicular direction, like 2 north 1 east or 2 north 1 west or 2 west 1 south, etc.

 

So the MINIMUM number of moves is half of the absolute value of the coordinate further away from 0.  In this case, it is | -3186 | / 2 = 1593.  Therefore, it cannot possibly go less than 1593.  It could require more.

 

If it went exactly 1593 moves, it would have to go South 2 every time.  Therefore, it would always have to go easy or west 1 move every time.  Since in exactly 1593 moves, the Knight can get to ANY ODD numbered coordinate between 1593 and -1593, for example, to get to -1587, you'd go east 3 times and west 1590 times, and since -257 is odd and within range, the answer MUST be 1593.

 

If X were an even number or a number beyond 1593 or -1593, only then would it take more than 1593 moves with y being -3186.

StormCentre3

The chart, which expands infinitely on a plane, is not a true representation of the shortest Knight moves on a real chess board. A chess board is finite, bordered and places restrictions on the 1st move for the Knight when on a the 1st or 2nd file/rank. 
All that is being said- a formula for an infinite board holds true for any given coordinate. Problems exist in making such a formula for a real chess board with finite space. 
Upon viewing a single quadrant, which are all symmetrical, one quite readily observes starting from 0/0 , the resulting chart does not accurately predict the pattern that  emerges from a finite chess board.

rychessmaster1
llama47 wrote:
rychessmaster1 wrote:
llama47 wrote:

You remind me of @thee_ghostess_lola you like to have fun and are maybe a bit trolly.

Does that not remind you of somebody else?

I ROUNDHOUSE KICK YOU

YOU FORGOT THE RED FONT :-)