1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Gaming What the hell is videogame AI anyway?

Discussion in 'Article Discussion' started by Combatus, 16 Jul 2014.

  1. Combatus

    Combatus Bit-tech Modding + hardware reviews Lover of bit-tech Super Moderator

    Joined:
    16 Feb 2009
    Posts:
    2,761
    Likes Received:
    89
  2. edzieba

    edzieba Virtual Realist

    Joined:
    14 Jan 2009
    Posts:
    3,909
    Likes Received:
    591
    No, the goal of STRONG AI, in a RESEARCH environment, is sentience. The goal of AI research everywhere else is creating systems that can solve problems in uncontrolled environments with a minimum of manual pre-programming. That goes for flight control computers able to deal with the loss of control surfaces, vision system that can identify objects that aren't placed directly ahead in a specific area with even lighting, etc.
     
  3. Donteatmypanda

    Donteatmypanda What's a Dremel?

    Joined:
    2 Mar 2011
    Posts:
    12
    Likes Received:
    0
    Half life was the last time game ai excited me... Lets hope alien isolation can break the mold a wee bit.
     
  4. D B

    D B What's a Dremel?

    Joined:
    11 Apr 2004
    Posts:
    318
    Likes Received:
    1
    the AI in the first FEAR was good .. I don't know what the hell happened to it the substituent ones ... disappointing is too weak a word
     
  5. Gunsmith

    Gunsmith Maximum Win

    Joined:
    23 Sep 2005
    Posts:
    9,853
    Likes Received:
    2,484
    FEAR is often mentioned in AI discussions but it was just an amazing use of smoke and mirrors as well as level design.
     
  6. SchizoFrog

    SchizoFrog What's a Dremel?

    Joined:
    5 May 2009
    Posts:
    1,574
    Likes Received:
    8
    I don't get the praise for the AI in F.E.A.R at all. I absolutely loved the game it has to be said and I played it through time and time again but the AI was non existent. You walked through a series of corridors until you heard the 'baddies' talking over their radios and you instantly new that around the next corner you would have a gun battle. Apart from a couple of occasions, if you stopped walking as soon as you heard the radios the 'baddies' never came looking for you which after all, was exactly what they were supposed to do.
    You could even work out 'markers' that set off a series of events such as when the invisible guys would appear and either ran away without you ever being able to shoot them or they attacked you in a very pre-defined routine of movements.
    Another thing was that you could even count the bullets that it took to take down one of them, especially once you got the 'bolt' gun that usually pinned people to the wall (I LOVED that gun) and so I used to be able to count my bullets and know how many baddies were coming up and where, then plan my attack strategy.
    Things never changed, the bad guys never reacted and responded to the differences in how you played the game as they either stayed where they were or their whole group engaged until the last one was dead and you carried on walking through to the next battle. Not a single guy ever ran off... and although they nearly always screamed out 'He's here... Back up... WE NEED BACK UP!', no back up was ever forth coming.
    So my point is, where exactly is this AI I hear about?
     
    Last edited: 17 Jul 2014
  7. Bede

    Bede Minimodder

    Joined:
    30 Sep 2007
    Posts:
    1,340
    Likes Received:
    40
    Image links should be changed from .jps to .jpg.

    "the AI searches for the players presence but it's actively aware of their location."
    >>would have thought that the AI would be searching for the location while aware of player presence.

    Dwarf Fortress appears to have pretty interesting AI, and is rather more developed than Maia or Clockwork Empires.

    ----

    Other than that... AI is a catch-all term like netcode. Better to break it down to RTS AI, TBS AI, FPS AI etc.

    Pathfinding is a pretty key element of most game AI. Anyone who made maps for old CnC games, or tried introducing bots to a game like Natural Selection knows the pain of creating paths for AIs.

    In a game of Medieval 2 Total War I accidentally trapped the Timurids in a moment of indecision by fortifying all the cities and bridges near where they spawned to such a degree that even they were unwilling to attack them. So 8+ full stacks of Timurids and at least the same number of my own troops sat around in a stalemate until the end of the game.

    FPS AI is (to my mind) rather easier than a strategic AI. The bot usually has one task - shoot the player, and it's relatively simple to introduce an element of random deviation into their targeting to keep the player happy. Where it falls down is getting bots to accomplish more complex tasks - hence the scripted companion AI sequences we see. Portal 2's, truly "on rails", Wheatley was pretty sound commentary on this.

    RTS AI developers have perhaps the easiest job initially, but the hardest to improve. Success in most RTS games is heavily dependent on macro build orders combined with good micro. Build orders can be programmed, micro comes relatively easily to AI (see that Starcraft 1 swarming Mutalisk AI built by that American university). The trouble has always been that (like playing the same player over and over again) players learn the AI's various routines, and countering becomes natural.

    As in all things gamey, the player's experience is key. Paradox appear to have largely overcome the AI problem of mundanity through sheer complexity - the number of AI actors in the worlds they create make the system so complex that the outcome is always different.

    Perhaps what we need is a John Carmack of game AI...
     
  8. tupera

    tupera What's a Dremel?

    Joined:
    1 Nov 2008
    Posts:
    39
    Likes Received:
    0
    Even before I finished the 1st paragraph, I was thinking of F.E.A.R.

    I have to disagree with SchizoFrog. While it's been a while since I've played F.E.A.R., I do remember the AI spotting your flashlight if it's on even before you rounded the corner. I also liked that if you entered a room stealthily, you could pick off the 1st unsuspecting guy, but then all others were harder to kill because they were now "alert".
     
  9. ferret141

    ferret141 Minimodder

    Joined:
    18 Oct 2010
    Posts:
    1,314
    Likes Received:
    40
    What do you guys think of the AI in the first FarCry game?
    If I remember correctly it was the first game I had encountered AI that would flank you and try to attack you from multiple directions simultaneously.
    Then again I was young at the time and easily impressed so I could be wrong.
     
  10. PaulJG

    PaulJG Minimodder

    Joined:
    20 Mar 2009
    Posts:
    136
    Likes Received:
    7
    That was an interesting article.. for me it was Doom 2 that made me sit up and take notice of game AI (missed out on the first doom) - you could orchestrate a mass brawl between the AI monsters with a sneaky shot.

    Agree with ferret above, farcry had some pretty clever AI - as did Black and White.. after that - yeap - it does seem things have been dumbed down, But is that because these days they are all using the same game engines, reusing the same in-built routines!?

    All too often you can see the same mistake.. hide round pillar.. AI starts to come round, you move slightly to the other side.. Z1>Z2 - so reverse the direction! - its just poor.
     
  11. Rob Lang

    Rob Lang What's a Dremel?

    Joined:
    23 Jun 2009
    Posts:
    9
    Likes Received:
    2
    There's quite a lot wrong with the "technological AI" side of this article, here are some corrections.

    No. Sentience is act of being able experience sensations. Sentience requires sensation of the world outside of the simulation, so isn't really just about AI, it's about robotics and AI together.

    No. Strong AI is about striving to make a machine intelligence indistinguishable from a human intelligence.

    No. This is a tiny subset of AI. I'll come onto why in a moment. Back to the article...

    What game AI is
    There is an area of AI called "Expert systems", which are probabilistic state machines (AKA Markov Models). They work like this: given your current state and a number of inputs, randomly choose a new state based on a probability. For example, if you're in the open and being shot, there is a 1% chance you'll run at the enemy, 60% change you'll find cover and 39% chance you'll just stand there and shoot back. Keep doing that for a few ticks of the game and then choose again.

    Expert systems in games are complex things and are not to be sniffed at. Most industrial computing (financial models etc) are state machines. By having each agent (bad guy) have slightly different percentages or behaviours, you can make them appear intelligent and more interesting to fight.

    What the rest of AI is
    Most of the rest of AI is the pursuit of one or more of the following:

    1. Learning: changing what you do given the environment and what you tried last time.
    2. Generalisation: I've seen a tiger and a leopard, I can see that a cheetah is like those.
    3. Clustering: grouping similar things together
    4. Classification: being able to tell the difference between a dog and a cat
    5. Association: understanding that the reason you're hot is that you're on fire
    6. Prediction: Having watched children's TV, you know that B follows A most of the time
    7. Reasoning: (deductive and inductive) You're either at home or at work. You're not at work, therefore you're at home.
    8. Problem solving: What steps do I have to do to achieve a goal? (This is what expert systems are really good for). Evolutionary computing also does this by trying lots of different solutions simultaneously and picking the best.
    9. Abstraction: That cloud looks like a bus (this is way more complex than just pattern matching as it requires experience).

    Uncontrolled environments
    Every environment is bounded. It is always controlled at least within the boundaries of physics. Even the most complex AI algorithms perform a transform to the input data before they go to work. That transformation seeks to smooth out the data to make it easier to use. Some AI works on non-stationary environments, which is like changing the goal-posts. For example, you have a UT2K4 shooter where people have been running around the levels for a decade. The AI learns the maps, understands what players are likely to do. You then add a mutator that does something extraordinary, the AI then has to cope with the changing environment.

    Emergent AI?
    Emergence isn't very complicated. If you have enough agents all with very simple rules, complexity can "emerge" where the algorithm designer didn't think it would. A really good example of emergence is Conway's Game of Life, which has the simplest rules you can think of by complex patterns appear to emerge. Emergent AI happens all the time in loads of games.

    A note about biological modeling
    A bunch of games use biological models (e.g. flocking or the A* path algorithm) that mimic how nature works. Those algorithms are clever but without Learning, Generalisation, etc, they're not really intelligent as such.

    Is proper AI used in games?
    Not really. Maia and Clockwork Empires look like complex state machines. If they are able to change their probabilities, that's a bit like AI but I imagine the changes will be linear (like in Black and White); that means that when you do X then it changes the behaviour a bit. Do it more, the behaviour changes a little more.

    Why not use academic/industrial-like AI in games?
    You don't need to. In programming, it's best to solve your problem with the simplest tools at hand. Coding and training AI algorithms takes a huge amount of time and your players aren't necessarily going to see the benefit when a well constructed Markov model will keep them guessing, entertained, surprised and delighted.

    Get the game out, keep it simple and make a profit. Players will appreciate content and features much more than the technical wizardry behind the scenes.

    This.

    Know for sure that a game uses industrial/academic AI?
    There might be a game out there that is proven to use AI that isn't an expert system, I'd be keen to hear about it! :)
     
Tags: Add Tags

Share This Page