Advertisement Jump to content
  • Advertisement
  • 11/13/17 05:04 PM

    How Artificial Intelligence has Shaped the History of Gaming

    Artificial Intelligence

    GameDev.net

    This is an extract from Practical Game AI Programming from Packt. Click here to download the book for free!

    When humans play games – like chess, for example – they play differently every time. For a game developer this would be impossible to replicate. So, if writing an almost infinite number of possibilities isn’t a viable solution game developers have needed to think differently. That’s where AI comes in. But while AI might like a very new phenomenon in the wider public consciousness, it’s actually been part of the games industry for decades.

    Enemy AI in the 1970s

    Single-player games with AI enemies started to appear as early as the 1970s. Very quickly, many games were redefining the standards of what constitutes game AI. Some of those examples were released for arcade machines, such as Speed Race from Taito (a racing video game), or Qwak (a duck hunting game using a light gun), and Pursuit (an aircraft fighter) both from Atari. Other notable examples are the text-based games released for the first personal computers, such as Hunt the Wumpus and Star Trek, which also had AI enemies.

    What made those games so enjoyable was precisely that the AI enemies that didn't react like any others before them. This was because they had random elements mixed with the traditional stored patterns, creating games that felt unpredictable to play. However, that was only possible due to the incorporation of microprocessors that expanded the capabilities of a programmer at that time. Space Invaders brought the movement patterns and Galaxian improved and added more variety, making the AI even more complex. Pac-Man later on brought movement patterns to the maze genre – the AI design in Pac-Man was arguably as influential as the game itself.

    After that, Karate Champ introduced the first AI fighting character and Dragon Quest introduced the tactical system for the RPG genre. Over the years, the list of games that has used artificial intelligence to create unique game concepts has expanded. All of that has essentially come from a single question, how can we make a computer capable of beating a human in a game?

    All of the games mentioned used the same method for the AI called finite-state machine (FSM). Here, the programmer inputs all the behaviors that are necessary for the computer to challenge the player. The programmer defined exactly how the computer should behave on different occasions in order to move, avoid, attack, or perform any other behavior to challenge the player, and that method is used even in the latest big budget games.

    From simple to smart and human-like AI

    One of the greatest challenges when it comes to building intelligence into games is adapting the AI movement and behavior in relation to what the player is currently doing, or will do. This can become very complex if the programmer wants to extend the possibilities of the AI decisions.

    It's a huge task for the programmer because it's necessary to determine what the player can do and how the AI will react to each action of the player. That takes a lot of CPU power. To overcome that problem, programmers began to mix possibility maps with probabilities and perform other techniques that let the AI decide for itself how it should react according to the player's actions. These factors are important to be considered while developing an AI that elevates a games’ quality.

    Games continued to evolve and players became even more demanding. To deliver games that met player expectations, programmers had to write more states for each character, creating new in-game and more engaging enemies.

    Metal Gear Solid and the evolution of game AI

    You can start to see now how technological developments are closely connected to the development of new game genres. A great example is Metal Gear Solid; by implementing stealth elements, it moved beyond the traditional shooting genre. Of course, those elements couldn't be fully explored as Hideo Kojima probably intended because of the hardware limitations at the time. However, jumping forward from the third to the fifth generation of consoles, Konami and Hideo Kojima presented the same title, only with much greater complexity. Once the necessary computing power was there, the stage was set for Metal Gear Solid to redefine modern gaming.

    Visual and audio awareness

    One of the most important but often underrated elements in the development of Metal Gear Solid was the use of visual and audio awareness for the enemy AI. It was ultimately this feature that established the genre we know today as a stealth game. Yes, the game uses Path Finding and a FSM, features already established in the industry, but to create something new the developers took advantage of some of the most cutting-edge technological innovations. Of course the influence of these features today expands into a range of genres from sports to racing.

    After that huge step for game design, developers still faced other problems. Or, more specifically, these new possibilities brought even more problems. The AI still didn't react as a real person, and many other elements were required, to make the game feel more realistic.

    Sports games

    This is particularly true when we talk about sports games. After all, interaction with the player is not the only thing that we need to care about; most sports involve multiple players, all of whom need to be ‘realistic’ for a sports game to work well.

    With this problem in mind, developers started to improve the individual behaviors of each character, not only for the AI that was playing against the player but also for the AI that was playing alongside them. Once again, Finite State Machines made up a crucial part of Artificial Intelligence, but the decisive element that helped to cultivate greater realism in the sports genre was anticipation and awareness. The computer needed to calculate, for example, what the player was doing, where the ball was going, all while making the ‘team’ work together with some semblance of tactical alignment. By combining the new features used in the stealth games with a vast number of characters on the same screen, it was possible to develop a significant level of realism in sports games. This is a good example of how the same technologies allow for development across very different types of games.

    How AI enables a more immersive gaming experience

    A final useful example of how game realism depends on great AI is F.E.A.R., developed by Monolith Productions. What made this game so special in terms of Artificial Intelligence was the dialog between enemy characters. While this wasn’t strictly a technological improvement, it was something that helped to showcase all of the development work that was built into the characters' AI. This is crucial because if the AI doesn't say it, it didn't happen.

    Ultimately, this is about taking a further step towards enhanced realism. In the case of F.E.A.R., the dialog transforms how you would see in-game characters. When the AI detects the player for the first time, it shouts that it found the player; when the AI loses sight of the player, it expresses just that. When a group of (AI generated) characters are trying to ambush the player, they talk about it. The game, then, almost seems to be plotting against the person playing it. This is essential because it brings a whole new dimension to gaming. Ultimately, it opens up possibilities for much richer storytelling and complex gameplay, which all of us – as gamers – have come to expect today.

     



      Report Article


    User Feedback

    Create an account or sign in to leave a review

    You need to be a member in order to leave a review

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    There are no reviews to display.


  • Advertisement
  • Advertisement
  • What is your GameDev Story?

    In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

    (You must login to your GameDev.net account.)

  • Latest Featured Articles

  • Featured Blogs

  • Advertisement
  • Popular Now

  • Similar Content

    • By DevBlazer
      Hi all, I am currently playing around with making a 2D underwater survival game (pet project, not too serious) but I need someone I can sit with for like an hour or so, to help me flesh out some reasonable mechanics for the behavior of liquids and gases in relation to gravity, pressure, etc. (Sorry guys I totally failed science class and have no intention of studying it now).  There obviously has to be a balance between what I'm willing to code for and realism and then assistance with understanding some mechanics and how their formulas, etc would work.

      Again, I'm not trying to recruit anyone here, just looking for someone knowledgeable to have a friendly chat with for a little while.
       
    • By lougv22
      I am currently an indie game developer and I am looking to get a job with a game company as a game programmer. I worked for a game studio 9 years ago, but at the time I decided to get a day job as a software developer (non-game development), while focusing (as an indie developer), during my free time, on a vision for a game I've had for some time.
      This was then, but i've recently found myself unsatisfied with my day job and I am now thinking of going back to the game industry. The drive to make games is just too strong in me and I can no longer justify spending my days making software I am not excited about. Which leads me to my questions about a game programmer portfolio. Before i first got a job at a game studio i had built a couple of small games, this was way back though, around the year 2006. Would those be too old to showcase on a portfolio?
      Second question, i'd like to make the indie game i am working on available for potential recruiters to play, but I am not sure how to do that. I tried to put it up on Shimmer.io (kind like itch.io, but not as popular), but i ran into issues with that. It's a Unity game and the Web build i created for it was about 190 MB and it ran slowly and was very choppy on my machine, at which point i kind of gave up on the idea of putting it up online. The other option is to simply send (through email or Google drive) game companies a regular Unity build and let them play it that way. The question is, should i try to go the Web build route again and if so, any tips on making it work well this time? And also, if the Web build doesn't work again, would it be acceptable to send companies i apply for a regular build?
    • By IronicallySerious
      I have dabbled into almost every single field of study that goes into making a game. Currently, I am a sophomore and I made 2 VR titles and 1 non-VR. Next, on my journey, I went on to create a 2D game engine with very basic but "Turing complete" features. 
      Having experienced a small piece of everything that there is I am finding it very difficult to commit all of my efforts into a single field. I loved my time making gameplay systems, playing with OpenGL, creating 2D basic physics simulations and making sound engines and the regular engine stuff.
      How should I decide what I should go deep into? I am aware of the fact that the industry doesn't really look for complete package candidates for job/internships because normally they tend to get a small task which is dependent on a small section of the game (generally speaking).
      I kinda want to maximize my chances of landing somewhere good so I am trying to make a very planned approach from the beginning. I am 3 semesters in my CS major (out of 8 semesters) and the time for looking for internships is getting close. This is really bugging me because I am also the only one around here that is interested in making a career out of gamedev. If I continued to get demotivated like this I may just hop on to one of the "fad" tech nowadays like Machine learning and Cloud etc., which I see as a waste of my effort from the past 4 years to get to a point where I am able to explore gamedev to this considerable extent.
    • By Geonamic
      You know those single player RPGs that you have a ton of fun with, but when you're completely done, there's not much of a reason to do another playthrough, aside from self-made challenges, nostalgia, and perhaps understanding the story better? That's why I'd like to have this thread dedicated to thinking up an idea that involves competition with other players through an online server that is NOT simply your team versus another player's team.
      An idea I had was have randomly selected party members, who have randomly selected gear/items, fight a certain amount of randomly selected enemies per battle, and for every win, you get points. Throw in a time bonus for winning under X minutes/seconds to get even more points. Once you get a game over, your record gets submitted to an online server for X total battles/X total points, so players can compete for the highest score. The more wins a player racks up, the more enemies are present in future battles. I can see how randomly selected party members, gear, items, and enemies per battle could screw you over if you have bad luck, but I thought it'd also be too boring to retry for a higher score with everything being similar, so that's why everything is random.
      Do you think this idea works? Do you have any input to polish it up? Can you think of another idea that'd be even better for the concept of player competition?
    • By zqf
      Hello.
      I'm working on a project to teach myself network programming and the little game I have in mind is a coop arena shooter.  A fast moving game, lots of simple enemies and projectiles frequently spawning and dying. I've been reading what I can find about synchronising the game state (snapshots, delta compression, update prioritisation), but this mostly relates to objects that already exist, not how to deal with a high volume of new objects coming and going.
      Does anyone have any suggestions/advice relating to this kind of problem?
      My thoughts so far are based on using what determinism I can and playing the game back as as sequence of events as best I can. Eg if I want to spawn a spread of a dozen projectiles I can reconstruct all of them from the initial condition of the first plus a random seed or index to some kind of predefined pattern that might deterministically recreate the whole group. This combined with trying to do as much movement as possible via paths that can be interpolated (so a spawn event can be played up to the right position on the client when received and just played forward with every tick without direct synchronisation except in the case of death) so even if the event is received late it can be easily wound forward
      If I'm barking up the wrong alley here I'd love to know! Thanks.
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!