In early Pokémon games, some rival trainers will repeatedly use attacks like Sand Attack and Harden long after they become useless. At least wild Pokémon have the excuse that they're using an A.I. Roulette.
Ground-type Pokémon use Mud Sport. Thank you for reducing the effectiveness of a type you're already immune to. Granted, moves like Mud Sport become more useful in a Double Battle, but this often occurs in a regular, single battle.
In Red, Blue, and Yellow, the Zeroth Law of the AI is to always use super effective attacks, no matter what... without taking into account whether the "super effective" move actually does damage. This is also where The Computer Is a Cheating Bastard actually plays against it in Red, Blue, and Yellow, the AI's moves had infinite PP meaning that they could use them as many times as they wanted. If they had a usage limit, they would actually have to stop this stupid strategy at some point simply because they couldn't carry on. Some examples of this law in action:
This is most noticeable if you send out Venusaur (or really, any Grass/Poison Pokémon) against Erika or the trainers in her Gym. They will proceed to spam PoisonPowder (because Poison is super effective against Grass), but since Venusaur is part Poison itself, it cannot ever be poisoned, and you can proceed to curbstomp the entire Gym this way.
It is possible to beat Lance's final Dragonite this way using a level 3 Weedle, because the Dragonite will only ever use the Psychic-type status move Agility (presumably because it latches onto the fact that Psychic is super effective against Poison). Agility, for the record, only increases the user's Speed and does not deal damage. This was also shown in Twitch Plays Pokémon, earning the team Venomoth the title of Dragonslayer.
If another Pokémon uses a stat-raising move, and you prevent it from actually raising them, it will simply repeat the stat-raising move. It's particularly effective if your Pokémon knows Snatch, which steals the stat increase.
Some opponents will use Snatch no matter if your Pokémon have stat-raising moves or not.
Magikarp are useless even with Tackle, which they learn at level 15, due to having a whopping 10 base Attack stat. However, Level 16 Magikarp in-game continue to choose Splash. A minor bit of damage is surely better than a move that does absolutely nothing? Even worse, in-game Gyarados, which is capable of dealing serious damage, may choose to Splash too. However, with the addition of Z-Moves in gen 7, some trainers in the Battle Tree will use Z-Splash, which finally gets a function by raising the Pokémons attack stat by three ticks.
Another Gen I quirk was the AI using Dream Eater, a move that only works when the opponent is asleep, when your Pokémon was clearly wide awake. This would result in the Elite Four's Agatha potentially wasting several turns with essentially a glorified Splash.
Some Pokémon have moves that allow them to escape from battles in the wild, such as Teleport. Naturally, these moves are completely useless during trainer battles. The AI will use them anyway. Whirlwind and Roar were very similar to Teleport in the early games, but they were eventually given another effect... which also easily results in this trope. Averted when Teleport was given a useful effect in trainer battles in Let's Go Pikachu and Eevee and Sword and Shield.
From the second generation onwards, Whirlwind and Roar have an alternate effect when used in trainer battles. Within a trainer battle these moves force you to switch to another Pokémon at random. However, they sometimes keep on using it, leading to you, say, having your level 100 swapped out for a level 5 Magikarp, only for that to then get swapped for your level 100, which is then promptly able to finish the job it started earlier.
Similarly, every Plusle and Minun seems obsessed with using Helping Hand, even if they're not in a Double Battle (so the move has no effect whatsoever). Sometimes, in double battles, they will both use Helping Hand.
Marley in the Sinnoh games is somewhat infamous for preferring Helping Hand over any other move when partnered with you. While Helping Hand isn't useless per se, especially on Stone Wall supportive types, her signature 'mon is Arcanine, which is generally much better off putting its attacking stats to use.
Some NPCs who think that using Explosion or Selfdestruct with their last Pokémon is a great idea. Granted, if you are also down to one, the AI will faint but win (before Gen V), but otherwise...
It's not unheard of for Pokemon, whether wild or trained, to spam self-damaging moves such as Take Down until they knock themselves out, with little to no help from you.
Trainers in Pokémon Black and White are utterly bewildered by Zorua and Zoroark's ability, Illusion, which makes them appear as the last Pokémon in your party. If the Pokémon they appear to be is weak against Psychic attacks, the opponent will keep using them despite them being nullified by Zorua/Zoroark's Dark type. Combine this with the fact that Illusion is only broken when the Pokémon affected by it is hit and being struck by an attack with no effect doesnt count and you can potentially destroy an entire team without your Pokémon's cover getting blown at all.
In Pokémon Black 2 and White 2's Mix Tournament, which involves your opponent and you trading one Pokemon to each other for the battle, the AI will sometimes make staggeringly idiotic decisions, such as the Gym Leaders that are competing taking the one Pokémon on your team weak against their main type in trade for a Pokémon that can one-shot it.
Enemy trainers will continually spam stat lowering moves... on a Pokémon with Contrary. In other words, dont be surprised if an enemy gives you endless Speed boosts with Cotton Spore.
Starting with Pokémon X and Y, every time you battle a trainer who has a Pokémon with a Mega Evolution, the trainer saves that Pokémon for last, even if your Mega Evolved Pokémon is kicking the crud out of the rest of his team.
Also, the A.I. doesn't seem to grasp the concept of abilities that grant immunities to certain types other than Levitate. This can lead to, for example, using Thunder Wave (an Electric-type move that causes paralysis) against a Pokémon with Lightning Rod (cancels out Electric-type moves and makes them raise your Special Attack stat). Repeatedly. This even applies to Cynthia, a powerful Bonus Boss. It becomes specifically remarkable with regards to Primal Reversion Groudon. It has double weakness to water, but its ability, Desolate Land, summons Harsh Sunlight that evaporates all water-based attacks. Naturally AI will ignore the Desolate Land part and will keep spamming water attacks with zero effect.
The AI tends to get confused by how the Cloud Nine ability interacts with weather. Cloud Nine cancels all effects of any current weather... while still leaving the weather in play. The AI reacts as if it removes the weather outright, causing them to waste turns spamming Sunny Day or Rain Dance, not realizing those weather effects are still active.
When teaming with Hau, he'll start off with an Electric/Psychic Alolan Raichu. Hau unfortunately seems to have a poor grasp on the concept of type advantages, as despite the enemies in the area using plenty of Water and Poison types, he'll frequently pass up on hitting for super-effective damage and instead choose to use less effective moves or target the wrong Pokémon. For instance, one of the teams you and he face will use a Pelipper. Despite the fact that Raichu's Electric STAB will almost certainly take Pelipper down in one hit, he will frequently hit it with its Psychic moves instead.
If you pick Rowlet, he'll have a Primarina in a Double Battle at one stage. Primarina's signature move deals damage, but also cures burns. The "cures burns" part will sometimes cause Hau's AI to use that move on your Pokémon. Even if your Pokémon is weak to that move's type. He's been known to OHKO his own allies.
Sometimes, when an Alolan Diglett calls another in an SOS Battle, one of them will take the other out with Earthquake. Bonus stupidity points if your Pokémon is a Flying-type or has Levitate as its Ability.
In Pokémon Trading Card Game for the Game Boy, the AI, even at its highest level, doesn't understand a stall deck. It will only retreat to dispel status effects or to save important Pokémon with Pokémon Powers.
Murray, the Psychic-type Club Master of the game, has a deck that has the trappings of a stall deck, with one major flaw. His deck contains mostly Chansey, a card with a ridiculous amount of hit points and a move that allows it to negate any damage done to it, and Alakazam, a card with the ability to transfer damage points from one card to another, meaning that even if you manage to damage Chansey, the damage would probably just vanish. Sounds good, except that the major flaw is the deck also contains the Professor Oak card, a card that will make the user discard their hand and then draw seven cards from their deck. This results in Murray often losing by stalling himself out. Murray's deck also includes Kangaskhan, whose lowest energy attack isn't so much an 'attack' as an ability that lets the user draw an extra card. Murray often plays it early in the match, then uses it to draw an extra card every turn until you KO it for him, going through his deck at twice the speed you do.
In the Pokémon Mystery Dungeon series, Gummis increase your Pokémons IQ, which allows you to enable skills that reduce their Artificial Stupidity. For example, Trap Avoider prevents them from stepping onto already-revealed traps. Granted, you might need to step on a trap, but you can turn off the IQ skill in that case. In addition, you can also disallow the use of certain moves, such as Harden (which they'd otherwise do every single step, and then continue trying to do it once they run out of PP).
Of particular note is the IQ skill "Gap Prober", which allows your friend to fire projectiles through friendly units. In order for it to work, though, it must turn off the "Course Checker" IQ skill, which checks for obstacles in the way of attacks, since allies are considered obstacles. However, since walls are also obstacles, you can expect your ally to attempt to attack through walls at nearby enemies until their PP runs out.
The "Zeroth Law" of movement for Pokémon in these games is "Follow another Pokémon or wander aimlessly". An ally will follow the hero, other allies, or go after enemies at different priorities depending on what tactics they have set. However, if no other Pokémon are visible, they will head toward a room's exit and wander down halls. This creates the unfortunate effect that, if an ally is a few steps behind you as you exit a room, it could lose sight of you, abruptly turn around, and wander in the other direction. Many horror stories can be told of when this happens to level 5 escort clients.
Gates To Infinity thankfully alleviated most of the artificial stupidity from the get-go by making the majority of the "common sense" IQ skills a basic part of the AI, and also made them smart enough to avoid trying to apply status ailments to targets that are already afflicted by one. Unfortunately, there now isn't any way to get your Pokémon to consistently use super-effective attacks or avoid ineffective ones.
Trainers with Protect or Detect will spam the move until the cows come home. These moves can be useful for avoiding a move that takes multiple turns to execute (Fly, Solarbeam, Hyper Beam, etc.) but endlessly using the move the majority of the time just delays the battle and wastes your PP (plus it has a chance of failure if used consecutively) Especially noticeable in Gen V, where Tranquill and Unfezant trainers absolutely love to use it. Similarly, some trainers love to spam Endure, regardless if there's any rhyme or reason to do so.
If a Trainer Pokémon knows Focus Punch, they will prioritize it over other moves due to its high base power of 150. What the AI ignores, however, is that it has a debilitating side effect of doing nothing if the user is dealt damage before the end of the turn, which, of course you're going to do that. This makes trainers like rematch Brawly in Emerald anti-climactic, since his Pokémon will attempt to get off a Focus Punch no matter how many times you keep attacking them. In later generations, Turtonator's Shell Trap behaves like an inverted Focus Punch in that it requires it to take a physical attack to go off, yet the AI spams it in a similar way even if the player keeps hitting it with non-physical attacks.
When you're fighting alongside an AI trainer:
They tend to get a little gung-ho when it comes to Earthquake. They're smart enough to not use it if your Pokémon is weak to it. However, if your Pokémon is immune to it, they'll prioritize using Earthquake over any other move. Even if they've got a STAB move stronger than Earthquake, they're still going to spam it all day. Sometimes they'll use it even if you aren't immune to it and it's strong against the opponent(s), even if their STAB could do neutral but greater damage.
Explosion users are far worse. They'll always use it if they get a chance, even if you aren't immune to it. Of course, they'll prioritize it over nearly every other move. The only time you'll see them using something other than Explosion is if it's super-effective against the opponent. Maddeningly, the AI will choose Explosion even if they're the only friendly Pokémon left, an action which will cause you to lose. At least it's banned in Stadium and counts as a loss.
There's an old lady in Agate Village in Pokémon XD who will Baton Pass from Ninjask to Shedinja even if Ninjask is confused. Cue Shedinja fainting itself in confusion on its first turn.
Gonzap loves to spam Earthquake with Pinsir, Crawdaunt, and Hariyama, seemingly oblivious to the fact that he's knocking out whoever is his second Pokémon at the time in two turns or so each. And if you evolve Vibrava into Flygon and use it against him, he doesn't seem to realize that it has Levitate and is immune to Ground moves.
Dakim zigzags this as he also loves spamming Earthquake, but most of his Pokémon also know Protect to avoid taking the hit (when he actually remembers to use it). The one member of his team that doesn't know Protect is his Entei. This is also a case of Spiteful A.I. as Entei is a Shadow Pokémon that you are attempting to Snag, so Dakim will gladly order his other Pokémon to use Earthquake and KO Entei just to prevent you from Snagging it.
The AI, especially early in the game, is prone to often using Fighting or Normal type moves on Misdreavus, who as a Ghost type is completely immune to them. Often, they will use the same move repeatedly, despite it having no effect. For example, this video by Chuggaaconroy shows Misdreavus being hit by attacks that do no damage 12 times in 20 minutes of fighting.
While post-game Battle Frontier/Tower/Maison/etc. trainers have a reputation for being a great deal smarter than their story-mode counterparts, even they are not immune to bouts of stupidity. This is especially the case with stall teams, where a simple Taunt can decimate an opponent because they'd rather use Struggle and kill themselves through recoil than simply switch out.
In Pokémon Sun and Moon, trainers show a remarkable disregard of the target Pokémons ability or forme if that makes it immune to certain moves. It does not matter if it's the only ability that Pokémon can have, or if the ability had been revealed before, they will keep using the move the target is already proven to be immune to. Even in the Battle Tree, you'll see instances of opposing Pokemon using Water-type moves on Pokémon with Water Absorb, or status moves on a Shield Forme Minior. They are even willing to use damaging Z-Moves on a Mimikyu whose Disguise was not broken, dealing no damage at all as a result.
The hostile AI in Pokémon Sword and Shield is spot-on about attacking your weaknesses with actual moves and some even use advanced strategies against you. The friendly AI in Max Raid Battles, on the other hand... Game Freak apparently wanted to make absolutely sure that the players were motivated to work together at all costs just to avoid ever having to deal with these computer-controlled idiots. When you get to 4* and 5* raids, calling in human players is a necessity because relying on the AI is a crapshoot at best and an exercise in masochism at worst. They are chosen completely at random by the game, so there is no way to even know which ones youd be stuck with until the battle begins. Meaning that you cant even reliably prepare to counter their idiocy. You cant even use them as meat shields because the battle ends once four Pokemon on your side are knocked out. They revive after knock out in a turn or two, but even that works against you since teammates will happily revive themselves just to get knocked out again repeatedly until you reach the cumulative limit of four and automatically lose.
They're not helpful with breaking the opponent's shields, because there's no way to know when they'll feel like using an actual attack. NPCs who often fail to use useful attacks:
Gentleman Martin's Solrock usually spams the stat-boosting Cosmic Power and/or Rock Polish. Stat-boosting moves are pretty much useless, as the Dynamaxed Pokémon can just decide to eliminate all stat changes on your side on the field... and even if it doesn't, the Pokémon will probably KO Solrock through Cosmic Power anyway.
Beauty Catherine's Togepi and Backpacker Amelia's Clefairy spam Life Dew (heals all allies by 25%), even when all allies have full HP.
Poké Kid Freya, while she has three attacking moves, somehow thinks the best course of action in a lot of the Raid Battles is to not use any of them and just spam nothing but Helping Hand. The power boost from it is hardly noticeable, and most of the time she'll use it when the Dynamaxed 'mon has their shield up, which artificially lengthens the fight (not great when there's a 10-turn limit).
Black Belt Oscar has a Hawlucha, which is a fast and strong (albeit frail) Pokémon with three attacking moves. Unfortunately, for reasons beyond comprehension, it will often forego using any of these moves to use its fourth move, Feather Dance, a move that harshly lowers the opponent's Attack stat. The problem is that Raid Pokémon in 3-star raids and higher, once they take enough damage, put up a barrier that nullifies moves that lower stats, with 5-star Raid Pokemon putting up barriers twice.
Schoolgirl Isabella brings a Magikarp. Fortunately, it only knows actual attacks, and its Hydro Pump is not bad, but still, it's Magikarp! The Pokémon that's infamous for being horribly weak! Really, it's hard to tell which is worse: the fact that Isabella brings a Magikarp, or the fact that she's somehow not the worst partner you can get because some of the others are just that stupid.
Alfie has a Wobbuffet and no clue how to use it. Wobbuffet's gimmick is that it can't deal damage directly, and instead relies on counterattacking with Counter (for physical attacks) or Mirror Coat (for special attacks). This already makes Wobbuffet a terrible choice for a Max Raid Battle, as it's hard to tell if the opposing Pokemon will even target it or not, and what moves they'll have. To make it worse, Alfie often spends the fights either spamming Safeguard (which is nigh-useless considering a lot of Raid 'mons never even use status effects) or Amnesia (a stat-boosting move, which is useless because (1) Wobbuffet already has high defenses, and (2) the Dynamaxed opponent can and will get rid of all stat boosts on your side of the field). He may also spam Counter against a 'mon who uses special attacks, or keep picking Amnesia (which boosts its Special Defense) and Mirror Coat against a physical attacker.
Amelia's Clefairy spams Follow Me. While a useful move that can keep the other NPC allies from (initially) taking damage, Clefairy itself will be most likely to fall first, and it isn't exactly a bulky Pokémon. This is even more annoying if you get both Amelia and Alfie if she uses Follow Me, she'll force the opponent to target her Clefairy even if Alfie's Wobbuffet is targeted and he picks the correct counterattack. At the very least she gives her Clefairy a Focus Sash to hold.
The AI trainers may bring Pokémon that are terrible against the enemy Pokémon, such as a Torkal with the Drought ability (which summons harsh sunlight that increases the power of Fire-type attacks) to a battle with a Fire-type enemy. They're also prone to sending Pokémon with a type disadvantage against the enemy Pokémon.
Wandering NPCs have the extremely annoying habit of literally walking right into the middle of your battles, where you can turn them hostile and receive a bounty if you hit them by accident, even though it was their fault for getting in your way to begin with.
Some NPCs will refuse to speak with you if you have a high enough bounty, even when you're trying to rescue them from captivity and the bounty was accumulated from fighting the men that locked them up to begin with just because you didn't let them attack you first.
If you have an NPC mage or archer as a follower, expect to be hit with plenty of Friendly Fire if you run ahead to engage enemies in melee combat. Also, if your mage follower uses a spell with a damaging area of effect and it contacts any neutral NPCs who happen to be nearby, they'll turn hostile and you'll get a bounty as if you had attacked them.
The AI for followers is absolutely horrendous. They can end up either getting stuck behind a tree, running in circles, or rushing off in the complete opposite direction of where you're trying to lead them, forcing you have to go and look for them all over again. This can make the various Escort Missions in the game all the more tedious and frustrating.
If you jump or use levitation magic to reach an area NPCs cannot get to and attack them with ranged attacks, they won't run away or pick up the bow from that archer you just killed. No, the only rational option is to get as close as possible and run back and forth a bit while taking fireball after fireball in the face. (Word of God cites this specifically as one of the reasons why levitation magic was removed from the series after Morrowind. Yes, it was easier for them to remove levitation magic than it was for them to program the A.I. to be able to deal with it.)
In areas with the right shape, you can trick guards into killing themselves by trying to chase you over a jump they can't wrap their heads around, taking fall damage, and then running back up to do it again.
AI failure can go from annoying to downright disturbing. Annoying when your AI allies keep dying by falling off things and disturbing when an entire army killed each other (While screaming Murder!, Murder!) because they'd hit each other in combat three times. It gets even worse when you bring them back to life and they do it again...
Allied NPCs can often be notoriously suicidal. Several quests require you to take NPCs through the hazard-filled planes of Oblivion, and it's rare you'll manage to escape back through the Gate with everyone you brought in. Allies (and enemies) will fling themselves off of cliffs into lava or off balconies seventy feet in the air in an attempt to get at an enemy they've spotted on the other side of the chasm. Even at minimal health, NPCs will happily fling themselves into combat, occasionally moving in front of the player character and stopping them from helping them out, only to be cut down within seconds. Escort quests (of which there are thankfully few) are immensely frustrating.
This can be done for hilarity as well. Feel like entering the Mages Guild Well (when you unlock it via progression on the Mages Guild questline) with some quest-related NP Cs following you into it? You can simply equip an item that has the "Breate in Water" effect or an alteration spell that allows one to breathe in water, and reapply it every now and then to keep it from expiring. You can watch your following NP Cs get KO'ed/killed, and it'll be completely indirectly, as hilariously shown here.
A prominent specific example is Viranus Donton, who you joins you on a quest for the Fighters Guild where you need to go into a cave full of ogres, trolls, and a minotaur. Luckily, he's "essential", so the ogres, trolls, and minotaur in the cave can only knock him out temporarily (which you'll almost certainly learn early in the cave when he runs into 3 trolls at the same time).
Some immersion-failure AI bugs include animals grazing on stone, people trying to plow rocks, extreme rubber-necking, and others.
While levitation magic was removed following Morrowind, it is still possible to get to an area which an enemy without ranged attacks can't reach. Using ranged attacks against them still leads to them getting as close as possible and running back and forth a bit while taking fireball after fireball in the face...
Oblivion at least seems to a direct relationship between player stealth skill level and NPC stupidity, NPC's will get filled full of arrows while making comments like 'it must have been the wind', just leveling a skill approaches Game-Breaker territory, and that's before you start using 100% chameleon...
Curiously, in some cases the trope is inverted: Some enemies are too smart to be realistic. For example, in Oblivion you can be standing on top of a wall or a bridge, and eg. fire an arrow towards a rat below you, making it attack you. Now the rat will find a path to your location even if it's a mile-long path going through a complex dungeon, most of it not even directly visible from its current position. Seemingly rats in Oblivion have perfectly memorized the entire dungeon floormap and are able to immediately find the shortest route to your location, no matter how long and contrived it might be.
Though greatly improved from previous games, NPC AI still has its issues. Friendly NPCs still like to charge into melee combat against superior opponents, occasionally getting in the way of your own attacks. It's terribly disheartening to accidentally murder your own party member while aiming for a bandit.
You can rob anybody blind if you first put a bucket on their heads because they can't see you stealing. This is especially effective on shopkeepers since they often don't move behind the counter. After putting a bucket on their head, one can usually loot every item in the store without them noticing. You can even murder other people in the store without them detecting it. (The developers actually noticed this before the release, but left it because they thought it was funny, and if you don't want to make use of this exploit then you can choose to not use it.)
An example of Artificial Stupidity in Skyrim (though not limited to it) is using stealth and archery - if there are two enemies, kill one, run away, then come back. The second will have abandoned his search and continuing as though nothing has happened, usually with a comment along the lines of "I'm sure I heard something".
The game actually has complex relationship webs between NPCs indicating who is a friend or family member of who. This does not mean they will behave differently after a dragon attack wipes out everyone in town but themselves, of course. And during said dragon attack you can witness people just sitting on their porch knitting. But Shor have mercy on your soul if you accidentally hit a chicken in your attempt to kill said dragon because the whole town will stop fighting the dragon and murder you.
Using deadly force and missing does not count as a crime. You can take your time missing 20 arrows and the guard in front of you will only take action after your 21st arrow hits someone. In fact, due to a programming oversight, "Flaming Familiar" explosions are treated as pretty much a random act of God instead of a crime: you can blow up the market square and people will cower and lament their fallen family members but will ignore the fact that you summoned that familiar in plain sight.
A hilarious instance during the Dark Brotherhood questline: You have the option to seek revenge on an Imperial officer who tried to have you killed, and when you face him alive and threaten to kill him, he'll turn hostile (which means you can kill him with impunity). After he's killed, a guard walking by (who probably saw the whole fight and possibly even helped you with it) can remark, (paraphrased) "Who did this atrocity? I will not rest until I've brought them to justice!" and then he sits down to eat some bread. (Though this can happen pretty much any time, including having a guard kill a bandit, then crouch over the bandit saying the "Who did this" line from above.)
For some reason, guards and townspeople will intervene should you start hacking down innocents, but should a series of Hired Thugs show up and start slicing you (and your companions) up, they won't lift a finger. Worse, they may interpret your self-defense as you attacking them, and intervene to help the heavily-armored thugs.
Good Talos above, Barbas. Due to buggy coding listing him as both a follower and a pet, he likes to try to walk into you a lot of the time, which pushes the player around if he's stopped. Normally, this is just a minor nuisance. But unfortunately, he seems to have a nasty habit of pushing players off of cliffs if the player stops with Barbas behind him.
Final Fantasy Tactics Advance and A2 feature some examples of this. Yes, in A2 the people you're escorting almost never just rush into combat (except when you're escorting overconfident pricks, which makes sense), which is nice... but enemies and friendly combatants alike make some of the stupidest decisions. Examples? Physically attacking a unit with Strike Back (which allows it to parry and counter any normal attack), or trying to cause a status effect to a unit which is openly immune to it, or go after the little supporting character while your Dragoons are ripping the enemy a new one... are some of the most usual ones.
Status immunities aren't the only things that the AI disregards... like inflicting silence on non-magic users. Why. Why do you do something like this?
A2 also has some pretty desperate, yet dumb monsters. Chocobos, for example, will sometimes use Choco Cure or Choco Barrier on their allies if they are next to them, but are willing to use these skills even if you are in its range, thus you get the free buffs or heals. Some monsters like Antlions have attacks that are elemental based and can cause a debuff. They will use these abilities on their allies if they can absorb the element, but don't care if they are hit with the debuff.
The chocobo thing is sometimes used in the original FFT to farm EXP: two allied characters drive a regular chocobo into a corner, and attack it enough to lower its HP without ever killing it. The chocobo keeps using Choco Cure to heal itself, thus healing the allied characters from any damage it may have caused them, allowing this system to potentially go on forever, upping the EXP of the characters with every attack.
The absolute worst example is Argath, a guest character you get early on and must keep alive. Because you get him quite early in the game, he, like the rest of the party, would benefit from some level grinding. Problem is, if you have a strategy, you may as well toss it out the window and go make sure he stays alive because he rushes into danger head first, often leading to a quick game over.
A close second is one battle with a particularly suicidal guest character. If she is KO'd, you lose. Your opponents are a high level swordsman (who always gets first turn, with which he always takes half the guest's HP), and two assassin type characters who can both kill any character instantly with 100% accuracy. So, naturally, the guest character will often be found rushing right into the middle of them instead of running the hell away. Unless your characters are particularly speedy, you can, and probably will, lose the battle before you even get a turn.
One solution for stupid allies: willingly immobilize them so that they don't rush blindly towards the enemy and do something stupid.
Another example in Final Fantasy Tactics is when one of your party member gets KO'd, the rest of your allies would rush to revive and cure said member, only for that newly-revived ally to get KO'd by enemy again. They'll basically waste more turns and items on reviving the ally instead of dealing with the enemy, especially when the enemy can be easily defeated.
Of course, there are some 'positive' examples. A good example is the Loss Strategy used by people attempting solo challenges. You see, many of the later (and thus harder) bosses have the ability to confuse a single party member with 100% success rate, barring equipment that grants them immunity. Hitting that character will break the confusion, so the computer is programmed to not to attack the character unless they can kill them quickly enough. As such, if you only have one character in a battle, letting them get confused will prevent the boss from attacking them, whereas your character will act randomly, which will result in your character slowly killing the boss, as hitting the boss is the only productive thing they can do.
In general, the AI in Tactics isn't very good at handling status. Even if the enemy has some form of "you die now" status like instant death and can apply it 100% of the time, it will rather hit enemies into critical than to use those, sometimes even willing to waste time charging to do so(this is the basis of the "naked strategy" for Riovanes rooftops battle). Also, they like to use physicals to kill enemies even if said physicals can't hit at 100%, even if they have spells that would assuredly do the job (and even when they can get the spell off before anyone can interrupt them). Many solo single class strategies against Lucavis involve lowering the player's HP low enough to physical 1HKO range, get a mantle (or shield), and sooner or later they will get in a run where the boss tries to physical repeatedly and whiff repeatedly as the player whittles the boss's HP down.
One could argue a point of logic in their favor, however, as the Lucavi require bloodshed in order to resurrect Altima/Ultima. While this point is clearly a case of trouble on the AI's programming, it inadvertently becomes a reference to this plot point as physically slashing or smashing an enemy to death with claws would produce the necessary blood while burning them to ashes with Flare or ripping out souls with Death would not. Hashmal in particular references needing more blood to resurrect Ultima. Accidental mix of Artificial Stupidity and Gameplay and Story Integration perhaps?
In Tactics Advance, AI-controlled archers will frequently waste their turns shooting at enemy units who have the Block Arrows ability. This isn't limited to enemy archers either. Ally archers, such as Ritz's Viera partner, Shara, will do the same thing.
The blitzball AI can be hilariously dumb. For example, they will flat-out ignore the one with the ball until he or she passes within a certain radius, and then follow them to the ends of the earth, allowing you to pull the entire team halfway across the field to leave the goal open. Occasionally, you also get daft role allocations, like the Ronso Fangs putting a guy with a Catching score of 6 in goal at a time when an underleveled striker is still rocking a Shooting score of 15-20, or tactical decisions, like having a guy with an appalling shooting score try to go for the goal from midcourt.
It gets worse. If you want one of your players to learn an ability, you need to get an opposing player to use it. Try deliberately losing the ball to a forward you want to learn a shot technique from and leaving him a clear path to the goal. He'll have the perfect opportunity to score, and use it to pass.
Final Fantasy XII allows the player to customize the AI, so this is a given if the player does so poorly. Beyond that, there are a few behaviors of note:
The AI does not consider the fact that spells take time to cast, meaning a spell aimed at enemies may fail because the enemy was killed first while a healing spell aimed at an ally may fail because the ally died before the spell could be cast, wasting the time spent casting the spell in both cases.
The AI will try to steal from an enemy they or another party member has already successfully stolen from, leading to a wasted action.
The AI can never tell whether or not an enemy is immune to a certain Technick, leading them to be wastefully casted on enemies immune to them.
Final Fantasy Crystal Chronicles: Ring of Fates and Echoes Of Time. No matter how many combos or special moves your AI followers unlock, they will never use any physical attack strategy more complicated than "stand near the enemy, stare at them for a few seconds, and swing their weapon precisely once". They'll stack the same element on your casting rings if their behavior allows them to, but don't expect any help casting the most powerful (and complicated) spells. Their only real use is as a temporary PC to cast Life on your ghost if you bite the big one. At least in Echoes they fixed the problem of your party members running or pushing each other off of ledges.
Final Fantasy V has a boss whose most damaging move is Quake. It realizes that it misses floating characters, and will spam another move that removes Float from all of your characters whenever it detects a floating character around. Unfortunately, it doesn't realize that the move can, in fact, be reflected, thus Mighty Guard/Float before battle + Reflect Ring = the boss spamming its float removal move, doing nothing to hurt you until it dies.
Final Fantasy: The 4 Heroes of Light automatically selects your targets. This means your Black Mage will probably use Fire on the monster that absorbs Fire, and a White Mage will prioritize a character with Poison (which wears off after battles) over one who's Petrified (which doesn't).
Final Fantasy VI hits your party members with this if they're sent into the Coliseum. In theory, each battle is a Duel Boss between a member of your party and a monster, with each of you betting an item. Trouble is, the AI assigned to your own party members is almost abysmally stupid, like it was practically on an A.I. Roulette. Characters would frequently cast spells like Antidote and Remedy despite not being under a bad status effect. Mog would try to Dance even though it would never work. Terra, if she was able, would morph into her Esper form, and then proceed to stand completely still until she died or the effect wore off. Sabin would use the Soul Spiral/Spiraler Blitz technique if he had it, which would instantly kill him and lose the match. And if you want all the best equipment, you can't ignore going to the Coliseum, since some of the things you can bet will net you things like the Infinity +1 Sword Illumina and the best accessory, the Marvel Shoes. The result is a lot of Save Scumming and even more headaches.
Kingdom Hearts: Birth by Sleep gives Bonus Boss Vanitas Remnant an incredibly hard pattern to learn, making him a brutal enemy to beat... Unless you take advantage of the completely pathetic running AI that breaks his scripting. If the player runs behind the largest boulder with the crack in the wall, not only will they be safe from virtually all of Vanitas Remnant's attacks, but their weapons can be thrown through the boulder and injure him. He just keeps running headfirst into the wall, never moving out of the way.
Kingdom Hearts: 358/2 Days has the Invisible, an Ogre-class monster found in the last Agrabah mission. These Heartless have an attack where they disappear, leaving their sword to chase you around the map for a while before reappearing. It's possible to lure the sword past a wall, then roll behind the wall, stand there and let the sword keep trying to fly through the wall towards you until the Invisible reappears and teleports the weapon back to him. It's possible to do this with any of the three or four similar monsters, but it's easiest with the Invisible (one is a fake boss and the other is in Twilight Town, while Invisible's room has one spot perfectly suited to trap the sword).
The partner AI in the first and second games is simply abysmal. They have a tendency to waste all of their magic and skills the moment a fight starts with anything. Donald is the worst in this department; he'll spend all of his MP in five seconds flat if he's allowed to use his attack spells. They also like to just stand there doing nothing for 2/3rds of any given fight. Their pattern is basically "attack, step back, wait two seconds, repeat", meaning they take a boatload of hits from enemies since they basically never guard, even if you tell them to. Elemental attackers just fire off random spells, often resulting in them casting spells that do no damage on enemies strong against whatever they randomly chose.
An enemy example of stupidity is present in Leon the first time you fight him in the original Kingdom Hearts. Attacking him head on is risky, due to how absurdly high his attack power is for that point in the game, as well how quick his melee attacks are. However, as long you're standing at a higher elevation than him, the only thing he'll do is jump over to you, leaving himself wide open to a combo.
The AI opponents in the Flick Rush minigame aren't very bright, and will frequently waste multiple cards trying to break through your guard when they could simply wait it out instead. They also don't deal with slow-moving projectiles or mine-type attacks very well, wasting cards by guarding too early (Or not at all in the case of the mines), and/or charging straight into the attack when it's of too high a value for them get through.
The enemy AI in general seems utterly unable to deal with the Balloon series of spells. The spells create large, floating spheres which act like hovering mines. And for some reason, every opponent in the game doesn't even react to their presence. This is especially bad with Balloonga, which makes the mines auto-track to an enemy if they get anywhere near them. It's quite amusing to see what's supposed to be a Climax Boss or a brutally-hard Bonus Boss get taken out by popping balloons.
Throughout the Tales Series, the ally AI is completely incapable of recognizing elemental strengths and weaknesses, and thus will use random artes with random elemental affinity with reckless abandon, without heed for the actual strengths and weaknesses of the enemy, no matter how many times it proves ineffective. While most games give the player the option to specifically deactivate said ineffective artes and directly order them to use the effective ones, that doesn't stop characters from crying out that their attacks aren't working over and over. This is most aggravating with games like Tales of Xillia and its sequel, in which the elemental strengths and weaknesses of the enemy are always known and available to the player, and thus there's no reason their AI wouldn't know what those are.
Estelle's AI in Tales of Vesperia is almost universally considered lackluster. Part of the reason for this is that, unlike most other healers in Tales games, Estelle has a lot of offensive artes that require her to be in melee range (in contrast to Tear, whose moves are universally long-range, or Cheria, who has very few melee-ranged artes). You can and probably should have her orders set to "magic only" or "heal", but she — like all characters — will still attack if out of mana. She does get a few moments of Artificial Brilliance when she brings enemies close together to make her allies' area-of-effect attacks more effective, but it's rare enough that it can't completely make up for the headaches she causes.
There's also the problem that Estelle refuses to use ailment curing spells like Recover and Dispel. Instead, she opts to spam First Aid on the afflicted party member.
If Estelle has the Item Thrower skill activated, she also has a tendency to use up all of your TP-restoring Gels on everybody else in the party when they still have a third of their TP or more remaining. While completely ignoring the fact that she herself doesn't even have enough to cast First Aid.
Once Estelle learns Nurse (an Arte that heals the entire party), she'll seemingly cast it whenever more than one party member is missing just a bit of HP, even in situations where one party member is missing a big chunk of HP, and one other is just slightly scratched, when it would be more efficient to just use First Aid (a cheaper Arte that heals a single party member) on the person who needs it most. This makes managing her TP troublesome unless you forbid her from using it (not the best idea, since it can be a lifesaver sometimes).
The AI has improved in Tales of Destiny 2, but the main healer, Reala, very often will run into battle instead of healing people (and will never heal herself with either spells or items), while the secondary healer with a much better offensive movepool, Harold, will very often only spam her two healing artes to compensate. Judas darting in and out of battle at least makes some sense... Until you realize he's doing it every time he performs a combo. He also has a tendency to do absolutely nothing if his health is too low. He could at least cast spells from a distance away like most other characters do.
In Tales of Legendia, the casters seem to run off of an A.I. Roulette and their spells seem to be picked by Random Number Generator. This leads to some annoying instances where Will or Norma will use a fire-aligned spell only to have it absorbed, remark "that didn't work"... and then use another fire-elemental spell. Or even worse, use the same spell a second time. Grune and Shirley at least have a nice excuse for spamming the same eres attacks because for awhile, Grune doesn't really have any and Shirley learns hers throughout the character quests.
Raine runs up to an enemy, as if to attack, and then runs away again without doing anything. Other times she just decides to cast a spell that takes a long time while standing right next to an opponent. Unfortunately, this is a common trait - Zelos, Kratos, and Colette do the same thing.
Spellcasters in Symphonia will often fail to retreat before attempting to cast a spell. If they're too close to the enemy, they'll get their spell interrupted, and immediately try to cast it again, getting interrupted every time until they get KO'ed or the enemy is defeated by another party member.
Exacerbating this problem is the fact that on many strategy settings, if the spellcasters run out of TP, they'll start running up to the enemy for melee attacks. By itself, this would be reasonable as a successful melee attack restores 1 TP per combo hit, but if they restore sufficient TP, the aforementioned problem kicks in and they start trying to cast a spell standing right next to the enemy.
Colette has the potential to be an Elite TweakGame-Breaker when player-controlled, yet her AI manages to turn her into a punching bag for the enemies. The biggest downfall is that it simply doesn't place her properly when she uses Pow Hammer - nor does it know how to properly chain her artes.
The fighters' pattern of running away after combos is equally incomprehensible and usually just results in the enemy getting a free shot at their backs. This is most likely a holdover from the earlier Tales games, where the simpler mechanics and stupider enemy AI made it so that running away after combos actually WAS effective strategy and indeed necessary to not get killed - enemies tended to fall out of stun just after you made your escape. The semi-auto function in Phantasia and Eternia make the running back and forth action automatic. (They also do this in Tales of Legendia, which is based off of Eternia's battle system.)
AI controlled characters will often use their super guard when an enemy casts a spell, even when it would be better to move out of the way. Worse, they use it as the spell is cast, so that if the spell has a long animation the effect will run out before the spell hits.
In Tales of Phantasia, Mint loves to use Pow Hammer and then Pow Pow Hammer. Honestly you can't blame her; if she's well protected enough she'll have thrown on Acid rain, buffed Cress and Suzu up, long ago so there's almost nothing to do until somebody gets hurt. Of course, this does tend to get annoying if she starts to cast Pow Pow Hammer when someone's running low on HP...and given that she does this on bosses, too, who are immune to the stun effect..
Mint's default AI is set to heal party members when their HP gets low. What this really means is that Mint will not cast healing spells until a party member's HP is low enough that they could be knocked out before she can finish casting the spell.
Many classic (or classic-style) RPGs don't have attacks redirect to other targets if other party members finish off the enemy first. This typically results in subsequent characters attacking thin air, wasting their turn (and possibly resources such as MP or items).
The Final Boss has a wide-range AoE attack which your party are hardly be able to dodge, thus result in large amount of healing items used in order to keep them alive. The deal is, the boss's attack is extremely predictable, and it's easier to just solo the boss and even come out unscratched.
Once Player Character Jack gets his own squad, you can issue commands to your AI partners, such as "attack that enemy," "heal that ally," etc. However, once they're done doing that, the AI will just stand still and do nothing. The "Go Nuts" and "Everyone Go Nuts" commands snap them out of this, but it's still a pain to have to issue a command just to get your allies moving again.
In Deus Ex, and a number of similar games, the AI is usually pretty good...but will ignore the dead or unconscious body of an ally unless he was killed within sight of it.
One of the designers of Deus Ex said the AI had to be reined in a bit because players were rounding corners and getting shot in the head by entrenched guards, which obviously put a damper on the fun.
Another fun fact: enemies on patrol always turn left. Which, in essence, means you're up against the cloned army of a Mirror Universe's Derek Zoolander.
People in this game do not take well to friendly fire. Normally, this is bad for you, because if you shoot a friend a few times they will turn on you and kill you. However, if you dodge between enemies, they will sometimes get overzealous and shoot each other. This can be hilariously exploited to drive everyone in UNATCO insane (2/3rds of the way down the page), or it can be used to get Nicolette to single-handedly kill a pair of MJ12 commandos.
The most viable way to avoid the enemies in System Shock 2 wasn't sneaking but ... jumping on the nearest table or otherwise elevated position, because the AI only checked the floor for targets. While this can be handwaved with performance reasons considering all the objects on the tables this can be quite immersion breaking in a Survival Horror game with Breakable Weapons and scarce ammo.
One of the AI's biggest flaws (at least in the first Disgaea) was that they will always go after the weakest character, instead of the most dangerous.
They also Shoot the Medic First whenever possible, which can be exploited. The easiest way to quickly level a new recruit up to par is by sending them through an old mission with a high-level Cleric leading the way (and drawing all attacks). Works best when you're leveling spellcasters though.
They're also too dumb to pay any heed to damage immunities granted by a character's abilities or elemental affinities, so a Holy Dragon can be an exceptionally good distraction, due to both being a healer, and being immune to all non-elemental special attacks (Which is well over half of the attacks in the game).
The item world dungeons avert this somewhat, enemy units will move as long as there is a navigable path to get in attacking range of the enemy (your units, a resident, or a chest). This does lead to the odd quirk where an archer with 4 square range will not move if you're standing 5 squares from where they can attack, only to start moving if you move within that 4 square range, rather than moving closer even when they can't reach in anticipation of attacking you.
In the first Disgaea, the computer often friendly fires on its own units when using spells, even when the option not to is available. And on other occasions it will cast healing spells on your own units as well.
Based on the way the camera centers sometimes, it seems that the AI sometimes uses the two-target pattern to buff/heal/attack a single unit standing right next to them.
Another quirk in the Disgaea games is that the enemy will go after neutral characters first. In the first game, this was only Item World innocents (making this a case of Spiteful A.I., as killing them accomplishes nothing but screwing you out of something useful), but in the 2nd this included Chests. If a chest was on an Invincibility panel, they'd spend all their time trying to kill the chest! This made it really easy to kill them.
Enemies also tend to ignore Geo Effects entirely. Story maps might allow for them, having characters stay on Invincibility panels for example, when normally they'd pursue you. But randomly generated levels like the Item World also have randomly generated Geo Effects, and these are ignored. Foes will stand on squares that damage their health each round or reduce their stats, attack your party members that are on invincibility panels, completely ignore beneficial spots that would buff them, or even repeatedly heal your units by trying to damage them while on "Reverse Damage" panels.
Enemy healers will often heal units with full health if they have nothing better to do, wasting their SP. They will also repeatedly buff units beyond their capacity to benefit from it (buffs do stack in Disgaea, but have an upper limit to their effects).
Deus Ex: Human Revolution has a similar bug to the Skyrim "basket-head" glitch: you can hack almost anything in an area with non-hostiles (like the Detroit Police Station) or even hostiles (like the Highland Park FEMA facility) if you simply surround yourself with boxes, crates, vending machines, etc. so no guards or cameras can see you.
In Summoner, this is almost essential to win in some random encounters. Simply lay down a wall of fire and observe as the AI monsters barbecue to death, staring serenely at the horizon...
There is also a Good Bad Bug which allows you to cast offensive spells on certain ally NPCs, who don't seem to notice or care that you're attacking them and, if there are no nearby enemies, may well stand around doing nothing while you kill them.
In Shining Force, there are many cases where an enemy will move to a certain spot, then never move from it. Such enemies can be easily defeated by simply hitting them with ranged attacks, even if they'd only have to move one square to trounce the attacking character(s). This was alleviated in the second game.
Most bosses in the original Shining Force never move. They also automatically heal every round. An easy way to level up ranged attackers in the first game is to plant them a square away from a boss and pelt them every round. They'll heal the damage done, and they won't take a single step to kill off said attackers. Probably the best boss to do this with is Balbazak, the final obstacle in Chapter 4.
The World Ends with You's auto-play is quite up-front that it's not meant to be a full AI, but just a kind of "training wheels" until you can wrap your head around playing two screens at once. Which means they didn't bother making your partners choose attack branches intelligently, or take any kind of defensive action. You can easily get better manual results just mashing left or right, because even if you do the same as the AI and only ever take the middle branch, it'll still be significantly faster.
Dragon Age: Origins has your allies do some stupid things at first, but similar to Final Fantasy XII, you can give them some rather specific orders to remedy this. Their starting tactics don't work very well, though, especially at higher levels. Namely, warriors and rogues won't naturally think of using a Deep Mushroom when they run out of Stamina because they don't have any tactics telling them to do this.
You can beat several ambushes with area effect magic by targeting enemies beyond doors, which can't be opened until after the cutscene triggered by attempting to open the door.
The defenders of Redcliffe will charge into the undead hordes, even if this requires going through a burning barricade.
Fallout will probably go down in history as the game where the main threat to your health was your party members... what with them repeatedly shooting you in the back with automatic weapons and trapping you in corners. The sequel tried to alleviate it by adding commands so you give them tactical instructions or shove them out of your way, but you should still never give your henchmen anything with a burst mode.
Also, the friend/foe recognition was just... odd. A stray shot hitting someone who was non-hostile would convince your followers they were viable targets. For example, the quest to guard Grisham's brahmin against wild dogs: Vic takes aim at one dog, and wings a brahmin by mistake. The rest of your party immediately ignore the dogs and attack the cattle instead. You lose a hundred bucks for each cow lost. Thanks a bunch, guys. Why do I keep you around?
The king of all this, though, is good ol' Dogmeat. The pooch may not have a weapon, but he's so eager to defend you that he'll leap into melee combat against super mutants wielding gatling lasers, who will then promptly convert him into a red stain. He's also got absolutely no sense of how to avoid traps, and will happily wander onto landmines or into forcefields. Your best shot at getting Dogmeat to survive the game is to lock him in a room and leave him there. This even leaked into canon, where he was mentioned in 2 to have died by walking into a forcefield.
More burst shot trouble: enemy at point blank range, no civilians in sight: single shot. Enemy at 10 meters, lots of civilian in here: burst shot.
Party members in Fallout 2 choose a target, and stick to it. When the target is unreachable, they stand in place, doing nothing, and getting shot until running away while there was another perfect target right next to them!
Fallout 3 still carries that torch — charging in ahead of your follower often gets you shot in the back ("Can I have a better weapon?" "What, the better to kill me with?") On the other hand, your more perceptive allies will bellow battle cries while you're moving in stealthily, sometimes when they're directly behind you so as to alert the target you're approaching, and sometimes while weaving directly across your line of fire.
The AI also carries over the Oblivion tradition of being unable to climb up rocks. Doesn't mean much if the opponent has a gun, but if they're melee, they'll just run up against the wall or try a non-existent way around to get to you.
A final offense is that the AI charges at you in a straight line, meaning that the player can lay down mines on the ground as they fall back and the enemy will cripple itself running over them.
Dogmeat in Fallout 3 is a loyal guard dog. So loyal he'll defend you in battles that will obviously kill him nearly instantly. Dauntless in courage, but rushing at a Deathclaw with no armor and only melee attacks isn't brave. It's totally stupid. The Broken Steel DLC so that Dogmeat scales to level 30, he's nigh-unkillable. Still dumb as a rock, but he doesn't die constantly. And on the off chance he does, a perk named "Puppies!" will mean a new Dogmeat is waiting for you.
It fixed many annoying things from Oblivion, but there are still some issues. After the game release, there were reports that Megaton citizens had been reportedly turning up dead. Was it unscripted murder? No, They fell off the walkways.
After leveling your stealth skill enough and obtaining the Chinese Stealth Armour from the Operation Anchorage, you have officially won the game. Equip the stealth armour and a melee weapon. Enemies will go into alert for all of two seconds after being hit before deciding that they must have imagined the knife wound, allowing you to hit them again. Rinse, repeat. Most egregiously, the above even works with the Ripper and the Auto Axe in full-auto. These weapons are, respectively, a mini-chainsword and a concrete saw.
Fallout: New Vegas improved the AI for party members...for the most part. You still frequently get treated to the sight of your melee-oriented companion dashing valiantly off cliffs and breaking their legs to chase down a Bloatfly, or rushing headlong off the road to attack a swarm of Cazadores or Deathclaws. At least most of them aren't likely to shoot you in the back. Their habit to run into enemies when you've equipped them with damn weapons is just frustratingly annoying. That power armour may as well be for naught by now.
Never, ever give a ranged specific companion like Boone a high DPS melee weapon. Nothing ruins your nicely planned trap for the boss like Boone running past you, stabbing one of the mobs and dying in bullets while he is the best sniper in the world!
In the same vein as the above enemies with a both a ranged weapon and higher dps melee weapon will often pick rushing you with the melee weapon no matter how far off and unreachable you are. Even at relatively short distances it stands to reason they would at least try to shoot you while they close the distance before pulling out a knife.
In the scripted Viper ambush in the canyon outside of Nipton one of the Vipers will usually spawn with a grenade rifle ... which they will promptly fire directly into the ground at their feet as soon as the fight starts because the AI doesn't know how to handle the combination of the arcing trajectory of the grenade rifle and elevated terrain. Since the player usually encounters this ambush rather early in the game the enemies are only leveled to level 5 or so and one grenade can kill a couple of them.
In the Camp Guardian caves, if you tell Private Halford that the way out of the caves is clear, he goes Leeroy Jenkins into the Lakelurks' lair instead of leaving through the nearest exit.
Though there is code that is supposed to prevent this, A.I.s will still often throw a grenade in front of them and run directly into the blast and kill themselves or severely injure themselves.
In Fallout Tactics: Brotherhood of Steel, Load Lifter robots do not seem to understand that they're too wide to fit through certain tight spaces. This results in them getting stuck, as they fruitlessly keep trying to move through the gap. The player can exploit this by positioning their squad on the other side of said gap and shooting the robot with impunity.
In Fallout 4, your trusty companion robot Codsworth will gladly burn enemies to death with his flamethrower. When they're dead, he will often immediately turn around to tell you how glad he is that the fight is over. Before the flamethrower is done throwing flames.
Secret of Mana suffers from this with your characters. One problem is, since it was meant to be a multiplayer game as well, is that the characters can only move so far before an imaginary wall blocks them. The AI has a tendency to run into the nearest dead end, forcing you to go back to "unhook" that character. Also, it's probably not a good idea to let them attack, even if you set their AI to aggressive.
The boss Mech Rider 3 is programmed to always attempt to cast Speed Up on himself if he doesn't have it active. Unfortunately, he's also programmed to cast Wall first, meaning he'll spend the entire fight bouncing his own Speed Up spells onto your party! Though given plot-related reasons, this has disturbing implications: it's possible he's doing this deliberately because he wants you to kill him.
In X-Men Legends, the AI is fairly competent. But they won't dodge, use any shields, and sometimes will just beat down the enemy (even if it's in their best interest to stand back and use their mutant powers). AI controlled teammates are also so prone to hurling themselves off cliffs to their deaths that the game acquired the Fan Nickname "X-Men Lemmings".
Some very specific mutant powers of some A.I. controlled party members won't trigger whenever you spam the "call for help" button, forcing you to make some party member switch back and forth.
Persona 3 had some issues with what your AI teammates would or wouldn't do. One particularly loathsome example is their reaction to barrier spells. If an enemy casts a barrier that blocks all physical attacks, your allies will refuse to attack it head on, forcing the player to do it themselves to get rid of it. However, an enemy near the end casts a special barrier that goes away over time instead and attacking it usually means dropping dead on the spot, but unlike before your party doesn't stop attacking. You almost have to physically restrain your party to avoid them killing themselves.
Have fun battling with Mitsuru if her tactic is Act Freely. She'll just spam her Useless Useful Spell over and over, even if the enemy is weak to Bufu.
Even when they know enemy weaknesses, the AI characters are completely oblivious to the nuances of strategy (most obviously that making enemies lose turns is a good thing, causing them to attack enemies who were already knocked down and causing them to stand up again). They may also choose to cast a mass effect spell to damage one enemy... but also heals another. Mastery of the combat system in Persona 3 was determined by how well you could use the strategy system to railroad their Artificial Stupidity into achieving the desired goals without screwing up too badly. Fortunately Persona 4 (and later Persona 3 Portable) gave you the option of controlling your entire party manually. The AI will opt to knock down enemies, but only if you give the order.
Though even the Tactics Menu is hardly perfect. If you tell a character to heal/support, they will not cure poison on a character if said character is at less than perfect health. They will not heal anyone else, either, even if the poisoned character is at 499/500 hp and another party member is at 1/500. This has less to do with the characters than the programming — the protagonist is the only one with antidotes and anti-charm items... except the player can't access anti-charm items while charmed. So if the protagonist gets charmed, you effectively lose control of your party. You just watch helplessly as your character begins attacking allies.
In Persona 5, the last request for Mementos seems like it's going to be pretty hard, being the only mission that's ranked "S" and located at the very bottom of the 66-floor dungeon. However, repeatedly casting Dekaja or using a way to lower the boss's Attack stat will have him waste his turn trying to buff it back up, turning the fight into a joke.
The allied AI is certainly better than previous entries, but it can sometimes still waste turns when it really shouldn't. Especially with how rare SP-restoring items are, a turn wasted charging or debuffing the enemy can really mess with a player's plans for a Palace. Even if an enemy would need just one more hit to take down, it'll sometimes waste their turn doing something that will cause an enemy to get a turn, causing all kinds of headaches. It's almost always more advantageous to command each party member yourself instead of letting the AI do it.
Even when you know one weakness of an enemy, the AI will occasionally test other elements against that enemy, even when you could easily wipe out the encounter with the known weakness. It also picks who tests elements at random, meaning you may have the party member who could one-shot the enemies opting instead to throw out a weak spell that may end up absorbed or reflected.
In Valkyria Chronicles the computer is unable to predict whether it will be able to fire on one of your units with a given one of its, it will therefore spend actions moving units backwards and forwards along the same path every turn to no effect. Similarly, they also have an unusual tendency to rush troops straight into certain death, possibly for want of any other move.
Most Roguelike games avoid using path-finding algorithms for the monster AI since doing so would make the game very slow, meaning that monsters will head for you in a straight line and then stop as soon as soon as they hit an obstacle. If the obstruction is not a wall but something like deep water or a chasm then you can use distance attacks to kill the monster while it just sits there.
Also in most Roguelikes a monster with a distance attack which will harm anything between it and the target (like lightning bolts) will use it even if the attack will harm or even kill allied monsters between it and its target.
In some of the variants where monsters can use magical items the monsters will prefer to use weak magical items over their more powerful innate magic, like demon lords in NetHack which choose a Wand of Striking over their much more powerful infernal magics.
In variants where monsters can flee from their opponent they never analyze their opponent's strength at the start of the fight and decide to flee if the opponent seems too strong, but rather wait until they're almost dead to flee.
Quest 64 has some of the worst AI ever seen, to the point that bosses become easier and enemies don't even use all of their available attacks. One boss in particular uses a close range attack that won't hit you if you're too close. All you need to do is stand on his feet and beat him to death with your staff.
Vagrant Story has the unique condition where its anti-casting technique, Silence, is canceled in the event that a spell of any kind hits you. Similarly, you can afflict most spellcasting enemies in the game with Paralyze, which prevents physical attacks. If you Silence yourself - or let them Silence you - and then Paralyze them, they will more or less stand there and let you kill them, as they're programmed to not under any circumstances break your Silence effect by hitting you with another spell. Similarly, many enemies will refuse to engage you until they've cast all possible enhancements on themselves, and by countering their enhancement spells they'll do nothing but try and cast them, over and over, while you get in free attack after free attack.
Mass Effect has a couple of examples of minor Artificial Stupidity. Garrus Vakarian had a strange habit of using Adrenaline Burst to re-set the cooldown on all his skills right at the beginning of battle, before he'd done anything. Squad members would try to stay near the player unless told to go elsewhere (even if they were Snipers and the player was a close-quarters fighter, or vice-versa), and sometimes, trying to tell them to go elsewhere resulted in them telling you they couldn't get there- because there was a corner (or a box, or similar) between them and there. They would also switch to weapons they were untrained (and therefore did much less damage) with after cutscenes (though Shepard did this also) and repeatedly fire into walls and other obstacles in an attempt to hit enemies that had ducked behind them.
The faults of both enemy and ally AI can be seen if you play as a sniper and, in true sniper fashion, take out all your enemies from several hundred feet away (for example, picking off enemies from the top of a mountain while on the ground on a random planet). Actually hitting an enemy from that distance will automatically put you into combat, which can lead to allies using shotguns (the effective range of which is about twenty feet) and enemies firing wildly in your direction, landing maybe one shot in fifty. The enemies, however, will never get any closer to allow you to ventilate their heads with all the time in the world aside from occasionally dodging easily seen rockets and the energy balls Geth Armatures fire (yes, it works on them just the same - though it does take a while) by moving to one side a bit.
Rocket troopers and geth colossi tend to focus fire on the Mako instead of the player and their squad so long as you stay close by, even if they have a perfect shot at the player. This can be exploited thoroughly to get max XP out of fights with armatures and colossi that ordinarily would be done in the Mako—cut down their health with the Mako's cannon, then get out, hide behind the Mako, and it's easy to take down otherwise near-impossible enemies. Because the Mako usually won't be destroyed unless you're inside, it can take nearly unlimited amounts of damage... just be sure to take out every enemy before getting back in!
Anyone complaining about Thresher Maws have probably never tried taking one out on foot with a sniper rifle. Approach the Thresher's spawn point in the Mako, disembark when it pops out of the ground, and stand a fair distance away. Snipe, sidestep the painfully slow acid spit, snipe, sidestep the painfully slow acid spit, snipe... See, the difficulty with the Threshers is that they can instantly gib you in the Mako; but will forego the burrow attack for the slow acid spit if you're on foot. Plus, you get less XP if you kill something with the Mako, so farming Threshers on foot is easier and more profitable.
Another thing. Armature-class geth have heavy machine guns as well as the incredibly slow directed energy weapon. They almost never use them except at extreme range. Get in close, and they continue to blaze away with the snail-gun, despite the incredible ease with which it is dodged.
Mass Effect 2 usually averts this with excellent AI. However, a fun way to kill enemies with rocket launchers (on lower difficulties, or if they are the only enemies left, is to simply walk right up to them. They fire their rocket launcher at point-blank range. The resulting backblast will kill them.
Squadmate stupidity does happen though, usually with bad cover choices (or none at all). Questionable power usage is a big irritation though, especially since all a character's powers share a cooldown, which is much longer than Shepard's. Jacob is by far the worst offender once his Barrier skill is automatically unlocked, he will usually spam the ability as much as possible if left to the AI, effectively removing his ability to use his offensive powers. Fortunately, there's an option to turn off AI power usage.
Most types of enemies immediately take cover at the start of a fight. However, the AI is not particularly picky about WHAT it uses for cover, leading to many enemies attempting to hide behind Explosive Crates.
The AI is especially stupid against a Shepard with Tactical Cloak. Use it, and the enemy will immediately turn its back and seem to forget you were ever there, and will not be able to see you until it wears off, even though there's clearly a flickering outline of a person walking around. By Mass Effect 3, however they've improved. Cloak now, and the enemies will continue to fire at the last spot they saw you at, and they will eventually notice the obviously cloaked person standing nearby if you get too close to them.
The Rannoch Reaper in Mass Effect 3 also suffers from this, for obvious balancing reasons. Its one threat was Shepard standing on an open cliff using a machine to help the quarian fleet target it. But instead of simply horizontally sweeping the cliff with its one hit kill beam, it slowly vertically sweeps the beam forward and up, giving Shepard ample time to scurry to the other side of the cliff and continue giving the quarians targeting data. Or, since the Reaper is only vulnerable when trying to shoot, why doesn't it just walk over to Shepard and smash the cliff they're on.
Because of Vandal Hearts 2's unique turn-based system - where moving each friendly unit is accompanied by the AI opponent moving one of theirs simultaneously - a considerable portion of the strategy involves outsmarting the predictable AI, such as moving a character to attack an empty region safe in the knowledge that the computer will move an enemy unit straight into it.
In the 5th and final chapter, all party members except The Hero are AI-controlled. The AI has multiple settings: the basic mode, an all-out offense mode, a defense-oriented mode, a no magic mode, etc. They all have one thing in common: the AI is deeply stupid. It's commonplace for the AI to have everybody gang up on a single enemy even if one of them alone can kill it that turn (naturally, it will almost always be the monster you choose for the Hero to attack), resulting in everyone else wasting their turn swinging at the now-empty spot in the enemy group's roster. Or cast spells against an enemy who has magical protection in place to bounce them back at you. Or cast that same spell on the party right before the healer casts her own healing spell (with exactly the results you might expect). There's also a "learning" AI mode which uses items in the inventory to figure out what their effects are...problem is that it will do this with single-use rare items just as readily as anything else in the AI-controlled characters' inventories. Worst of all, there's no option to turn off the AI control! At least, not in the original NES version. In the Playstation and Nintendo DS remakes, that flaw is rectified.
Your healers also had a tendency to constantly cast instant death spells on enemies rather than healing your party—even if the enemy was immune to instant death. This was doubly annoying also, because some of the dungeons are quite long, and recovering magic points is fairly difficult, so you'd end up having to switch your party to Use No MP mode just so you'd have enough magic to be able to have a few healing spells for the boss.
I've spent hours planning and synthesising my ultimate magic-using monster. It has high Wisdom, high MP (plus Magic Regenerator, so it recovers MP automatically), and some of the best magic spells learned, Kafrizzle, Kazapple, Kacrackle, etc. It should be perfect. It can inflict around 300-400 damage using its most powerful magic spells. So when I'm in a battle and I have its AI set to "Show No Mercy", what does it do? It uses Sacred Slash. Or Blast Slash. Or any of the other pointless slash attacks, causing around 50 damage per hit. Un-friggin-believable. None of the AI settings I set it to will cause it to do anything else besides that or a normal attack against a single opponent. Because of the stupid skill system, I can't get rid of those slash attacks since they're in the same family as the magic spells (um... why?). I'll be able to lose them once I learn Uber Mage, but that wouldn't be absolutely required if the crackheads who programmed this game realized that it would be best that "Show No Mercy" literally meant "Cause as much damage as possible, dumbass!" There are a lot of instances in the game where the awful AI wants to make me bash my head against a wall, but this takes the cake. It wouldn't be that much of a problem if it weren't for the Arena and Tournament battles forcing you to only use AI control, so you have no choice but to sit and watch as your usual team of asskickers completely degrade into pathetic, drunken idiots. Still, you would think that because AI control is mandatory they would have spent more than four minutes testing it to see whether or not it actually works correctly, but maybe that's too much to ask.
The later releases have improved ally AI if you choose to use it (which greatly speeds up Level Grinding), but there's still oddities. Carver in Dragon Quest VI has a particular fondness towards Flying Knee, an attack that does increased damage to flying enemies. But he won't always use it against flying enemies and he'll still use it against non-flying enemies (which means he won't score Critical Hits).
The enemy AI can be just as bad. You would be amazed at the number of times an enemy will waste its turn using a magic attack when it does not have enough MP for it.
Dragon Quest IX enforces this by making the AI's efficiency tied to their Wisdom (a stat that improves magic). At end levels the party AI is much more effective, using instadeath spells only against those enemies weak to it, avoid using overkill spells and techs to conserve MP, ganging up on the enemy with the least HP (something the player can't know), and most importantly, using the appropriate Fource spells (elemental weaknesses being something only vaguely hinted at in the Monster Compendium, and even then not for every enemy).
Your party members in Rogue Galaxy have no idea what they are doing. While they won't use MP-cost special abilities without your specific request (unless you have them set that way), and do have the brains to use charge attacks when needed to break enemy shields, the rest of their AI is locked onto Attack! Attack! Attack!. They have never heard of either blocking attacks or getting out of the way. The only setting on which they block is the one that prevents them from doing anything else.
Monster Hunter has the monsters set up like Mooks that will beat the crap out of each other because they're too close to one another to get at you, or you're on a ledge, or something similar. Sure, it's easily explained by the monsters in question being only up to the level of intelligence of wild animals, but it makes things easier for you if you use patience and proper positioning, plus it's just fun to watch.
The Felynes and Shakalaka allies try to be helpful to the player, but have an annoying tendency to run right up to and stand in front of the monster while attempting to perform a healing dance, which just gets them smacked around and the dance interrupted. The False Felyne mask in Tri/3U also tends to result in your AI ally tossing bombs at the downed, vulnerable monster.. which would be nice if they didn't also blast the player back, wasting the window of vulnerability.
Your fellow party members make it a point of ignoring your orders the very next combat encounter, apparently eager for that summoned Fire Elemental to slaughter them. Magic users will willingly render themselves unconscious by healing technological characters, upon whom their magic has not effect. They also like to stand in doorways, and otherwise cause more damage than the enemy. If any game makes a successful argument for full party control during combat, it is this one.
For fun, recruit Magnus and any other good-aligned people. Attempt to pickpocket a good-aligned person and fail. The person will turn hostile and attack you, and all your party members will run to your defense despite you not actually wanting to fight this person. Witness as Magnus tears into a bystander with his axe while loudly whining about how you're making him do it against his will.
Virgil is a particularly noteworthy offender: he'll charge into combat despite being weak and under-equipped, and he'll often use weapons he isn't proficient in.
The NPC scripts often have them pick up any remotely valuable item in the vicinity. Some of them can spot something lying on the floor almost a screen away - ranged fighters can see very far due to high perception stat. Once this happens, they slowly walk towards the item... and potentially out of a safe place and into a group of monsters that can kill them before the rest of the party can get close.
Characters also have a habit of equipping whatever they've picked up if they deem it more valuable than what they're currently wearing. Even if it's a hexed item that poisons them or reduces their stats. Of course, due to non-party NPCs using the same AI, certain hexed equipment gained popularity as an assassination tool...
Dario in Chrono Cross. A really challenging Bonus Boss...in a straight fight. He counters every single one of your elements with an element of his own. And therein lies the exploit. He counters most elements with stat debuffs, which would be a severe pain if the counter didn't also count as his turn. So just pelt him with a red, blue, or green element every turn and he'll lower your stats, but never actually attack you.
The Green Dragon, similarly. His challenge comes from his tendency to cast Carnivore, a powerful green-elemental spell. But he only casts Carnivore if the entire element field is green. So, if you cast a weak non-green spell every time the field becomes fully green, he'll spend most of the fight casting Green Field. Or, hell, bring a dozen Carnivore traps and go to town.
When playing a Unlimited Adventures design, it's a good idea to include a paladin in your party, because only then will you be able to control the NPCs that join your party during the game. Otherwise they'll be controlled by the computer with ridiculous stupidity at times, which is especially destructive with spellcasters. For example, casting area damage spells with blatant disregard for your party members' presence next to the target... or casting "Dispel Magic" at enemies (who don't have any magic buffs on them) for no reason whatsoever.
Version 1.1 of the game had a Game-Breaking Bug where the NPC magic-users would immediately flee the battlefield at the beginning of every combat.
Soul Nomad & the World Eaters/Soul Cradle had a great example of this while doing room inspections. It seems rare and only in higher levels, but some enemies will just outright kill their own ally without any specific reason by using a skill.
Another good example from the room inspections... two, in fact. Units with a flying leader, such as a Whirwin or Gryphos, will blindly walk over 'visible' minetraps, if that's the room hindrance. Oh, and does the Room Leader have the Anti-matter room? The enemy will target them. Even the game hates Anti-matter!
In Dark Cloud, the cannon enemies in the sunken ship will only fire at you from a certain distance away. If you get close to them, they back away. You can back them into a corner, and they'll keep running into the wall, never attacking, while you hack away at it until it dies. Thankfully, this was fixed in Dark Chronicle.
Knights of the Old Republic II: The Sith Lords suffers from a pretty faulty AI. One of the most egregious examples would be an infamous sidequest that involved leading a Too Dumb to Live survivor of a droid attack, out of an abandoned military base. He can't make two steps unless he's facing you directly within a certain distance for at least a few seconds, and there's nothing between you and him.
Enemies in the game have a pretty straightforward way of closing the distance to the player. Usually the most direct, straight-line way possible. A well-prepared player can, therefore, lay out an entire minefield between them and the boss, engage them in battle, and watch as even Jedi Masters charge straight through the explosives and end up getting killed without the player doing anything but standing there.
In the old (like, from the 1980s) SSI "Gold Box" Dungeons & Dragons games, the AI was terrible at aiming area effect spells, generally targetting spells directly at whatever they were trying to hit. For spells like fireballs, which hit the target square and everything around it, this was generally effective at hitting all the PCs but also tended to hit any of the spellcaster's allies who were fighting them (and sometimes the spellcaster itself). The stinking cloud spell, however, hit a 2-square-by-2-square area, with the square the spell was targetted at in the upper left corner. This meant that you always wanted to engage spellcasters from their left, so that if they cast stinking cloud on you, they'd invariably get themselves too (whereas if you engaged from their right, they wouldn't). Black Dragons were especially susceptible to this, as casting stinking cloud was always the first thing they did after using their breath weapon. In the edition of D&D used in the games, failing a saving throw (this was back when you made saving throws when hit by a spell) against stinking cloud meant you were helpless due to choking, and could be killed with a single blow from anything. Many Black Dragons died in vain.
The AI Stupidity in the SSI D&D games was usually a boon to players, but in Curse of the Azure Bonds the mage NPC Akabar Bel-Akash (a character from the book the game is based on) would join the party. You could control him out of combat, but in combat he was computer-controlled. A smart player would have him ditch any Fireball or Stinking Cloud spells he had memorized and replace them with something else - anything else. Even if you didn't have time for him to memorize new spells, Akabar with no spells was more useful (or rather, less of a liabilty) than Akabar with area-effect spells.
The A.I.s for your Party Members in the story mode of Phantasy Star Universe are especially abysmal. Since the game is pretty much designed to be played as an MMORPG, you're unable to access any of their stats or alter their equipment or tactics in any way, and if that's not bad enough, you will lose track of the number of times that they get caught behind stairs/boxes/'mild curves in the path' and what not. When it comes to actual battle, you will do your best to hold in your rage as you see them offer quite useful tactical advice like "Don't bunch up," or "Engage the enemy in a pincer formation, Mr. Waber," only to either charge in blindly or, even more likely, just hang back and do absolutely nothing for most/all of the fight. There's a reason that doing group timed missions in single player mode is best attempted when you're ridiculously above the required levels for them.
Mages in the Baldur's Gate games don't play well with allies, freely dropping fireballs and meteor swarms on them. And then there's Gate, which summons a powerful demon. They do have the sense to cast protection from evil to stop it attacking them. However, because it still qualifies as an enemy, they'll attack it. Sometimes it's possible to just move away and let the two of them get on with, then move back in once the mage has expanded a bunch of their spells killing the thing it just summoned.
Even when the mage managed to avoid instantly attacking the Pit Fiend it just summoned, they never, ever, under any circumstance would use Protection From Evil on any of their own allies, which would always result in the Pit Fiend targeting instead of your party.
A possibly worse example of Artificial Stupidity was that any allied NPC, whether a summoned monster or someone you'd recruited to help you in a fight, would instantly turn hostile to you if they were caught in the radius of a damage dealing spell that either one of your characters or another allied NPC had used. Even if they were completely unaffected by it. Given that there was one fight where a recruitable NPC used a cursed sword that had a chance of triggering a fireball on his location every time he attacked, it was almost impossible to make it through the entire fight without all the rest of the recruitable allies there turning hostile (casting Resilient Sphere on him, which wasn't considered an offensive spell, was usually the easiest way).
In the first Baldur's Gate, enemies do not engage you unless they can see you. Which means you could stand just outside of their visual range or just around a corner and pelt with with fireballs and cloudkills, and they would just stand there until they died.
There are several Game Mods out there that provide better AI scripts, and some of these, like Tactics and Sword Coast Stratagems, can make the game Nintendo Hard just by having opponents use their powers in a more sensible way.
This shows up from time to time in Dark Souls, especially in areas with precarious footing like Blighttown. You'll be travelling along when you'll randomly gain souls from some enemy that accidentally fell off a ledge to its death. It is even possible, although considerably more difficult, to do this to a few bosses in the game, which nets you an instant victory.
Enemies in Dark Souls II have two main settings: either they will follow you forever until you die or use a bonfire, or they will draw a line in the ground and refuse to engage beyond that. Both are abusable in different ways. For example, several nasty Beef Gate enemies, such as the giant basilisk in the Shaded Woods or the BFS-toting Red Phantom in the Undead Purgatory, will not engage beyond a fairly short range, allowing you to shoot them to death; the Basilisk is particularly stupid because you can stand out in the open and fire arrows at it without it even attempting to engage. On the other hand, most of the Old Knights in Heide's Tower of Flame will follow you across the entire map, with some of them regularly standing back and waiting for you to deal with the others; nothing makes a fight with three Old Knights easier than having one of them follow you back to the arena at the beginning of the level, with his friends not even trying to follow until you've had plenty of time to deal with him. Additionally, one of the earliest bosses, the Dragonrider, can be lured into falling off his boss arena if you don't use the levers to expand the platform area, or shot from an area next to one of said levers until he's on the edge of death, at which point he will raise the shield he should probably have started using five minutes previously.
Also in Dark Souls II, the Earthen Peak area is full of jars containing really strong poison. It is also full of big, beefy hollows with enormous hammers, who just blunder towards the Bearer of the Curse regardless of whether these jars are in the way or not; they are not immune to the poison and will generally die fairly quickly, since poison in DSII is pretty nasty. To be fair, it is appropriate for a hollow, a mindless zombie in all but name, to behave in a stupid fashion.
The issues with high places continue in Dark Souls III, where it's possible to navigate the arched rafters of the Cathedral of the Deep without ever actually swinging your sword because enemies have a habit of attempting to approach across ground that is not, strictly speaking, there; after dealing with the irritatingly jumpy Thralls and the huge and ferocious Cathedral Knights across much of the level, watching them sidestep into nothing or attempt to charge you across thin air and fall to their deaths is surprisingly therapeutic. And then, assuming you don't rest at a bonfire, you can then make your way down to the ground floor and plunder the bodies - appropriately enough, in order to do so, you will usually walk past Patches, the series's most enthusiastic fan of dropping people from great heights in order to loot the corpse. This can also be used to make the Exile Watchdogs in the Road of Sacrifices much easier, since they'll try and follow you down a ladder without stopping to use the ladder first.
Also justified in Dark Souls III with Holy Knight Hodrick's summon. He'll follow you across the map, picking fights with anything he encounters on the way there...because Hodrick is Ax-Crazy and genuinely doesn't care what he kills. This allows you to slam him into tough opponents to watch the sparks fly.
In Sengoku Rance, the AI will occasionally put warriors in the back where they can't attack and Diviners in the front. Considering how Nintendo Hard the game is, you need to take advantage of any and all blunders the AI makes to win.
Linu back in the original Neverwinter Nights had an unfortunate habit of casting Harm on hostile undead. Which HEALS them. Even worse, this was usually a few rounds into the battle, so it'd wipe out all the damage you'd painstakingly inflicted on it. Throw in her tendency towards burning through her whole day's supply of Turn Undead spells, even though the last three attempts did nothing... yeah, it's probably best to depend upon potions for your healing.
Standard AI for an NPC with cleric levels tells them to cast healing spells on themselves if their hitpoints drops below a certain point. Reasonable behaviour in most circumstances, but there are vampire clerics in the game that aren't programmed to recognize that Revive Kills Zombie. It's not unheard of for the player to beat a vampire cleric to about half health, and the vampire to respond by attempting to cast a healing spell on itself and destroying itself.
The non-mages aren't a whole lot better. Fighter-types running headlong into encounter after encounter, thus forcing you to abandon what you were doing to join in, makes some amount of sense. However, Neeshka does exactly the same thing even though the sensible thing to do would be to wait until others engage and then sneak attack (where it works) at will (there is unfortunately no option to set up a character to only use sneak attacks. The best you can hope for is to tell her to remain in the shadows).
Of course when the fighters attack, they have a nasty tendency to run past perfectly viable targets, and get attack of opportunity-ed, just so they could get to that oh so dangerous archer that shot them in the bum. "Oh you'll pay for that 4 damage bow boy! What? Oh that huge-assed guy that just power attacked me for 36? Nah he's no threat, I won't bother to change my priorities just because he can dish out nine times the damage, that's sissy thinking!"
Boddyknock. Casting See Invisibility (repeatedly!) on clearly visible enemies wasn't of any help at all, while you were in dire need of support.
He also has the annoying tenancy to cast invisibility spells on himself during combat and leave you to fend for yourself.
Follower casters also routinely get caught behind corners and other obstacles where they can't see the opponent, cast a spell at the unseen enemy (which they only know is there because they can hear it), then immediately lose the spell because they can't target someone they can't see properly. Then repeat over and over, wasting their spells and time while you have to deal with the enemies on your own.
None of the NPCs seem to realize that traps are dangerous things to be avoided. Neeskha and Tomi will happily start disarming a trap, spot an enemy, and run straight over the trap to attack it.
Due to game engine specs, buffs vanish when moving to a new area, even though you're leaving the tavern through the door and those buffs should last for minutes or even hours. There's more than one scripted event where you get ambushed outside the tavern, too. The protagonist will also happily walk into scripted events and conversations that very obviously will or could turn hostile without any chance to buff, prepare or attack first.
Sometimes the player feels more like a babysitter than an adventurer. Your henchman will insist on using, what he thinks, is their most powerful weapon in their inventory, but not necessarily the most useful for the situation. You force them to use range attack and they'll immediately switch back to melee. Cue frustrated adventurer confiscating all melee weapons from the henchman.
Never set your henchman invisible. They'll remain stealthy and stubbornly refuse to attack.
In Neverwinter Nights 2, if the A.I. is turned on, your character will always, always start the combat by casting the Sanctuary spell. Even if he is a warrior/cleric.
There is also Qara, who had a habit of aiming area-of-effect spells where they would hurt fellow party members and even herself. While she isn't portrayed as very bright, she shouldn't be that stupid.
Let's not forget how your spellcasters would always sling about the various dispelling spells they had prepared at the beginning of a fight. Most of the time this led to you not having a way of getting rid of an enemies buff spells half way through a fight because they'd all already been used.
Even worse, they would often dispel any buff spells on the PCs, making it easier for the enemies to kill you.
Thankfully, you have the option to customize what kinds of spells your party members use, how often they use AoE spells, and even turn off the option of spells affecting your own party.
Another fine example of Artificial Stupidity is the tendency for your own party members to attack Elanee the druid while she's transformed into her animal form, and they've run out of other enemies to attack. Resting won't stop this, since your party members are still in combat, which prevents Rest from working.
Even warrior types are not immune. Standing still and bashing stuff is apparently too boring for the AI, which would rather ping pong between opponents at random, incurring attacks of opportunity and leaving huge gaps in your line so that enemies can gleefully rush through to slaughter your Squishy Wizard. The enemy AI, of course, does not do this.
In Gothic, the enemies' stupidity tends to help a lot in killing them. Many times you'll see enemies stuck against a rock and running in place, or trying over and over to jump up a wall of a house, or falling off a high ledge when pursuing you. Then there's the battering ram you climb to get into the besieged castle; the orcs cannot walk onto it (so that the player has a safe haven), which means you can lure a group of orcs up to the ram, stand at the very tip and kill the helpless enemies as they do nothing but wave their arms in frustration.
NPCs when acting as temporary companions in Gothic 3 are walking examples of this. To be brief, they will only notice an enemy when said enemy gets close enough to hit them in the face (sometimes they'll actually need to receive damage in order to unsheathe their weapon and enter combat mode).
In Gothic 1, you can run straight into an owned house, lockpick a chest, take all of its contents, and then run away, with nobody being angry on you. Yes, as soon as you enter a house, surrounding NPCs will immediately shout "Hey, you!", run towards you, threaten you with their weapons and eventually attack you if you won't leave. However, they won't attack you despite the fact that you're lockpicking a chest right in front of them, and as long as you leave before their "timer" runs out, they won't attack you, and won't mind that you just completely robbed them of all their possessions.
You can also unsheathe your weapon and make everyone around you forget about what they were doing in favor of threatening you. For example, it works on guards who are supposed to not let you pass. They will be more worried about you running around with an unsheathed weapon than you going where you shouldn't go. It allows you to, for example, get to the Fire Mages without joining any camp and get the reward for delivering the letter. Though trying to get to Gomez this way makes him kill you.
You often have fellow Samurai Jonathan, Isabeau, and Walter tagging along as a sort of fifth party member in Shin Megami Tensei IV that will attack enemies or cast buffs on your party. Sometimes, they act smart and will continue to press an enemy's weakness if you or they have discovered it. However, they do not seem to retain memories of what enemies are weak to from battle to battle. This can lead to some nasty situations where they waste their turns hurting themselves with attacks reflected back on to them, or worse, healing the enemy, or even worse, causing an enemy to Smirk (which makes them harder to hit, more likely to get critical hits themselves, and renders their weaknesses moot for a turn). What's that, Jonathan? You used Zandyne on an enemy immune to it? And now, it's Smirking? Oh, that's... nice.
Making it worse, you have no control over which of the three joins you. So you've got about a 33% chance of being screwed over by the first real boss fight just because you ended up with Walter and he won't stop casting Agi at the fire-immune Minotaur.
There are many cases in the Shin Megami Tensei franchise in which an enemy will use an attack that the target has an immunity to, and then use the same attack on the same target again.Hilarity Ensues if this is a game featuring the Press Turn system, in which blocked attacks carry an extra turn of penalty for the attacking team and attacks that are reflected or drained result in a complete loss of turns.
OFF has a frustrating battle system in which enemies keep attacking you while you're still choosing the moves you want to use. This leads most players to set the battles to Automatic, letting the AI fight for you at the same speed as the enemy AI. Unfortunately, your AI will almost never use any healing moves/items on dying or status-afflicted party members, you usually have to temporarily turn Auto off and do it yourself.
Pirates of the Carribbean: The Legend of Jack Sparrow is extremely glitchy and the unintelligent AI doesn't help when you're trying to save an island of natives from Black Smoke James. You're supposed to be guiding them to safety but most stand in place with their arms raised halfway and get shot at rather than follow you. This results in having to make multiple trips and walk slower than a turtle until the AI gets a clue but by the time you do that oftentimes too many of them are hurt and you have to start the mission all over again. It also brings a great deal of trouble when dealing with Madam Tang and her humongous clay warriors(they are supposed to perish the second they touch water but all too often I've seen them step brazenly into the water, walk over and hit your character with their naginata before realizing the stuff is lethal.
The iOS/Android game Summoners War: Sky Arena, if you choose to automate the combat courtesy of A.I. Roulette. If you're in a battle that counts, might want to take direct control instead.
Hirelings in Diablo II. While the enemy AI is okay, the ally AI is definitely not. Hirelings don't seem to understand basic concepts like "I should use that door just a few steps from me instead of trying to walk through the wall", they have the annoying habit of wandering around all the whole time in a world where just walking a few metres triggers a new wave of dozens of enemies. And monsters by the Necromancer are even worse, as getting too far from them (and they aren't good AT ALL at following you) makes them disappear. After numerous reports of necromancers getting stuck in a corner by their minions, Blizzard added an Unsummon skill to remove them when needed — and that turned out to not be enough, so now they let players noclip through their own minions. Players with access to the Teleport skill, either from the Enigma runeword or charges on another item could get around this, as teleporting gathers all your minions to you.
Diablo III is a bit better at this. You noclip through your hirelings, pets, and allies. Plus, they'll automatically teleport right next to you if they get too far away. Still, they have a tendency to only go after the weakest parts of any mob while you try to deal with the elites and boss-type monsters that show up, and outright ignore area-of-effect spells, like the "Plagued" poison pools or the blasts that "Molten" enemies leave behind when they die, leading to a lot of unnecessary deaths.
Xenoblade Chronicles X: The members of your team that you don't control tend to not have the greatest pathfinding abilities. Normally this isn't too much of a problem, as they'll simply teleport to you if you get too far away. The problem is that they absolutely ignore any hazardous terrain around them, meaning they'll readily walk right into pools of poisonous water or straight through lava streams. They also have a tendency to use lots of area of effect attacks, which can and will draw the attention of other nearby enemies. The only way to get them to knock it off is to not equip any of those attacks.
The above's predecessor, Xenoblade Chronicles, features this. While some characters fall into Artificial Brilliance with their abilities (Reyn is particularly good at managing Aggro and knockdown, Sharla is great at healing and her AI doesn't waste Headshot most of the time), a few in particular really fall into this:
The main flaw of the AI is that they don't handle the positioning very well, Hitbox Dissonance aside.
Melia controlled by the AI is an exercise in frustration. Since her abilities rely on summoning wisps that give the party buffs and then discharging them for damage and status ailments, the AI may sometimes just have her not do anything to keep the buffs on the party even though a player would discharge them to get on the damage over time and start the cooldown. What also doesn't help is that she has a melee weapon, which is not good for someone with the lowest physical defence and health in the game, so her AI will go in and melee. It makes one wonder why the developers gave Sharla (who uses a ranged weapon) such high defence.
Shulk, when controlled by the AI, is seen as even worse than Melia. He is very bad at using the Monado arts (Which are required to even scratch some enemies) and will waste the Monado on Monado Buster (or Speed if the party is at a lower level than what they are attacking) when it's better to use a shield or knockdown. He also does not handle positioning very well, even worse than many of the other games' characters.
Riki is a very good character in part because he has the ability to put on just about every condition and keep them on, allowing them to stack up and deal a lot of damage to bulkier enemies. While Melia is able to put on Poison, Burn, and Freeze, the one thing Riki can put on that she can't is Bleed. While Riki's AI is pretty good with Poison and bleed, the AI does not seem to recognise that Burninate and Freezinate are just as useful against single targets as they are against a group. He will often need to be ordered to use them against single targets.
Speaking of Burninate, the AI will never use any full circle area of effect arts during a single target battle, which include Burninate, Dunban's Soaring Tempest, the seventh party member's Power and Ether Drains, and Reyn's War Swing and his aura Berserker. Although, this might've been an attempt to counter the issues with area of effects seen in X above.
The AI also has the exact same pathfinding issues in this game as described above for Xenoblade Chronicles X.
In Ravensword: Shadowlands, the AI of the enemies is very basic, meaning that it's possible to see them happily fall to their deaths if they happen to run into a Bottomless Pit while chasing you.
Downplayed in Faraway Story. While ally AI will usually know when and how to use each character's unique skills, they aren't good at dodging enemy attacks. If the enemy uses a slow, powerful, and telegraphed attack, it's a common scenario for the player to dodge it easily while the allies run into the attack just to get in a few melee hits.
NPC hirelings in The Temple of Elemental Evil would take first dibs on all loot. This was annoying since they always swip the best stuff, even if it wasn't something they could use (such as a suit of full plate armor for a rogue). The game didn't track encumbrance outside of combat, so they could take an unlimited amount of loot, but once combat began they'd immediately become bogged down by the multiple suits of full plate they were carrying and become completely immobile.
Some demons in Ys Origin use ramming attacks against the player character, sometimes charging and then falling into a hole to the floor below.
In the second battle against Aimee and Angelo in Bravely Second, they will bombard your party with Fire-based attacks after Angelo uses an ability that makes the party weak to them. However, they will continue to do so even after you set up a buff that reflects all Fire-based attacks right back at the user. You can even buff their attack power so that they hit themselves harder. In all fairness, Fire is Angelo's only source of elemental damage, but Aimee has no excuse as she has access to all elements.
The AI in Cyberpunk 2077 is notoriously bad, but special mention goes to anything in a car. Cars seem to have almost no meaningful pathfinding and will sit gormlessly in place if something obstructs their path, and police in cars seem incapable of chasing the player while in the overworld.
Enemies in Monster Girl Quest! Paradox RPG that have the Silence status can still attempt to cast spells, effectively skipping their turn. Similarly, enemies with 0 MP can still attempt to use MP-requiring skills.
The computer can have great difficulties with large units (and sometimes regular units too). Don't be surprised to find an enemy Ogre stuck helplessly in a doorway, while 5 metres away from him your forces gun him down. Also the Executioner has an odd habit of throwing his brazier in front of him and getting trapped on it.
The enemy Warband will sometimes field units that make absolutely no sense, like one-armed Marksmen equipped with daggers. As the game goes on, it becomes easier because it is much harder for the randomly-built AI troops to compete with optimized troops fielded by an experienced player.
The AI will never raid your cart, meaning you don't have to defend it to prevent the theft of your icon and any items or Wyrdstone you store on your cart is completely safe from the enemy.
AI pathfinding is limited to straight lines, and enemy units will opt for the quickest possible route to their target. This leads to many tactical blunders:
It's quite common for enemies to advance on your formation, only to run out of movement and stop just short of charge range. Particularly amusing if you have a lot of ranged units or casters who haven't had their turn yet.
AI pathfinding never takes potential traps into consideration. Expect to see more than one charge attack negated thanks to an obvious trap marker sprung by the related movement (which stops the unit in its tracks and wastes the offense points).
While the AI is downright nasty about performing charge attacks from just beyond your own units' ambush ranges, enemy units will happily blunder into ambush attacks set around corners due to their singleminded focus on reaching charge/melee range.