Elongated hexapawn is a board game based on chess, devised by T. R. Dawson. It gained recognision when Martin Gardner used it for the first popular description of machine learning. Still, the game remained unsolved: perfect gameplay was not known. The paper Elongated hexapawn closes this gap, using many combinatorial transformations and the basis of game theory, Sprague-Grundy theorem. Apart from describing the best moves in every position and giving some possibility of using similar methods for solving other board games, there is also a potential application in improving the quality of machine learning. The artificial intelligence can play against the perfect player designed in this paper, effectively measuring the rate of its progress.