Image 01

21st Century AI

A blog about achieving meaningful Artificial Intelligence

Posts Tagged ‘AI’

Bad Game AI / Good Game AI (Part 2)

Thursday, June 16th, 2011

So, we left the last post with the intention of finding other games that had good AI, or at least AI that didn’t suck. We’ve asked everybody we know, we scoured our game collection and we’ve still come up empty. You know what? Almost all game AI sucks; some just suck more than others.

Without naming names – but getting as close as we dare – here are some real stinkers:

Sports Games. I like sports games; especially ‘management’ sports games where you get to trade for players and call the plays. I’m not interested in actually being the quarterback or the batter and precisely timing when you press the ‘A’ button or whatever. I like sports games because the AI sucks and I can easily manage the Chicago Cubs to win back to back to back World Series championships (for my foreign readers the Chicago Cubs are the worst team in the history of professional baseball or maybe professional sports in general and, yes, I’m a Cubs fan).

To me, this especially galling because writing sports AI should be pretty easy; well, easier than writing wargame AI. First, baseball and football (the only sports that really excite me from a game AI perspective) are really well understood and there is a ton of statistics recorded since the beginning of these sports. Stats are very important in creating good AI. It allows us to create accurate models of what has happened and what will probably happen in the future. We can use this to our advantage.

A quick example: you’re calling the defensive plays in a football game. It is third down and the offense has to move the ball 25 yards for a first down. What do you think is going to happen? Well, most humans would know that the offense is going to call a passing play. What should the defense do? I’ll give you a hint: don’t expect a running play off tackle. Yet, most football games are pretty clueless in this classic ‘passing down’ situation. Indeed, sports games AI is clueless when it comes to knowing what happened in the past and what is likely to occur next. They don’t keep any stats for AI. Doing so would come in handy for unsupervised machine learning (I was going to link to a post below but, hey, just scroll down); a subject I plan on writing about a great deal more in the future.

And one more thing about sports games: they have no concept of what constitutes a good trade or a bad trade. Let’s say you want to trade for Babe Ruth (for our foreign readers: arguably the greatest baseball player of all time). At some level, the game has a ‘value’ associated with the ‘Babe Ruth’ data object. It could be a letter value, like ‘A’, or it could be a numerical value like 97. If you offer the AI a trade of ten worthless players, valued in the 10-20 range (or ‘D’ players) the AI will take the trade because it is getting more ‘value’ (100-200 ‘player points’ for 97 ‘player points) even though it’s a stupid decision. Yes, I know some games only allow you make three or four player trades, but the basic principle is the same: sport game AI usually makes bad trades. And the reason for this is that the AI is ‘rule based’ or ‘case based reasoning’. Again, I promise I’ll write more about this type of AI in the future, but for now just be aware that this type of AI sucks.

Real Time Strategy (RTS) Games (Wargames with Tech Trees). There are a lot of games that fall into this category and they all have serious AI problems. First, writing AI for wargames is very difficult (I do for a living, so, yeah, I am an expert on this). Second, RTS games can’t ‘afford’ to spend many clock cycles on AI because they have lots of animation going on the screen, polling for user input, etc. and this results in very shallow AI decisions. Lastly, the addition of a Tech Tree (should the AI ‘research’ longitude or crop rotation?) doesn’t make the AI decisions any easier.

If anybody out there knows of a RTS game where the AI doesn’t suck, please drop me a line. I would love to play it.

This, unfortunately, brings us to:

Civilization V. Well, so much for not using names. I haven’t even played this game but I just read this review on I Heart Chaos: “Speaking of “miscalculating”, (a polite word for “cheating”) there is a serious issue with Civilization V’s artificial intelligence. It is so

unbelievably unbalanced that the experience suffers for it.” (http://www.iheartchaos.com/post/6492357569/ihc-video-game-reviews-civilization-v).

CES 1989

(L to R) The game designer of the Civilization game series, the author of this blog and Johnny Wilson (game magazine writer) at the 1989 CES show. Couple of interesting observations: I had the #1 game at the time and we all (except Johnny Wilson) had more hair.

Well that sounds kinda mean-spirited of me, doesn’t it? I haven’t even played the game, but here I’m citing another review that says Civ 5 has lousy AI. Well, the problem is that whole Civ series (and I have played some of the earlier ones) all suffered from bad AI, or AI that just plain cheated. And that’s another problem; the game developer (who shall remain nameless) kinda has a history of using ‘cheating’ AI. That is to say, his AI often ‘sees through’ the fog of war (i.e. you, the player, can’t see your opponent’s units but your computer opponent can see all of yours), and, well, there’s just not a nice way to say this… the ‘dice rolls’ have a tendency to get fudged… in the favor of the computer.

So, there you have it: the current state of AI for computer games isn’t pretty. For the most part, it’s ‘rule based’ or ‘case based reasoning’ which is extremely inflexible (we sometimes use the phrase ‘brittle’ to indicate AI that is easily broken.

I am more convinced than ever that the solution is unsupervised machine learning. So, I will be returning to that topic in the next blog entry.

 

 

Where’s the Artificial Intelligence we were promised?

Thursday, July 15th, 2010

Way back at the end of the last century we were all led to believe that wonderful ass-kicking AI would be standard issue in every computer game, office application and multibillion dollar DoD wargame. When we were writing these games in the 1980s and ’90s we were still dealing with limitations on available RAM and storage space (games shipped and ran on 3.5″ disks; early hard drives were awfully small). Still, what we did back in the ‘old days’ of computer games was, frankly, at least as good as what is shipping today.

I’ve written a lot of computer games and I’ve played even more. I would be very hard pressed to name a current game that has ‘pretty good’ AI. Based on the reviews I’ve read of most computer games, I’m not alone. AI, even just ‘acceptable’ AI, continues to be the biggest problem facing commercial computer games today.

On the ‘professional’ side large, expensive wargames (and here I can’t get into many details if I ever want to work in the industry again) had no AI whatsoever until fairly recently. For now, I’ll just say the results aren’t commensurate with the truck-loads of money that are being dumped on the problem.

My old friend, Mike Morton, urged me to start writing a blog about AI and this is the result. If there are any complaints about the blog, please write to me and I will send you Mike’s email address. He works for Google and probably has plenty of time to answer email.