Believable Stupidity In Game AI
Gamasutra is running a feature written by Mick West, co-founder of Neversoft, about creating game AI that is dumb enough to defeat, yet intelligent enough that its "mistakes" are similar to those a real player would make, thus preserving the illusion that the AI is not just throwing the game.
"The simplest way to introduce stupidity into AI is to reduce the amount of computation that it's allowed to perform. Chess AI generally performs billions of calculations when deciding what move to make. ... The problem with this approach is that it decreases the realism of the AI player. When you reduce the amount of computation, the AI will begin to make incredibly stupid mistakes — mistakes that are so stupid, no human would ever make them. The artificial nature of the game will then become apparent, which destroys the illusion of playing against a real opponent. ... By reducing the amount of computation, we create an AI opponent that is trying to win, but has been crippled in a way that leads to unrealistic gameplay."
Actually I don't have much issue with the quality of AI's used in games, but I don't like that so many of them cheat. A few games of gotten it right, but many AI's can track my movements through walls. In order to defeat the AI, I have to figure out how it works and so I'm constantly aware it has superhuman abilities and I find that very distracting from the realism.
This must be the problem facing the team creating Duke Nukem Forever.
They needed the AI to be dumb enough so you could hear the comments all the time during the game.
Hmmm. Possibly this is a sign that TFA was written by an AI agent. Asserting that there are mistakes that are too stupid for for any human to make is a mistake that is too stupid for any human to make.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Year after year, I read these kind of articles that report how game AI increases in leaps and bounds...and I still don't see it. Bad guys in GTA still seem to rush towards grenades, Halo/Gears of War enemies are either completely impulsive or avoidant. I'm not knocking the programmers...I think game AI must be very difficult to achieve, and even harder to detect for the layman (such as myself).
Does anyone have an example of really good AI in action games (or any non-RPG, non-RTS games)?
(-1, Raw and Uncut is the only way to read)
The author has obviously never played chess with me.
That's not what I got out of the article.
What I took away was have your opponent play it's strongest, but make exploitable situations for the player. Make a pool shot so they human starts in a good position. Make a chess move that, while beneficial, opening a big possible hole for the player to exploit. Make the FPS bot run for cover at the wrong moment, but not randomly/suicidally.
(those are all from the article)
Basically make the AI make human like mistakes (mistakes in strategy) instead of "computer like" mistakes (just lowering their accuracy, not looking far ahead, etc).
Comment forecast: Bits of genius surrounded by a sea of mediocrity.
Actually, he is saying the opposite. He is saying that by reducing the number of calculations per second, you create an unrealistic opponent. Instead, you must do additional calculations to model the mistakes that a human would make. Our problem is not that we don't do enough calculations, but that we make mistakes in our calculations. We are inaccurate, we jump to conclusions, we get excited, or calculate one branch of the tree very deeply while ignoring another one. Those types of things are tough for computers to do.
If you want an AI to make human like mistakes, you have to have at least a roughly human cognitive model. The simplest way to do this, it seems to me, is to give the AI competing goals. Rather than just have the AI "try to win", and then cripple its ability to do that effectively, you could give it multiple goals to strive toward, and then give it some degree of randomness in which goal it chooses to pursue. Victory vs. pain-avoidance, attack vs. finding time to recover, etc.
And vice versa.
One thing that is stupid: trying the same things that failed in the past.
This is a component of smart behaviors as well. If you don't know what to do, try something and watch very carefully how it fails. If you are in a desperate situation and you are going to definitely fail through inaction, then try an action which failed in the past and hope you get lucky. Or vice versa, when the action that usually works looks like its going to fail, try doing nothing.
Animals freezing in the face of danger is an example of this. It's not much of a defense, but you might get lucky. Maybe the prey a couple animals down the line will get itchy and draw the predator's attention.
On the other hand, smart behavior can be a component of stupidity. If the red button gets you a treat 80% of the time and the green one gets you a treat 20% of the time, the intelligently stupid thing is to push the red button 100% of the time. The stupidly intelligent thing is to try to work out the pattern of red/green rewards.
If you want realistic model of stupidity, provide the NPCs with a range of decision making strategies, all of which work to some degree, but the better of which take more effort (computation). The NPC can choose between the strategies with a random function weighted towards the better strategies, but as time and "stress" come into play the function can shift towards the easy but less effective strategies.
That's a pretty good model of human performance "choking".
Evolution did not produce human stupidity because it was useless, after all.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
If this were a karate match, this would be the equivalent of the master having to fight someone he's never met before, but that person has studied the master's every move. Then, after the master wins the fight, he has to fight someone else who has studied his every move and acts differently. Not a fair fight.
Do we have programmers that are smart enough to program stupidity algorithms to be smart enough to be as stupid as humans?
A computer that plays on equal terms.
AIs often win in some games not by the virtue of being smarter, but by having an unfair advantage. Examples:
My suggestion: An AI should be coded as a bot, within the constraints given to the player. If the player can only see a part of the battlefield (like in Starcraft) then the AI should have the same limit and need adjust its own viewport to gain awareness of an area. It should also be limited by the fog of war, and lack the ability to see out of the back of its head. To put in another way, a fair Starcraft AI would be one implemented with a camera pointed at the screen, controlling only the keyboard and mouse inputs.
The idea is that I want to be beaten because the AI is indeed smarter, not because it's got a superior access to the battlefield I can never gain.
Chess probably comes closest to the sort of thing I want -- the AI and human are fighting on very equal terms. I don't see the calculating millions of positions a second as a problem, that's simply an implementation detail.
Well, I don't know Kasparov and I'm not a history expert, but I'm willing to bet that because he beat Deep Blue in 1996, he just figured he could do it again with no problem. He probably underestimated how much Deep Blue had improved, but that's just my speculation.
I don't know Kasparov's motivations for playing Deep Blue at all, honestly. Beating Deep Blue wouldn't have won him any fame ("Oh look, he beat a computer. Computers suck at chess anyway."), but losing would look bad for him. He had nothing to gain and plenty to lose. I know after he lost the match, he demanded a rematch, but IBM refused and put Deep Blue out of commission. IBM had nothing to gain by beating Kasparov again, and their stocks had already started going up when the news got out that they had beaten the grandmaster (to their great pleasure, history did indeed forget the shady details I mentioned before, just as they hoped).
At the time that Deep Blue was being used, there was more of a focus on brute force search than tricky AI game play. Deep blue searched an average of 130 million nodes a second using a iterative-deepening alpaha-beta search, sometimes able to look 40 moves ahead. IBM declined a rematch after that game, but thanks to improvements in AI, a standard desktop PC running improved search algorithms is now a suitable match for even a grandmaster.
Deep blue also contained an 'opening book' of 4000 positions and 700,000 grandmaster games indexed.
Source: Artificial Intelligence A Modern Approach: Russell, Norwig
"Oh, the humanity! Football games drive me nuts when the AI does stupid things no real person would ever do. Why the hell did my fullback just brush by the linebacker that's right in my RB's way?! Why can't I get my linebacker to stay in his lane on running plays?!"
Gee, you sound like a real life coach. Certainly like my High School coach.
I'm thinking the AI is working like it should here. You got your disgruntled, not getting paid enough FB who isn't taking the hit, and your linebacker who thinks he's smarter then your Defensive Coordinator and is freelancing with visions of stardom in his head.
Realistic this is, I think. Patience, padiwan. Trade you must. Draft you will. Beware of anger.
deleting the extra space after periods so i can stay relevant, yeah.
Why is this debasement? Playing against a machine even in unfair settings is still a challenge. The goal isn't to pick only fights you can win but to test yourself and do something new and experience something new.
As for it being "unfair" it wasn't touted as fair it was a computer v grandmaster experiment not a ranking test.
The only shady part in my opinion is the refusal for a rematch. If the man is willing to play on uneven ground and give his time (even if paid) to your stunt then you should have the courtesy to let him challenge/redeem himself.
I read about in college. Kasparov did ask for the transcripts. However the Big Blue team told him no. Basically saying it would give Kasparov an unfair advantage because he could study Big Blue's moves and deconstruct the algorithm it used.