Did a Mazda MX-5 just overtake your lightning-fast Polyphony F1 car? Does the enemy have a literal army before you even get a Tesla coil up? Is the AI looking through walls at you? Is a chess game making OUTRIGHT ILLEGAL MOVES? Congratulations you are up against a cheating AI.
The trope name for this is The Computer Is A Cheating Bastard, and the length of the page on TVTropes is fairly long. There are limits to what an AI can do, such as having to adapt to a random environment, or a dynamic environment, or getting caught up in a loop where they have no means to escape. There are games with excellent AI such as Final Fantasy Tactics, but other than unique classes on the side of the enemy, they play (mostly) by the same rules as you.
I feel however that a cheating AI is simply poor game design. I can understand some minor things like having them see through fog of war since it would be a pain in the backside for the AI to have to track and predict your moves, but some things however are outright cheating.
Notable examples of a cheating AI are quite obvious. The most obvious ones can be seen in strategy games, where the AI completely disregards resource limits (extremely obvious in Red Alert: Retaliation), can command an entire army as though an entire team of players were handling one side, and laugh at build rules (Tiberian Sun does this). The player does have many advantages as a human (such as building walls and metagame knowledge) however.
That is poor game design, but foul game design is the ultimate cheatery, a rubberband AI. Named for rubberbands that resist harder the more you pull them. Adapting quickly to your skill level is how it would work in an ideal world (I believe Lego Star Wars does this), but sometimes they just pull craziness out of their backsides.
It’s most obvious in racing games when a car speeds past you when such a speed is mechanically impossible for that kind of car. Take your eyes off the AI for one second they’re right along your bumper, robbing you of any advantage you have in a skill-based game.
Some games are a bit more generous and will ease up with a dynamic difficulty that fluctuates so that you’re always challenged, but not to where it’s downright unfair. Whether this is good game design or hand-holding however is debatable.
The reason this is bad game design is because if you’re playing a game where you’re up against the same rules as the other side, then a good game would have you be evenly matched or at a slight disadvantage.
There have been some games where the cheating AI breaking the rules makes sense in-universe. Final Fantasy Tactics Advance for example has certain people be exempt from the law, but once you get Cid in your party, you can turn the tables and give yourself a degree of exemption to the laws of Ivalice.
A cheating AI can also be justified because someone with even a inkling of metagame knowledge would be able to dominate the game effortlessly. An example, Final Fantasy X, though an easy game, has a handful of monsters who can only attack via magic, like Flans. If a Flan was too powerful to kill, what would you do? Osmose his MP down to zero. Unfortunately, because the AI in FFX is a cheating bastard, there is a limit to how much MP you can suck out of them but they actually don’t need MP to cast. This was thankfully corrected in FFX-2 but honestly not effective.
Do not get me started on Final Fantasy 8’s card game when the hands are concealed. I’m sure that’s being a royal cheater as well with pulling out the perfect card like they were in an episode of Yu-Gi-Oh.
It is possible to develop a good AI, but to make a cheating one? You’re just a hack.