Play is an essential, fundamental form of learning.  This holds equally for humans and computers. The first algorithmic intelligence may have been Nimatron, a computer designed to play the game of Nim.  Game Theory arose out of mathematical analysis of equilibria in the context of partisan games, and the minimax algorithm has found wide application in computing.  Tic-Tac-Toe is still used today to teach basic AI design to Computer Science students, and non-trivial, combinatorial games such Chess and Go have been instrumental in providing benchmarks for validating AI strength. It’s no wonder Turing called his test the “imitation game“.