It's sometimes helpful to think of characters controlled by some kind of AI - I'm just going to group them collectively as Non-Player Characters, or NPCs - as analogues to characters in books or movies. Characters in a well-crafted book behave in a way that makes some kind of sense; we might not always agree with their choices or find them to be rational, but ideally we can understand why they might make them. We expect them to behave in some way that seems reasoned, consistent, or meaningful. The Pac-Man ghosts chase us; we're not really sure why, but there it is. If one of them went into the corner and sat there, or only ever circled around one brick, we'd wonder what it was doing.
|We wouldn't want our brightly-colored ghosts to not be believable.|
Take Skyrim, which is actually quite good at AI in a lot of ways. Characters eat and sleep, run and hide when they're scared or fight when they're threatened, talk among each other, comment on quests you've accomplished or pants you aren't wearing, and so forth. That said, there are so many variables that for any given interaction with AI the devs couldn't hope to have accounted for all of them. If you approach the leader of a city after saving the city from a dragon, he'll praise and reward you, as might be expected. He won't, however, change his speech based on how many years it's been since you killed that dragon, on whether "somebody" quietly killed every person in his city, on whether the emperor has been murdered, on whether you're wearing pants, on whether he's wearing pants, or on whether you're wearing his stolen pants.
|On whether you're violating his personal space, etc.|
And in general, that's what we ask for in a video game. When we turn up the difficulty in StarCraft 2 and see that our computer opponent is making units in a clever way (as opposed to making one of everything before building an army), is focusing on your weak points, and is changing its army compositions to counter yours, we think that's good AI. When that same computer marches its giant army to your unprotected front, only to turn that entire army around and waltz slowly across the map back to its own base because you've threatened with a pitiful force, we (rightly) think that's bad AI. The Turing test is useful here - would a person behave that way? not a skilled one - but we don't always need an AI that sophisticated. Sometimes, we barely need anything we'd call an AI at all; we don't need the goombas in Mario to make clever decisions, we need them to walk forward. They're more an obstacle than an enemy. And sometimes, that's fine. Mario isn't about believable character interaction. We're a little disappointed in the AI when that very first goomba walks itself right off a cliff without our intervention, but we get over it when we do likewise. We usually accept the idea of enemies as obstacles rather than rational actors (otherwise we'd expect the Bob-ombs to rush us all at once instead of in single-file), provided it still feels like they're trying to impede us. If the Hammer Bros. always threw hammers away from Mario, we would probably feel like the game was showing us a challenge (we can see the hammers) but not actually confronting us with it, and that would quickly kill any sense of achievement.
If your game, and your game world, is to feel like a believable world where the point is at least partly exploration and the gameplay is at least partly about feeling like you're an influence, you'll likely want the AI of the game to reflect that - you want characters and enemies that treat your character seriously, that respond to you. If, on the other hand, your game is more focused on the "game" side, then we want enemies that act to inhibit you, that change what they're doing based on what you're doing so that our players continue to feel challenged. In all cases, if our players feel like their choices and their skills matter, or they're going to question whether they have any agency at all. Sometimes that reaction can net you a cool emotional experience (this is in line a bit with what I said about horror last week). Unless you're going for it, though, take care to avoid it. People often come to games because they want a little more control than other media afford, and it's frustrating to be denied that - especially in a way that doesn't feel artful or deliberate.