“But, do you think that, by calculating all moves, an AI could, theoretically, play a perfect game?”
At that point, you’re talking about something humans can’t do, so it really is a problem for computers and theory.
I think that at the point where you have that powerful a computer opponent at work, you’re reaching odd limits of the game that I am not familiar with, and if you want the actual answer, you might do well to read the people who programmed or studied that level of AI, e.g. see the link in @ragingloli’s last answer to this related question .
My expectation however is that:
* considering every possible move and counter-move to any length is actually still too large a problem space, and also not necessary, partly because many paths can be rejected and rules out.
* there are ways of rating a board position that also mean you don’t need to analyze many paths beyond a certain point
* to try to play “a perfect game”, you need to consider playing against a similarly-capable programmed opponent
* to maximize the chances against a similarly-capable programmed opponent, you may need to learn and adapt to that opponent
* the attempt to make the best AI possible might devolve into some situation where different AI styles perform better against other AI styles, and/or devolve into a kind of stalemate. I don’t know – someone would need to try, and it might take many generations to prove someone was objectively better than all others, if that’s even possible.