prog: (galaxians)
[personal profile] prog
I read a good article in Game Developer last night about building weak AIs (automated opponents) that maximize the fun for the human player. The upshot was a recommendation to rely less on stunting the AI's allowed computation time, or clouding its actions with random variances, and more on having the AI intentionally and subtly providing the player with openings to smack it down.

For example, in a billiards game, a weak-and-dumb AI would just make wild shots. A weak-and-clever AI would calculate precisely the shot necessary to not only barely fail to sink a ball, but also have the cue ball end up in a spot where the human can follow up with an easy shot. It can look quite natural, when done correctly. You wouldn't want to do this on every turn, but you might want it to happen more often if the computer player starts winning. The article's author apparently wrote this very thing for a commercial project.

The article also referenced a chess program for PCs named Fritz, which pioneered this strategy for computer chess AIs. Historically, Chess AIs' difficultly levels are simply a factor of how long they're allowed to analyze the board and thumb through look-ahead positions. At weaker levels, there's a drop-dead timer on their thought process, and when it ends they just make the best move they happened to come across by then - which can often be a transparently terrible move.

Fritz, on the other hand, when set to a gentle difficultly level, plays a strong game but keeps an eye on how well the human is keeping up. If it's falling behind, Fritz will start intentionally making moves that aren't stupid, per se, but definitely leave openings for the human to grab a positional advantage. When (and if!) the human catches on and strikes at the opening, Fritz will resume playing for keeps.

There were other examples specific to Poker (weak players tend to fold when someone else makes a big raise, and so should weak AIs) and even first-person shooters (bad guys that have the "bad luck" to break from cover just as the player's crosshair is panning over them). I really like this.

Date: 2008-06-11 04:55 pm (UTC)
From: [identity profile] kahuna-burger.livejournal.com
Heh, this kind of reminds me of a link you had a while back about "how to cheat at kids' games" with the point of cheating be to give the kids the win regularly. I think the HoMM series could have benifited from this sort of thinking - on the easy levels it was barely worth finishing a game because your advantage got proportionally larger as things progressed. But the harder levels were too punishing at the outset for me to enjoy.

Date: 2008-06-11 05:24 pm (UTC)
From: [identity profile] prog.livejournal.com
It really is literally letting the poor pathetic human win, but trying your hardest to make it look like you're not. In the case of the billiards game, the computer gets to use its total mastery of game-universe physics to do so. "Oh - look where the ball landed! Lucky you!" I love it.

Date: 2008-06-11 06:53 pm (UTC)
From: [identity profile] cortezopossum.livejournal.com
I had two professors who would often play each other on one of the billiards tables at the student union game room. They were both extremely polite to each other and you could often tell that if one was losing badly the other would play a significantly weaker game until the the first one caught up.

This talk reminds me of the game 'Oddworld' where you could sometimes defeat guards by talking to them. If they couldn't see you, you keep jamming away at the speech buttons the guard would get more and more upset that he could hear you but not see you. Eventually the guard would get so upset it would run off the edge of a cliff and die.

Date: 2008-06-11 10:03 pm (UTC)
From: [identity profile] kahuna-burger.livejournal.com
I know a lot of people play games to be competitive and would resent that behavior, but for myself it sounds quite nice. I play games to enjoy the game while it's going on and "the thrill of victory" is a minor endnote. Blowouts aren't fun for me whether I'm winning or losing.

Date: 2008-06-11 06:42 pm (UTC)
From: [identity profile] chocorisu.livejournal.com
It's definitely more interesting to model an AI agent slipping up rather than just being stupid. Hard to get right though, especially in action games, cause there's always that danger of feeling like the computer is screwing with you. You want that sense of fiero from winning a fair fight and--for me, at least--I get none of it when I sense the computer is holding back. Be very cautious of adaptive difficulty for that reason.

Date: 2008-06-11 07:54 pm (UTC)
From: [identity profile] kahuna-burger.livejournal.com
But, really, isn't the computer is ALWAYS holding back in order for you to win?

Date: 2008-06-11 08:08 pm (UTC)
From: [identity profile] chocorisu.livejournal.com
Sure, but when you choose the difficulty of the game you're agreeing up front how hard the game is going to be. Adaptive difficulty is moving the goalposts.

Date: 2008-06-11 09:35 pm (UTC)
From: [identity profile] kahuna-burger.livejournal.com
Hrm, I thought the idea was that it would adapt within certain limits depending on the difficulty level. The Fitz example said it did the adaptive weakness when set for a gentle difficulty level.

I don't think the point of adaptive difficulty is to remove difficulty levels, it's to make the full range of them more fun. As I mentioned with HoMM, lower difficulty levels can be tedious if done badly.

Date: 2008-06-11 11:54 pm (UTC)
From: [identity profile] chocorisu.livejournal.com
Oh, I completely agree. My point is just that it's very hard to get right. The AI has to feel consistently weak, rather than being blatantly smarter than you with deliberate slip-ups. People are remarkably good at spotting patterns!

It also depends a lot on the game--driving games are by far the worst, where you can tell the other cars are deliberately driving slower (and not just taking the corners badly) to give you a chance. Arrrgh I hates it!

August 2022

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28 293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 10th, 2025 09:03 pm
Powered by Dreamwidth Studios