²ḶdðạP€ċ2)
A monadic link yielding a flat list - uses the idea first used by KSab in their Python answer - knight's moves have "sides" 1 and 2, the only factors of 2.
Try it online! (footer calls the program's only Link and then formats the result as a grid)
Alternatively, also for 10 bytes, ²Ḷdðạ²§ċ5)
(knight's moves are all of the possible moves with distance 5–√)
How?
²ḶdðạP€ċ2) - Link: integer, n (any non-negative) e.g. 8
² - square n 64
Ḷ - lowered range [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
d - divmod (vectorises) i.e. x->[x//n,x%n] [[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[1,6],[1,7],[2,0],[2,1],[2,2],[2,3],[2,4],[2,5],[2,6],[2,7],[3,0],[3,1],[3,2],[3,3],[3,4],[3,5],[3,6],[3,7],[4,0],[4,1],[4,2],[4,3],[4,4],[4,5],[4,6],[4,7],[5,0],[5,1],[5,2],[5,3],[5,4],[5,5],[5,6],[5,7],[6,0],[6,1],[6,2],[6,3],[6,4],[6,5],[6,6],[6,7],[7,0],[7,1],[7,2],[7,3],[7,4],[7,5],[7,6],[7,7]]
ð ) - new dyadic chain for each - call that L ( & e.g. R = [1,2] representing the "2nd row, 3rd column" ...-^ )
ạ - absolute difference (vectorises) [[1,2],[1,1],[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[0,2],[0,1],[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[1,2],[1,1],[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[2,2],[2,1],[2,0],[2,1],[2,2],[2,3],[2,4],[2,5],[3,2],[3,1],[3,0],[3,1],[3,2],[3,3],[3,4],[3,5],[4,2],[4,1],[4,0],[4,1],[4,2],[4,3],[4,4],[4,5],[5,2],[5,1],[5,0],[5,1],[5,2],[5,3],[5,4],[5,5],[6,2],[6,1],[6,0],[6,1],[6,2],[6,3],[6,4],[6,5]]
P€ - product of €ach [2, 1, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2, 3, 4, 5, 4, 2, 0, 2, 4, 6, 8, 10, 6, 3, 0, 3, 6, 9, 12, 15, 8, 4, 0, 4, 8, 12, 16, 20, 10, 5, 0, 5, 10, 15, 20, 25, 12, 6, 0, 6, 12, 18, 24, 30]
ċ2 - count 2s 6: ^-...1 ^-...2 ^-...3 ^-...4 ^-...5 ^-...6
- ) v-...that goes here
- -> -> [2, 3, 4, 4, 4, 4, 3, 2, 3, 4, 6, 6, 6, 6, 4, 3, 4, 6, 8, 8, 8, 8, 6, 4, 4, 6, 8, 8, 8, 8, 6, 4, 4, 6, 8, 8, 8, 8, 6, 4, 4, 6, 8, 8, 8, 8, 6, 4, 3, 4, 6, 6, 6, 6, 4, 3, 2, 3, 4, 4, 4, 4, 3, 2]
Previous 22 byter
2RżN$Œp;U$+,ḟ€³R¤Ẉ¬Sðþ
A full program (due to ³
).
Try it online! (footer calls the program's only Link and then formats the result as a grid)
Finds all moves and counts those which land on the board probably definitely beatable by calculating (maybe beatable by changing the "land on the board" logic).