Slashdot Mirror


Talking 'Bout Game AIs

Steven sent over an interview Feedmag has got with the lead AI programmer for Black & White. He talks about some of the creature/villager routinues in the game, which is interesting for the game, but also interesting in terms of how much the world of AIs for games has changed in the last few years.

9 of 133 comments (clear)

  1. Re:Graphics, AI, and the Gaming Industry by r · · Score: 3

    Seems to me that there would be a niche for a company to invest heavily in developing a flexible AI framework to be used in multiple games.

    several independent developers have tried that - and the game ai page has links to pretty much all game ai sdks attempted thus far.

    the problem is that while high-level ai can be pretty general, the low-level ai (pathfinding, collision detection, world physics) is completely tied to the internal representations of the world inside the game engine. it's a similar problem that you have in physics sdks.

    also, given the game development characteristics (18-month dev cycles, ai being one of the last steps in development because it requires a working game engine), it's rare for studios to design a game in such a way that a general solution like an ai sdk could be just 'plugged in' that late in the development cycle. unless the workings of the sdk are well understood, it's easier to just build your own (especially if you're not doing anything complex).

    on the other hand, if a company with a hit game licenses their ai engine to others, that would be a big step in the right direction - the same way that id and epic licensed their graphics engines after the success of quake and unreal. and sure, many studios will write their own anyway, but those who don't want to rewrite a* for the nth time could instead concentrate on writing high-level behaviors. :)

    --

    My other car is a cons.

  2. Re:CPU time vs human time by Black+Parrot · · Score: 3
    > The amount of human time required to develop and debug a proper AI, one that makes a significant use of computational resources, is enormous.

    IMO, machine learning (ML) is the way to solve this.

    And that's what Evans is doing here:
    When your monster does something good (or at least something that you want it to keep doing), your Divine Hand literally strokes it; when it does something incorrectly, the same Hand of God smacks it. Eventually -- ideally, anyway -- it grows into an active extension of your will...
    That's aka Reinforcement Learning. For decision trees, the feedback is the "evidence" that the tree has to explain, so presumably his system saves some/all of the feedback and intermittently updates the decision tree. If you give consistent feedback, it should converge to a point where your monster can guess what the outcome of an action is, and thereby avoid the smacks. As a side effect, it looks like it "knows" what you want. Similarly for perceptrons / neural networks.

    The bit about Moore's Law is certainly apropos. I recently ran a genetic algorithm program that searches for good solutions for the travelling salesman problem, and on a late model x86 desktop system the program was evaluating 1000 candidate solutions a second for a 2000 city problem. Our resource-intensive GUI desktops obscure just how fast our desktop supercomputers really are.

    Also, contrary to what someone suggested in another thread, games are not the state of the art for AI. You can easily find tons of papers on this kind of stuff with your favorite search engine, and in some cases download the code for the program described in the paper.

    That's not to knock it; games will probably be AI's killer app.

    --
    --
    Sheesh, evil *and* a jerk. -- Jade
  3. Re:Creature Learning? by Grendel+Drago · · Score: 3

    Have you been smacking the shit out of your creature when he does that? My creature ate a villager once, but I beat him stupid (it's a guilty pleasure... I'm good, honest!) and he hasn't done it since.

    -grendel drago

    --
    Laws do not persuade just because they threaten. --Seneca
  4. CPU time vs human time by Illserve · · Score: 3

    CPU's these days are more capable of provididing good AI than they are given credit for. In my opinion, it not a CPU bottleneck that has kept AI at .1% of system resources, rather it's design time. The amount of human time required to develop and debug a proper AI, one that makes a significant use of computational resources, is enormous.

    Therefore, it's done half-assed. I don't blame the developers for this, they are operating in a market in which the average selling game loses money, so they are under alot of pressure to cut corners. Truth to be told, a crappy AI is probably not going to cripple sales of your game too much (unless that's the central theme like B&W).

    We're going to need to see the computer industry actually become profitable before we see more decent AI like B&W.

    Note thet B&W was developed with personal cash from Peter, and therefore wasn't subject to the same tight budget/publishing requirements that most games are.

    It's a credit to Lionhead that they got the product out the door without a publisher breathing down their neck.

  5. Graphics, AI, and the Gaming Industry by FortKnox · · Score: 3

    Lets face it. Cutting edge graphics, and killer AI always show up in the gaming industry before anywhere else.
    They continue to impress us. Unfortunately, people think this is more important than gameplay, but I digress. Graphics were the fad the past few years, but perhaps AI will be the new fad for the coming years...
    I have a small background in AI, and I must say, I have played Tribes2 only once (had it since it was released), because I'm so extremely impressed with the AI for Black&White (if you haven't played it yet, go grab yourself a copy!!). Its a new type of addiction for me, because I'm not playing to see how far I get, or see how big my avatar will get, its to see what he does next when he's off my leash. Was he watching when I was throwing the rocks, and start throwing villagers? Was he watching me pickup and move villagers to do the same? Its one of the first games I enjoy playing without touching the keyboard... I just watch what he'll do next...

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    1. Re:Graphics, AI, and the Gaming Industry by r · · Score: 5

      Academia needs to make it more widely known to the software industry that stuff like this has been available.

      academia has been trying. :)

      there are (at least) two big problems in migration of ideas from research into development.

      1. time scales. as one developer put it, "if i want to use a new AI technique in a game, i have about two weeks to research it, and a month to implement it. any more than that, and i won't be able to justify the time spent on it to my boss."

      this is pretty standard in the industry, btw. otoh, it would take a skilled ai programmer easily more than a month-and-a-half to implement and debug an inference engine in C++. and you can forget about something like writing a compiler for building behavior-based networks - that takes too much time.

      2. different priorities. academic AI traditionally focuses on different things that games. in academia, working systems matter, but they're vehicles for the theories and techniques, which are the real crux of the matter. the programs can be slow, and they can consume vast resources, as long as they provide a novel insight into how human mind or human behavior works.

      games, otoh, run under tight performance constraints (ie. in a 30fps game, even with 10% of cpu available to AI, you have 3.3 milliseconds per frame to do all of your AI, including collision detection and pathfinding!), and its goal is not scientific insight, but believability - the creatures can be dumb as buttons, and they can be directed by simple finite state machines, so long as they look like they're doing something cool.

      with such different goals, it's not clear what can be done to bring the two closer together. for now we can just hope that if more game developers had formal training in AI techniques (as opposed to learning AI by hacking FSMs or NNs or whatever the fad-of-the-day is), and more academics were aware of constraints of the gaming industry, it would foster a better cooperation and exchange of ideas...

      It works well here, but be careful claiming this is anything bigger than excellent game AI using well-known techniques.

      amen to that.

      --

      My other car is a cons.

  6. A different take on Black & White by isomeme · · Score: 3
    The Brunching Shuttlecocks explain the lessons of Black and White.

    --

    --
    When all you have is a hammer, everything looks like a skull.
  7. Creature Learning? by Calle+Ballz · · Score: 3

    I threw one villager into the ocean. ONE! My creature happened to be standing nearby. Now even though my power is strong because I'm being worshipped by just about everyone, it sucks because I'm becoming an evil god now because my damn creature keeps throwing people into the ocean!!!

  8. The biggest problem I find with AIs... by Telek · · Score: 4

    is that they become predictable. Once you learn the exploits and how they work, the game is no longer fun. Take Alpha Centauri or Master of Orion 2, easily 2 of the best, if not the best, strategy games around (IMHO of course). However I can play both of them on impossible levels and win almost every time.

    And what really bugs me is that to make up for deficiencies in their AI, as the levels increase in difficulty, the computer just cheats more. I was abhorred when I found out first hand how badly the AIs cheated at the higher levels in the 2 aforementioned games.

    So what my question is, is this: How can this be fixed?

    I have a few ideas. One is that you need one that learns. Before you flame me about this, let's think about this for a second. We're not talking about an AI here that can learn how to write a novel, we're talking about relatively straightforward strategies and mechanical play in these games. I know that 95% of of my strategy for these games is down to an art, it's just an automated system until I get to the few points at which I need to make a new decision, or something new crops up. So if I can do this by a predefined strategy, then why can't the computer do that? Keep in mind too that the computer can simply try variations on it's current strategies, and see what happens. If I beat the computer 9 out of 10 times, and one time with some wierd method the computer CLOBBERS me, then hey, maybe it should keep that method around. Also the computer can play against itself, with many different strategies, seeing how each one works. Keep in mind here folks that the strategies that I'm talking about have a few variables: how fast do I expand? at what point to I build an army? how big do I build my army? When do I stop expanding? When to I attack, and who? These can be values that can be changed and experimented with, and hence the computer could learn.

    Secondly, one of the things I loved about Alpha Centauri is that just-about all settings were configurable through text files. This was amazing. You could make things easier or harder, change global settings, pollution rates, everything. You could even make new factions and trade them with your friends. If somehow settings for the AI were configurable this way, then people could learn how to tweak the AI to make it a more formidable opponent, and then share this information with others.

    Combining those two ideas, throw it on the internet. If you have 5,000 people that are connected (not necessarily at the same time), you can try out hundreds of thousands of strategies for the AI to see what works well, and then upgrade the AI. Actually I think that is a necessity. The AI needs to be easily upgradable, otherwise it'll just get boring as you learn how it works and you can cream the game.

    I'd love to hear some (constructive only please) comments about this, as it's been something I've been thinking about for a while.

    Want to check out about the new Master of Orion 3? Awesome stuff happening there. -- Telek

    --

    If God gave us curiosity