Typically they train the AI against itself. That gives it a continuous skill gradient. Otherwise it would lose all of the games without learning anything. Since there are no successes to learn from. Or it would win all the games after it figures out how to exploit the built-in bot. With strategies that probably won't apply to humans.