As I understand it, the first true algorithmic intelligences were designed to engage humans in combinatorial playgames.
There is a patent for Nimatron filed by Westinghouse Electric in 1940, which was ultimately granted. (Edward Condon is one of the inventors.) It was also reportedly displayed at the 1940 World's Fair, and there is a French Wikipedia article about it.
However, this timeline of Artificial Intelligence lists 1951 as the first working AI, again, notably, in reference to combinatorial playgames, in this case of the partisan variety.
There isn't a great deal of information about this on the web, so I wanted to put it before this Stack to get some clarity.
Also throwing uncertainty into the mix, the period between 1870 and 1910 is referred to as the "The Golden Age of Automata" and I wonder if it's possible that a mechanical game AI might have existed, in the spirit of Babbage.