A chess master wrote down openings and end games
As-Suli, a champion at the court of Baghdad before A.D. 946, wrote a Book of Chess with ten standard openings, common middle-game problems and a collection of end plays with comments. Bell calls him the first to try to discover the science of the game.
From Bell, 1960, p. 178. Bell, R. C. (1960). Board and table games from many civilizations. London: Oxford University Press. (The copy read is this first volume; the Dover one-volume revised edition of 1979, ISBN 978-0-486-23855-5, keeps its page numbers.)