6 ms·
You mean a 2-square Chebyshev distance, I think (the Linf norm). A 2-square Manhattan distance (the L1 norm) wouldn't include any of the squares that a knight c
by ComplexSystems 3y ago
You mean a 2-square Chebyshev distance, I think (the Linf norm). A 2-square Manhattan distance (the L1 norm) wouldn't include any of the squares that a knight can get to.
- deleted 3y ago[deleted]
- godelski 3y agoFor those that want a visual description there's a blog I serendipitous recently ran into[0]. If you're too lazy to open: - n-square Chebyshev distance forms concentric squares around your starting point - n-square Manhattan Distance forms diamonds (meaning up/down/left/right = 1 space away but all diagonals are 2 spaces away) We could also say the Knight can go everywhere a queen can't in the 3-square Manhattan distance and this might be more useful since it is all points along that boundary except the corners! (We got an in the wild "2 problems in computer science" with an "off by 1" error :) [0] https://chris3606.github.io/GoRogue/articles/grid_components/measuring-distance.html https://chris3606.github.io/GoRogue/articles/grid_components...
- mananaysiempre 3y agoThat's very much a picture that you learn on the usual mathematics route of learning about these things, yes. More generally, there's a fair amount to be said about how you can derive shapes of unit balls from distance functions and vice versa (in functional analysis in particular).
- godelski 3y agoI think, unfortunately, not many get visual descriptions when learning about these topics. To be fair, these visualizations can harm one's intuitions about how the metrics work in higher dimensions, so I can understand arguments against visualization. But in another example, I think even many people can come out of a Linear Algebra class and not understand that a matrix operating on a vector always performs an affine transformation on that vector (yes, I know we can abuse and get other forms but let's keep general due to context). I think this is something math education can improve on since we are highly visual creatures. But it is always a tough balance since that same tool to help learning can decrease generalization if internalized improperly. But that can also be said about anything and is why I dislike the common test focused paradigm of education. As I think we've been doing it long enough that students have found studying for the test -- as opposed to study for learning -- is optimal. Goodhart always wins lol
- Agentlien 3y ago> a matrix operating on a vector always performs an affine transformation on that vector A simple matrix multiplication only performs a linear transformation. To get a nonlinear affine transformation you need to augment the matrix and vector with extra dimensions containing carefully selected extra ones and zeros in addition to the translation. The end result is still a linear transformation of the supplied vector, but looks like an affine transformation if you ignore the final dimension. But yes, I did not pick that up in linear algebra. It wasn't even mentioned there. All the fun stuff was taught in computer graphics.
- jasomill 3y agoSpecifically, https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_10-6.pdf https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_1... For more on the underlying geometry, see, e.g., https://archive.org/details/elementarymathem0000klei/page/70/mode/1up https://archive.org/details/elementarymathem0000klei/page/70... or, for a more modern, abstract formulation, https://archive.org/details/geometry0001berg https://archive.org/details/geometry0001berg