I got steered to yet another new blog that I hadn't seen before, A Games Design Blog. (Not a terribly cryptic title, is it?) While the author, Rob Hale, writes more about game design in general than AI, his latest post, 7 Ways to Make your AI Smarter was, as you would suspect, about AI.
There's nothing terribly earth-shattering about what he says, but there are some good points embedded in the article. For example, I do like this bit:
You can have the most inteligent goal-oriented perfect-pathfinding AI enemies in the world but it doesn’t count for anything if the Player is killing them before they get to do any of that clever stuff.
The only difference in Halo between the AI in Easy mode and Legendary mode is that in legendary the AI has more health. This meant they lived longer and as a result did more cool clever things making them appear more inteligent. They were also more accurate and did more damage which supports my previous point.
I truly think that we need to break players from the mentality that you can just wade through enemies without a fight. That is a relic of a time when our AI sucked so badly we didn't WANT them to survive very long. Now, we have so many cool things we can do, it's a shame for enemies to not be able to show it off. I have sensed that change in some of the games that I have been toying with lately. This is a good thing. (e.g. see my Post-Play'em write up on Gears of War 2)
Another good quote is:
If I had to choose between Very Clever buggy AI and Very Simple Bug-Free AI I will always pick the Simpler choice.
Every time an AI gets a Path wrong or does something slightly unpredictable (in a bad way) is another notch against your AI appearing smart.
In a previous life, when I was an engineer in a recording studio, I would tell the bands I worked with, "No one will know if you leave that hard lick out... but they will know if you put it in and it doesn't work well." This is the same suggestion in a different world.
I believe a corollary to this would be, "don't fall in love with one cool feature so much that you leave the other mundane stuff behind." I've seen plenty of AI that has some nifty thing they are trying to show off and they end up leaving the normal, relatively easy stuff so rough that it drags the whole show down. I don't care if your AI does "Nifty Feature A" if the rest of it is garbage.
Anyway, take a look at the article. I'm definitely adding this blog to my subscription list.
Ok... it was one thing to listen to Ray Kurzweil's vision of the next 10 years during his Keynote last year at GDC. It is quite another to see a video from Microsoft of what they think 2019 will look like. Ray suggested that the game developers (and mostly we AI folks) would have a lot to do with the future. I believe that MS would agree with that suggestion.
For those of you that have been wondering why this blog has been a little quiet in the past 6 months or why I haven't progressed on Airline Traffic Manager, I present to you my excuse...
My new book, Behavioral Mathematics for Game AI, is now available for pre-order on Amazon.com (and dozens of other resellers). Some of the details on the site are incorrect since the book is being finished up. As my publisher (Charles River Media/Cengage/Course PTR) updates their information (including art for a cover that we haven't even designed yet), the information at the resellers will be updated as well.
As it is scheduled now, the book will be available in mid-March. Thankfully, that means that it will also be on the shelf in time for GDC. Considering my role in the inaugural AI Summit, that will make for an exciting week for me.
Rather than the typical AI book which deals with the architecture of state machines and pathfinding, for example, I focus on behavioral AI. That is, what goes into a decision and how can we make those decisions more believable?
I begin by covering a lot of classical game and decision theory and explain how we can relate those examples into the video game world. I cover utility theory and marginal utility, how it manifests in the real world and how we can represent it in our AI agents. There's a healthy dose of technical material as well. There are chapters on constructing mathematical formulas and algorithms to help replicate behavioral patterns. Lastly, I offer solutions to prevent some of the problems that hamstring our AI agents. Throughout all of the book, I tried to make it an easy and even fun read. How often have you read a technical book that would keep you awake chuckling rather than put you to sleep with a headache? After all, we do program games, right?
All in all, it has been an enjoyable project that forced me to re-analyze things that we all often take for granted as AI programmers. I hope that you enjoy it as well.
I was pointed to an interesting little observation/rant/commentary on the AI of FPS games on Blogo Profundo. Just a snippet heavily trimmed down to his main points:
I'm no expert here, so maybe one of my forty thousand readers can chime in, but these are just some problems I've noticed.
... Over the years, FPS's have definitely evolved both in graphics and mission complexity. ... One thing that has always been subpar however is the computer characters' AI.
... First criticism is that they tend to act as solitary agents, and don't usually form up into squads and act tactically like a rifle-team. There's no covering fire, there's no flanking, there's no suppression and calling in air-strikes.
... Second criticism is that even when they are acting as solitary agents, they're dumb as hell. They usually don't hear you, they don't make basic predictions about what you're likely to do, and they don't use the terrain to their advantage.
There's more to it than that. In fact, he asks some excellent questions of the development community. Certainly, the suggested solutions are a bit simplistic but it does show what I believe is the consensus of our audience... that they are grumpy about our lack of progress and/or dedication to realistic AI.
Wow... back-to-back greats posts from Ted Vessenes on his blog, Brainworks. In this one, he writes about a concept very close to my heart - that of mathematical balancing. In the post, Getting it Just Right he mentions two types of parameters - sensitive and insensitive numbers. From the post:
A sensitive number is extremely hard to tweak, because you won't see the right behavior until you get things "just right". If the value doesn't encode the right concept, then that "just right" state won't exist, but you'll never know that. You'll just see how all kinds of different values don't work in different ways.
And an insensitive number generally just has an impact when it crosses an important boundary (for example, driving 56 instead of 55, or your gas tank being 0% full instead of 1% full). There's often no indication where this interesting numerical boundary might be.
I mentioned on a comment I posted there that I wished he had written that a few weeks ago. The ideas he presents map very well into a couple of my recent columns over at AIGameDev. One, on Chaos Theory and Emergent Behavior hits a similar nerve as far as tiny changes having big ramifications. The other was about intelligent-looking errors. Both are applications of trying to get those parameters into the ever-elusive "sweet spot" - both in the short term (believability) and the long term (stability). I would have liked to quote him on those columns.
I'm definitely keeping an eye on Ted's blog from now on!
Ted Vessenes wrote a nifty little post on his blog where he compared designing and programming AI to being a parent. Here's the opening paragraph:
"Writing artificial intelligence is a lot like being a parent. It requires an unbelievable amount of work. There are utterly frustrating times where your children (or bots) do completely stupid things and you just can't figure out what they were thinking. And there are other times they act brilliantly, and all the effort feels satisfying and well spent."
I have to agree with a lot of the points he makes in his post. I would like to take the analogy one step farther.
I've occasionally made the point about both parenting and AI that your job is to not define what your progeny should do but convey an understanding of why. If, as a parent, you tell your child not to run in the street, they will hopefully carry that lesson into the future. However, they may not apply that same edict to driveways, parking lots or any other places where they could get plowed over by a car. This is analogous to the scripted AI methodology. However, if you explain the why of the situation - i.e. "be careful anywhere that cars are moving because the driver may not see you in time to stop and you could get badly hurt" - then the simple rule can be applied to any situation where there are cars (or even car-like objects). This, of course, maps over to rule-based systems or even planning systems.
However, going back to Ted's point, it is an interesting similarity to put all those rules into place and hope that your little bots realize the appropriate situations in which to use them. I actually wrote a column about this scary process on my weekly column over at AIGameDev.
Anyway, if you are an AI developer, I hope that you are blessed with many children who all grow up to be accomplished in their chosen lives (or deaths).
According to this article at EETimes.com, there is an AI research group at Rensselaer Polytechnic Institute that believes that they are in the process of creating an AI entity that will finally be able to pass the legendary Turing Test. Their target date is this fall. They need to use the world's fastest supercomputer, IBM's Blue Gene in order to get the real-time results necessary, however. Interestingly, they are partnering with a multimedia group that is designing a holodeck... yes, as in Star Trek.
"We are building a knowledge base that corresponds to all of the relevant background for our synthetic character--where he went to school, what his family is like, and so on," said Selmer Bringsjord, head of Rensselaer's Cognitive Science Department and leader of the research project.
In order to come up with the complete personality and history, they are taking a novel approach. One of Bringsjord's graduate students is providing his life as the model. They are in the process of putting all that data into their knowledge base. Facts, figures, family trivia and even personal beliefs from the student are what is going to make up the synthetic character.
"This synthetic person based on our mathematical theory will carry on a conversation about himself, including his own mental states and the mental states of others," said Bringsjord.
However, before you game AI programmers get all excited about this as some sort of potential middleware product...
"Our artificial intelligence algorithm is now making this possible, but we need a supercomputer to get real-time performance."
It looks like they are doing more than just facts and figures on the project, however. They are going to great lengths to add psychology and even a form of empathy (my word, not theirs).
The key to the realism of RPI's synthetic characters, according to Bringsjord, is that RPI is modeling the mental states of others--in particular, one's beliefs about others' mental states. "Our synthetic characters have correlates of the mental states experienced by all humans," said Bringsjord. "That's how we plan to pass this limited version of the Turing test."
The difference with this compared to standard ,observable facts is "second-order beliefs". In order to do that, you have to be able to get outside of your own collection of perceptions, memories and beliefs and into the mind of others. In a demo that they put together on Second Life (which I will not bother embedding here since it is unexplained and boring), they show that they have been working on 1st order and 2nd order beliefs.
An example is, if something changes after a person leaves the room, you observe the change but they don't, you must know that the absent person will have no knowledge of that change even though you do. Therefore, the other person's belief is that it is actually unchanged. You have to be able to look at the world through their eyes... not just in the present tense, but by replaying the recent history and knowing that they would have no knowledge of the change that occurred.
Hell... as Soren Johnson pointed out in his GDC lecture, we can't even afford to do individual "fog of war" for 8 or 10 computer-controlled enemies. At least not on a typical PC. Imagine trying to keep all that activity straight in a running buffer of some sort... for everything in the environment. *sigh*
I keep having to go back to what Ray Kurzweil was predicting at his GDC keynote... that there is still a logarithmic growth in capability happening in technology. Given his figures, putting this sort of depth in a computer game will definately happen in my lifetime - and perhaps in my career. Now that will be scary.
AIGameDev.com has a great, in-depth interview with Dmitriy Iassenev, the AI mastermind for S.T.A.L.K.E.R. The game has a very extensive A-life system that lends a lot of depth to the game. In Dmitriy's words:
The gist of the A-life is that the characters in the game live their own lives and exist all the time, not only when they are in the player’s field of view. It eventually runs counter to the customary optimization processes used in games development (why perform operations invisible to the player?). Thus, such a scheme is reasonable to be used only when you know exactly what you want to have in the end. We had the game designers’ requirements to have the characters that could not only live inside a certain level, but move between the levels, memorizing the information they obtained during their existence. Consequently, we have decided that each character should come with only one logical essence regardless of the level he is at; whereas we could try to implement that with various tricks involved.
Read more of this very detailed interview over at AIGameDev.com - the place for the killer AI stuff on killer games!
I have kinda entered a vortex of browsing through other people's GDC coverage - especially on the sessions that I could not attend. Note that I don't necessarily agree with everything that people have posted here - I'm just including them so people can have a broader picture. Here's a partial list of (loosely) AI-related stuff that I have found so far:
The paradigm shift rate is now doubling every decade, so the 21st century will see 20,000 years of progress at today’s rate. Computation, communication, biological technologies (for example, DNA sequencing), brain scanning, knowledge of the human brain, and human knowledge in general are all accelerating at an even faster pace, generally doubting price-performance, capacity, and bandwidth every year. By 2020, full-immersion virtual reality will be a vast playground of compelling environments and experiences. Initially VR will have benefits in terms of enabling communications with others in engaging ways over long distances and featuring a great variety of environments from which to choose. By the late 2020s virtual environments will be indistinguishable from real reality and will involve all of the senses, as well as neurological correlation of emotions. As we enter the 2030s there won’t be a clear distinction between human and machine, between real and virtual reality, or between work and play. Intelligent nanorobots will be deeply integrated in the environment, our bodies and our brains, providing full-immersion virtual reality incorporating all of the senses, experiences "beaming," and enhanced human intelligence.
The session, while inspiring and informational, seemed to be one that he has given numerous times before - and managed to insert a few token comments here or there that loosely linked it to the game industry. That was rather distracting at times.
His main theme, as usual, was the expansion of no only the processing power (a la Moore's Law) but the "processing power" of the human mind and society as a whole. From a mathematical standpoint, I loved his use of logarithmic graphs and even double logarithmic graphs to show what amounts to constant rates of change as straight lines. He applied this to so many different things, e.g. the growth of life and intelligence, the power of supercomputing, the power over cost of computing, etc.
The crux of this issue is that people have a tendency to think linearly rather than exponentially and especially logarithmically. That means that we tend to mis-project future trends. One way that this hurts us in the technology arena is that, given production times that are getting to 3 or 4 years (Duke Nukem Forever is an outlier), we tend to undershoot the capabilities of the systems that are available by the time that we release our products.
The endpoint, of course, is his much publicized "countdown to singularity" wherein our computing power will match our mental capabilities. A couple of key predictions in this arena (which are kinda creepy in a way):
2010: Computers disappear
Images written directly to our retinas
Ubiquitous high bandwidth connection to the Internet at all times
Electronics so tiny it's embedded in the environment, our clothing, our eyeglasses
Full immersion visual-auditory virtual reality
Augmented real reality
Interaction with virtual personalities as a primary interface
(A great quote: "Real reality will continue to be irksome for a few years.")
2029: An intimate merger $1,000 of computation = 1,000 times the human brain
Reverse engineering of the human brain completed
Computers pass the Turing test
Nonbiological intelligence combines
the subtlety and pattern recognition strength of human intelligence, with the speed, memory, and knowledge sharing of machine intelligence
Nonbiological will continue to grow exponentially whereas biological intelligence is effectively fixed
One entire section of his talk was dedicated to the advances and future of nanobiology. While this seemed to be a lull in the relevancy to the game industry, there was a connection there. He actually said that, due to nanotechnology and nanobiology, we would eventually be able to reprogram our bodies the way we reprogram our games. After spending Monday and Tuesday at the Serious Games Summit where the theme was taking game and game programming technology beyond the entertainment world, I couldn't help but think that some of the techniques, especially those related to AI, would map over into some of the genetic and biological applications that he was talking about. Interestingly, this is somewhat related to things I have been reading in the book "A Beautiful Math: John Nash, Game Theory, and the Modern Quest for a Code of Nature".
One of the main interests for me and the people that I attended with was that he was often speaking largely to the AI programmers. One of his comments was that "AI is the next frontier in passing the "uncanny valley" such as it is in games. While hardly a news flash to the game world, I hope that made our stock as AI designers and programmers go up somewhat.
All in all, it was an inspiring speech if not directly relevant to today's game world... but there I go thinking linearly again. I can tell you, however, that his keynote kept coming up in roundtables, conversations, and at the AI Programmers dinner that week - every time a technique of handling prohibitively large numbers of calculations came up, his name was invoked as giving us hope that we could soon be able to handle it.
For more on Kurzweil and all of the above, check out the web site KurzeilAI.net. You can also get his slides from the keynote (9 MB .ppt file) which is where the above shots and images come from.
One of the more intruiging lectures of the 2008 GDC was given by Soren Johnson (MobyGames info) ex- of Firaxis and now with Maxis on the "Spore" team. He was talking about how Civ 4 fit in the spectrum of game AI between two extremes... "Good AI" and "Fun AI". Here's some selections from my notes on the lecture. (Forgive the seeming lack of lucidity - I was typing like a madman!)
Also, this is a direct link to Soren's Slides (.zip) on his blog - which is where the images in this post came from (click to enlarge).
“Good” AI (Play to win) Beat player at their own game Essentially a human substitute
“Fun” AI (Play to lose) Algorithms are the content Focus on the Player’s Experience
For example, Aggro in an MMO is fun AI.
With tanks, healers, DPS (damage per second) there is a formula for handling it... Trivial AI problem to “solve” by the players. Aggro determines who AI attacks, let enemy attack the tank, you heal the tank… DPS the mob… Everyone knows how it works… very predictable. Almost become commoditized with agro tools. Blizzard isn’t trying to be clever – they like that it is simple.
The question with AI design is, where are you trying to fit? Across the spectrum.
Chess is “good”
Starcraft is more towards “good” (no real diplomacy – assumption is that they want to kill you.)
Civ IV split the gap. Deep diplomacy but very symmetrical game design.
Heroes of Might and Magic is more towards “fun”. Not as focused on the excellence.
Desktop tower defense if pure "fun" AI.
Rule sets? Good side tends towards fixed rule sets. (e.g. Chess) Fun side tends towards evolving rule sets.
What are the best environments? Good AI tends towards Multi-player Fun AI tends towards Single-player
Tactics available to AI? Good AI will do everything available. Fun AI will do limited tactics.
Measuring performance? Good AI has objective measurements Fun is subjective – e.g. difficulty over performance
Turing test? Good AI passes Fun AI... this question is irrelevant.
The question is: “Play to win or Play to lose?”
With Civ IV, the AI does have limited options. There are a lot of options that they do not put on the table for the AI. Esp. with diplomacy. E.g. fighting a war... as a player, you can ask them for stuff if you promsie to quit war, then attack them over again. AI doesn’t do that.
Civ has:
Both fixed and evolving design
Symmetrical
Single Player
Limited Options
Objective Testing
Fails Turing test but it isn’t irrelevant.
Every player is different… some want things like challenge, sandbox, narrative.
For narrative, you want to aim for personality, for the AIs to maintain memory about you. It's OK for them to fall for traps. They built that into the leaders in Civ 4.
With regard to the challenge, you "want player to win or at least understand WHY they lost."
Need for difficulty levels: Lets sandbox players off easy Gives Challenge players a goal Increases available tactics.
Where does cheating fit? Completely Good AI does not. Completely Fun AI n/a There is no concept of cheating (e.g. desktop tower defense) In the middle… yes?
The Noble level in Civ 4 is the “even level” with regard to production modifiers, etc.
But Noble has other cheats… e.g.
Animal/Barbarian combat bonuses
No Unit support
Better Unit upgrades
No Inflation
No War Weariness
The AI needs more help in these areas.
For example, AI does not leave cities empty like a human would… so unit support costs. Human army and AI army will never be the same size because they have to keep units in their cities… therefore cut the support costs for the AI since they need to have a larger army.
Cheats should NOT be linear… certain you want to help more or less as you progress your diff. levels.
Cheats should never feel unfair! Examples from past Civs that players hated...
Civ 1, 2 Free wonders Gang up on human (In Civ 1: If year > 1900 and human in lead, declare war on human)
Civ 3, 4 Human-blind diplomacy (Never checks “is human?”) Information cheats (they DO have info cheats – most of them come down to limited dev. Resources… e.g. fog of war is very expensive)
Information cheats can really backfire on you. E.g. Amphibious Assault Judo using empty port cities in Civ 3. (solved by determining random time for updating the assault target, ignore temporary data such as nearby units.)
Cheating is relative: The Tech Trading Problem…
AI must trade techs
AI must trade fairly
Human can sell techs cheaply
Only two of these can be true… So… should AI sell techs cheaply? Solution? Can AI pursue altruism?
When the AIs were trading often, it made for very even technology levels between all players rather than some groups ahead and others lagging. Everyone had everything.
Solution in Civ IV
AI can undersell by 33% but… Tries to make up difference in gold Only trades on random turn intervals Uses same “Refuses Trade With” logic as with human.
Arbitrary rules e.g. “I will never trade Iron Working with you.”
What is the point of cheating? Are we trying to…
Write the “best” AI?
Beat the human?
Be fair?
Designing for the AI? Can AI handle the options in the gameplay? OTOH, make sure not designing just for AI. Legitimate reason for design decision. (e.g. closed borders, enforceable peace treaties)
Traditional testing fails Automated testing helps greatly Need hard-core fans to analyze 1.5 year closed beta, peaked at 100 users, bi-weekly patches.
They used soft-coded AI: No AI scripts No enums (No “Temple”) Less brittle code Less predictable AI is not always a good thing.
Probabilistic Reasoning - Weights to factors, values to situation
Data-driven Mods - AI was stand-alone so that it was compiled into dll. CvGameCoreDLL.dll was 100% independent of engine.
I noticed this GamePro blurb about the upcoming sequel to F.E.A.R. Here's an excerpt...
"The most obvious difference that will hit the player right away is in the visual density of the world," said Mulkey. "F.E.A.R. looked really great, but where F.E.A.R. would have a dozen props in a room to convey the space, Project Origin will have five times that much detail.
"Of course, this will only serve to further ratchet up that 'chaos of combat' to all new levels with more breakables, more debris, more stuff to fly through the air in destructive slow motion beauty."
OK... I can dig that. One thing I noticed as I played through F.E.A.R. is that things were kinda sparse. (I really got tired of seeing the same potted cactus, too.)
The part that I am curious about, however is this:
... Mulkey says improved enemy behavior is at the top of the list.
"We are teaching the enemies more about the environment and new ways to leverage it, adding new enemy types with new combat tactics, ramping up the tactical impact of our weapons, introducing more open environments, and giving the player the ability to create cover in the environment the way the enemies do," he says.
Now that is the cool part. When the enemies in the original moved the couches, tables, bookshelves, etc. it was cool... but rather infrequent. I was always expecting them to do more with it. If they are both adding objects to the environment and then "teaching" the agents to actually use those objects, we may see a level of environment interactivity that we've never experienced before.
The cool thing about their planning AI structure is that there isn't a completely rediculous ramp-up in the complexity of the design. All one needs do is tag an object that it can be used in a certain way and it gets included into the mix. On the other hand, having more objects to use and hide behind does increase the potential decision space quite a bit. It's like how the decision tree in chess is far greater than that of Tic-tac-toe because there are so many more options. The good news is that the emergent behavior level will go through the roof. The bad news is that it will hit your processor pretty hard. Expect the game to be a beast to run on a PC.
I certainly am looking forward to mucking about with this game!
This comes from an IGDA (International Game Developer's Association) article by Mathew Sakey. He is discussing how dialogue in games tends to be a real drag. The reason it caught my eye is because of the implications (if not outright pleading) that better AI is potentially a solution. Here is an excerpt from the article:
Part of it is that we are still roleplaying with circuit boards, and technology means it's going to be that way for a while. When the day arrives that we're actually roleplaying with the game AI, and not a pre-scripted database of reactions… well, that day we can just do away with other people altogether and it'll be great. But right now – and despite the never-lived-up-to claims of some developers, including a couple mentioned here – game AI advancements seem irritatingly focused not on character and world reaction to player behavior, but on combat skills, so it's going to be a while before The Elder Scrolls MCMLXXV responds in a genuinely dynamic way to our remarks and activities.
Motion controls, voice recognition and reputation systems are all moving game worlds in a direction where we're not playing, we are participating; where we are not in the game, but of the game. It is the difference between roleplaying with humans and doing so with a circuit board – human conversation dynamically changes based on thousands of subtle cues computers simply cannot track. As the technology and software evolve, we'll naturally see ever-more organic dialogue opportunities in games, provided developers take them.
I believe that this is a fascinating field - but one for which I have no concrete answers. Even setting aside the issue of whether gamers would want to muddle through dialogue (which is also discussed in the article), it is challenging from a strictly technical and academic standpoint. The game Facade tackled this issue (pretty much from a strictly technical and academic standpoint). I saw a GDC presentation on it back in 2004 and have seen it discussed, but I can't claim to have played it. Maybe that should be a stop on my sojourn through this great unknown landscape that is the future of game AI.
I happened upon this blog entry by a reviewer of the new Far Cry 2 by Ubisoft (note, not Crytek). I include this paragraph here but please visit the blog for more information.
Ubisoft also makes some very grandiose claims about Far Cry 2's AI, which makes me far more leery than any promises of beautiful graphics or realistic physics. Every game I've seen that promises realistic artificial intelligence has fallen short. It's not about bad AI, but more about developers making promises they can't back up. According to Ubisoft, Far Cry 2 will sport complex, nonscripted artificial intelligence that has enemies and NPCs reacting to personal needs. I've heard that enemy soldiers will seek shade when it's hot, take breaks then they're tired, and seek out food when they're hungry. Combine these claims with a sprawling world and I find myself having flashbacks of the buildup to The Elder Scrolls IV: Oblivion. Bethesda Softworks promised some amazingly realistic behavior in its NPCs, but it didn't quite make it. The game was still very good and its characters occasionally showed glimpses of intelligence, but it didn't live up to the hype. I saw an enemy medic pick up a wounded soldier to carry him to safety in Far Cry 2 and was impressed by the action, but until I play the final game myself and see that sort of behavior manifest consistently, I'll take the promises of AI with a generous spoonful of salt.
I seriously agree with the skepticism. One thing that Far Cry 2 has going for its AI is that Crytek is not doing it. Far Cry had gaping holes in it and Crysis continues that trend (see my observations on Crysis at Post-Play'em.). That being said, I would seriously like to see the claims come true, of course. Anything that advances the technology of autonomous agent-based AI is cool with me.
Another gem from over at what is rapidly becoming our sister-site, AIGameDev.com - this is the result of a discussion that started a few weeks amongst the site regulars.
Of the top 5, I'm the most excited about an increase in sandbox games and emergent behaviors. Really, I see these two as almost interlinked. Sandbox games not only allow emergent behavior to proliferate - they almost require it to do so in order to keep immersion.
Likewise, interagent cooperation was another of the top 5 on the list. Again, this is something that I see as related to emergent behavior. If you leave your cooperation loosely defined rather than pre-scripted, you will see a lot of emergent behavior as a result.
I hope to get more a feel about this very topic at the GDC roundtables and lectures next month. That is always a great way to take the pulse of the industry. Anyway, good stuff on the list.
I hate glomming on to a blog chain, but I'm going to link to AIGameDev's article on an article (which may very well be about an article.) The title is Watching Level Designers Use Scripts to Disable Your Autonomous AI: Priceless - which just about covers it. Alex does a nice job of not just reporting on it, but explaining the mindset and even the things to watch out for.
Regular readers of my other blog, Post-Play'em will know that I talked about the idea of scripts over-riding AI behaviors in Call of Duty 2 in a post entitled Call of Duty 2: Omniscience and Invulnerability. Specifically, this was in reference to one of the behaviors mentioned in the other article where an AI agent takes on a temporary god-like quality of invulnerability until such time as he finishes a scripted event - at which time he is no longer important to the level designer's wishes and is cast back into the pot of cannon fodder so that I can mow him down properly.
Getting back to the initial topic, my thought is that part of the issue between artists/level designers and programmers may very well be that the level designers don't have a trust in the capabilities of autonomous AI agents... or even and understanding of what could be done with them.
For example, with the use of goal-based agents such as those found in F.E.A.R. (related post), rather than a designer saying "I want the bot to do A then B, then C on his way to doing the final action of D." he could simply tell the goal-based agent that "D is a damn good goal to accomplish." If constructed properly, the agent would then realize that a perfectly viable way of accomplishing D would be via A-B-C-D. The difference between these two methods is important. If C is no longer a viable (or intelligent looking) option, then the scripted bot either gets stuck or looks very dumb in still trying to accomplish D through that pre-defined path. The very nature of planning agents, however, would allow the agent to try to find other ways of satisfying D. If one exists, he will find it. If not, perhaps another goal will suffice.
The problem is, while AI programmers understand this concept (especially if you are the one who wrote the planner for that game), level designers and particularly artists, may not have an intuitive grasp on this. They are cut more from the cloth of writers - "and then this happened, and then this, and then it was really cool when I wrote this next thing because I wanted the agent to look smart, and then this..." That is being a writer - and is why many games continue to be largely linear in nature. You are being pulled through an experience on a string of scripted events. (See related post on Doom 3's scripting vs. AI)
So, can the problem of designers trumping AI programmers be solved? It will always be there to some extent. But education and communication will certainly help the matter.
Wow... and I was complaining about the lack of AI sessions at the upcoming Game Developers Conference. It was just announced that Ray Kurzweil, inventor and AI luminary, will be presenting a keynote speech at the GDC in February. I plan on catching that session!
Among other things, he runs the website KurzweilAI.net which just has a rediculous amount of news about all facets of AI, technology, and even some psychology. I would very much recommend people check out the site.
I've been watching with interest as some of the recent game reviews have been (briefly) touching on the AI of the games. As a brief aside, it's annoying that a reviewer can spend 2 paragraphs on the purty graphics and 2 sentences on the AI. Yet, you could shave 20% of the graphics quality and it wouldn't hurt the gameplay experience too much. Add 20% to the AI and it may affect the gameplay a significant amount. Keep that in mind as you read these excerpts.
Matters aren't helped by a number of other irritations. The unit pathfinding is dim-witted, with units frequently getting stuck, taking the long way round or sometimes just rotating in place.
That doesn't sound promising at all. This is sad, too. The original Empire Earth was very noteworthy because of its AI. In fact, those in game AI circles know full well that many a whitepaper was written on some of the techniques that they used in the game. That being said, Mad Doc software, current custodian of the EE franchise, is headed up by Dr. Ian Lan Davis who has a doctorarte from Carnegie Mellon University in Artificial Intelligence and Robotics. That doesn't seem to jive with the above observation about the unit AI. I haven't played EE2 or EE3, but I remember hearing similar comments about EE2. I may just pick them both up to observe.
That is, when you’re not hiding in the shadows trying to be Sam Fisher or Solid Snake. Stealth tactics play an important role in the game, but in a gory game like Manhunt 2, this feels a little out of place. I mean, it’s obvious Daniel doesn’t want to get caught… It also doesn’t help that the A.I. is as dumb as a sack of bricks at times, meaning that if you just slightly slip into the shadows, it’s as if you’ve disappeared off the face of the Earth. And really, when you’ve got a bunch of people hunting you down to silence you, you’d figure they might try a little harder.
I thought this was interesting. For the past 4 or 5 years there has been some interest in sensory systems such as were exhibited in Theif and Splinter Cell. It seems (just from this quote) that Manhunt 2 is trying to do that as well. However, while analyzing light vs. shadows is an important aspect of stealth work, that is only part of the solution. Where the developers may have stopped short is building in a bit of "urgency momentum" into their AI agents. That is, if you are truly searching for someone, you are specifically going to check the dark areas.
This is something that it looks like Rockstar wanted to address... at least according to this review:
Coupled with the enhanced AI of hunters in Manhunt 2 will be the fact that even in the darkest of shadows, your character will not be totally safe. In the original Manhunt, often you found yourself safely concealed in darkness inches away from a hunter, which was a tad unrealistic. This is a thing of the past with Manhunt 2 as now, even with total darkness and complete stillness, hunters can still detect you and drag you out into the open for the kill.
Note that the above is future tense - that is what Rockstar said they were going to do. Take that with a large block of salt coming from any studio. Continuing from the same review however, is an interesting caveat...
The way Manhunt 2 will portray this is via a mini game of sorts - if you're well hidden in darkness but a hunter suspects your presence, you will have to successfully complete a series of button presses to avoid detection. While this is not exactly the most innovative idea around, it should keep you on your toes knowing that no matter where you are, in Manhunt 2, you are never completely safe. Of course, detection won't necessarily mean game over, but it will definitely make survival much harder.
The enemy AI is also mostly competent, working as a team and retreating when injured. However, tangos usually leave part of their body exposed when hiding behind cover, meaning skirmishes are seldom a lengthy affair.
This looks generally good news. It's always nice to see group behaviors rather than simply a collection of individual ones. I wish I knew what "working as a team" means, however. A lot of that can be faked. Are they providing cover fire while others are moving? Are they flanking you? There's so much unsaid there.
Retreating when injured is such a simple thing to do - but I give it kudos because it's an obvious - almost instinctual - behavior that designers seem to leave out more often than not.
The issue of using cover is a little harder to pull off properly. But I don't want to fault the AI programmers on something that may very well have been a designer decision rather than the inability of the programmers. I will leave that alone.
But also, gone are the days of stupid zombies. The AI in the game is very well done. They will coordinate attacks, throw things at you, position themselves to corner you, basically all the things that can be done in real life.
This is in the similar vein as Kane & Lynch above. What do they mean by "coordinate attacks?" Still, this is promising to hear about. I also like the idea of the AI "cornering you". If that's true, that shows that they are doing some analysis of the "terrain" to determine either choke points or exit routes. I would like to see if this is the case.
I left the last sentence in there for a reason - "all the things that can be done in real life." While I doubt that is the case and chalk it up to oversimplification by the author, I do like the idea. After all, isn't that what we are looking for in our game AI? Isn't that the whole point?
Let's hope we keep moving forward... and maybe eventually we will get there. I will do my part!
I made a comment/rant on the post myself, which I will repost here just for the sake of saking.
I think part of the problem that continues to be the fence between the game AI world and academia is the game worlds continued insistence that we have to strip down our AI to "fake AI" in order to wedge it into games.
I'm getting tired of the rubber stamp statements that "our players don't want realistic behaviors... they want FUN behaviors!" And yet, in review after review of the latest games, people bitch about the AI not being realistic enough. We hear it. We acknowledge it. But when it comes to developing the next cycle, the edict from on high is "we don't have enough clock cycles to do that nifty XYZ technique."
As Moore's Law trips merrily along from year to year, we have more and more processing available to us. In theory, that should give us, as game developers, the overhead we need to close the gap between the need for 60 FPS in our games and the academics who don't really care if they are rendering their half-ass, low poly bots at 4 FPS.
Another point on this subject... I'm sick of hearing designers - and even AI programmers - make the statement "but it's not predictable!" about agent-based, emergent AI. Uh... isn't that the point? Again, look at the reviews and the comments from our customers. "The AI sucks because it is too predictable." Even the implication via statements such as "you can beat this level by doing XYZ to the AI because..." means that there is a shallowness to our creations. Why? Is it because we are lazy and don't want to write more complicated code? Is it because we are scared of the unpredictability of non-deterministic models? Is it because our designers would better be served writing static movie screen-plays than game levels? What holds us back?
I'm not saying that academia is the answer. Sometimes it seems that they can get so wrapped up in an esoteric sojourn that they cease to realize that what they are doing is not even remotely relevant. However, some of the concepts and techniques that they take the time to explore (because they don't have producers and ship-dates) are things that can map over into the game world. And, if we are truly interested in putting realism into our games (which can be fun for the player!), then what academia comes up with should be noted by us. Adapted maybe, but noted nonetheless.
Alex at AIGameDev has a great essay up entitled "Memento, Temporal Coherence and Debugging Planners". In it, he talks about how planning algorithms have the problem of having their assumptions about the world fall quickly out of scope as the world changes. One solution is to continually replan from scratch - which can become quite expensive to do for numerous agents.
He offers a couple of solutions - and the comments on the post have turned into a rather interesting discussion on the caveats and possibilities. Check it out!
I was Stumbling through AI sites on the web when I ran across this little creation called "Parasites" by Michael Battle. It's an app of a very simple "a-life" mechanism. It's almost reminiscent of John Conway's "Game of Life" in that it is a collection of very simple rules that then turns into seemingly complex looking behavior. (In fact, see below for another entry from the same site that is based on Conway's life.)
The parasites follow the following rules:
Continue forward until you discover another parasite of a different colour and of equal or lesser size
Once a suitable target parasite is found, follow it.
If you manage to get close enough, take a bite out of it
When eating others, grow in size.
If size gets too big, dissolve into two child parasites of the same colour
If someone is eating you, shrink in size.
If size gets too small, die
The bigger you are, the faster you can move
(I recommend looking at it a few times before continuing with reading this. Remember to click on the app to reset it otherwise you will end up with parasites that are all the same.)
While I like looking at it and it is mezmerizing for a while, there are some things I would love to see added to it. Most of them come from Craig Reynolds' work with steering behaviors.
For example, I would like to not see the parasites overlap but rather avoid each other. Also, while the parasites will turn toward and follow potential food, there doesn't seem to be a mechanism in place to have smaller parasites run away from predators at all. Lastly, it would be nice to see some group behaviors - perhaps a certain color of parasites could tend to be in a group using flocking algorithms.
I like what Michael has done but it would be nice to see more out of this very basic simulation.
Tri-Life
On a slightly different note, Battle has done another project that IS very much like Conway's Life. This one, called "Tri-life" is a little less satisfactory. In it, he uses the RGB color components of the neighboring triangles in a sort of "Rock-Paper-Scisors" battle . The winner gets to propogate its color to the loser. The full rules are:
To get your head around the Combat phase, you’ll first need to know the overarching rule that Red conquers Green, Green conquers Blue and Blue conquers Red.
… Red > Green > Blue > Red …
The pseudocode for the process looks like this:
Figure out if I’m predominantly Red, Green or Blue by looking at my hex components.
Find the average colour of my three adjacent Triangles and find their predominant colour.
If we both have the same predominant colour, set my colour to the average between me and them.
If I win the fight, set my most dominant colour component to max (255) and my least dominant colour component to zero.
If I lose the fight, set my least dominant colour component to max and my most dominant to max
I like the attempt to add more than just "alive or dead" to the possibility space and almost incorporating a sort of genetic component. I do find it fascinating to watch the relatively stabilized blobs of color with all the fighting going on at the edges. It really reminds me of a sort of influence map.
OK... I'm liking where these guys are going with this. This is a description of some of the natural behaviors that are being used in the upcoming game, "Warhound". I admit I haven't heard about this game until now, but I'm definitely impressed with what I see here. They don't talk about the AI design/programming techniques that they use (and I don't blame them), but they mention some of the resultant behaviors.
Make sure you click on the video link. It will show you how the AI uses the cover of a large crate to attack the player in a variety of ways.
Thanks to Alex Champandard at AIGameDev for the link.
The author makes some great points. One is about the wall that developers seem to run up against: We can make for some great "live" behavior that looks new and fresh - until we run out of assets (via space on the CD or dollars in the budget) and we start to repeat those fresh behaviors. At that point, the facade is exposed and things start to get stale. It goes to show that, at least with today's technological limitations, the Turing Test will always fail as long as there is no time limit on the test. Until we can break away from entirely designer-constructed content, our AIs will eventually expose themselves
The second point is something that is actually born from the past when we couldn't stuff a lot of fresh content into our agents - we faked it. He points to a technique that has been used over and over: let the player's mind be the best brush for coloring in the AI. There is a lot of power in that. However, one caveat is that we can't necessarily tell what the player is going to be thinking. Sometimes this is good and sometimes it can make for disappointment. Still, it makes for a lot of fleshing out of the perception of our AI without a lot of effort.
The solution seems to be a constant balancing act between two extremes. What really needs to be modeled in great detail and what can I fake entirely? Aahh, such is the quandary.
Anyway, I enjoyed the reading and personally plan to keep checking on neuRAI. Good work so far!
Ever wonder what it may look like to see the computer opponent in chess working on its moves? This site has done just that. By simply playing a game of chess against the computer opponenent, you get to watch as it itterates through the minimax decision tree.
One thing that's interesting to see is how the flow lines change as the game progresses. I wish there was more detail about exactly what the color and strength of the lines meant. I also wish that you could compare how the flow lines changed from one move to the next so that you could see how you may have completely shut off certain strategies - or made them less valuable. Still, it's kind of interesting to watch!
There is a gallery page that shows some mid-game shots as well so you don't have to play through a full game to see how it looks toward the end.
According to this blog posting on an MMORPG blog, a development team working on "The Chronicles of Spellborn" has some ideas on how to make mob AI a little more engaging. The post points to an entry in CoS's development journal. I need to do a bit more reading on the game and their ideas (the article is a little sparse on details) but at least their hearts are in the right place.
One interesting point that fell out of the comments on that journal is that people are actually worried that the behavior will become predictable. That was startling to me since the concept they were proposing actually makes the behavior less predictable. One example cited was that most MMO mobs will attack the player that attacked them ad nauseum (predictable and shallow). The CoS mob will break off that one player that attacked them and go after the weakest player in the raid group. Yes, that's somewhat predictable, but only because it makes sense.
One of the comments in the journal responded that the idea was "brilliant". To me, the idea is bloody obvious. And really, it's not all that hard or computationally expensive to implement. I just don't see why MMO AI hasn't advanced beyond where it is right now. *sigh*
I was browsing around on various AI sites, and I came upon a link to a presentation titled "The Illusion of Intelligence: The Integration of AI and Level Design in Halo" that was given at the Game Developer's Conference in 2002 by Chris Butcher and Jaime Griesemer of Bungie. That was the year of my first GDC, but I can't remember if I made it to this session or not. I tried to hit every AI session there was, but sometimes there were conflicts. I actually probably have my 2002 GDC stuff around here with the session list and map - I bet I checked it off. Enough musing about my conference history, however.
The presentation is an interesting in that it provides a peek into some of the design mindsets of the developers. They fully admit that AI cheating and "faking it" is a viable methodology - and that the player will usually buy it because they want to.
Like it or hate it, Halo was and is a prominent fixture in the game world - and this presentation gives a great peek inside for AI developers and players alike. Since it was a GDC lecture, there isn't any serious code to wade through. Because of that, it's something that can be digested by a wide audience with only the occasional stumble over esoteric industry terminology. It's a good read.
According to reviews of "Pro Evolution Soccer 2008" from Konami, there is now an adaptive AI component. This system, called "TeamVision", aparently learns the way you play. If you always use the same tactics, it will start taking advantage of them - both on offense and defense. Every review site I have looked at has a similar blurb to that effect, but I have yet to see any technical description of how they are accomplishing it. More research is necessary!
If you have run across information on this game and specifically the "TeamVision" adaptive AI system from Konami, please let me know so I can follow up.
The group wants games to be more engaging by having emotional, not just coolly calculating, computer players. Instead of just challenging your rational planning and decision skills, you'll have use your emotional intelligence too.
I am also very interested in the inclusion of psychology into the AI of computer games and simulations. I am very well versed in psychology and emotional response. However, I'm not entirely sure whether they proved any point here. They could claim that it was their model, which simulated "the big five" emotional dimensions to personality recognised by psychologists. On the other hand, it could very well be game design decisions or poor AI.
"Age of Mythology" was the follow up to the "Age of Empires" series. Those games were not well known for their AI prowess. (In fact, when lead designer Rick Goodman left to found Stainless Steel Studio, the bloodline was improved significantly with Empire Earth which was known for its AI. I'd love to see their neurotic bots take on that game.) Additionally, there are so many combinations of how the bot AI designed by the researchers could match up with the AI for AoM, that simply balancing those two alone would be daunting. Some very simple arbitrary choices about coefficients used in decision making could have skewed any other data one way or the other. I'm not discounting their research, but as a simulation modeller, I know the challenges involved in creating a multi-variate system such as this.
On the other hand, I think it just says more about what Ensemble did - or did not do - with the game design and AI of "Age of Mythology".
Movement in a dynamic world - especially with hostile entities and constantly changing safe and danger zones - is a dicey issue in game AI. AIGameDev.com has posted a great article about some work by Leslie Ikemoto from the University of Berkeley that I believe has some great future relevance to the game industry.
Although it is 153 MB, make sure you download the video file that shows the agents in motion. Great stuff!
Once again, Alex Champandard at AIGameDev.com has posted another entry in his Reviews section. This review is on the very novel and groundbreaking AI of the FPS game, F.E.A.R.
As he typically does in his technical reviews, he specifically identifies 29 tricks to use in games. As with "The Sims", a major component is that of "smart objects". Also, how the AI agents in the game use those objects is very impressive. I've only played the downloadable demo of F.E.A.R. but I was impressed quickly by how the agents appeared to work together and with their environment. I would like to play the game further and then re-read this technical review.
As always, make a point of looking at the references section of his post. That is where the meat is.
Alex Champandard over at AIGameDev.com has posted a technical review of the AI for "The Sims". This is a fantastic article listing 21 tricks that can be used, at least in theory, in game AI development.
Please notice that Alex has put references at the end that point you to the source material - which is always good reading.
I happened upon this article about how LA is using a serious game to train firefighters on how to handle fires without getting into unnecessary danger.
The Serious Games movement is a very valuable addition to the possibilities of game development... especially in the AI realm since much of it involves realistic simulation of behavior and environment. This is definately a direction that IA would like to go in at some point. (not into a fire... that would be silly!)