Enter your date of birth:

Year
Month
Date

OK

Sort


RSS

Cast Your Vote

Which friendship achievement will you (or have you) complete(d) first?

Blog Tags

Developer Diary: Part 1 of Nathan Brierley on Artificial Intelligence

Spenser Norrish

Artificial Intelligence may not be as exciting as explosions and awesome graphics, but nevertheless it's hugely important in Army of Two: The 40th Day. We put an immense amount of effort into creating interesting, completely dynamic, behaviors for enemies and partner AI so that players get the reward of experiencing unique interactions with enemies as they demonstrate a wide range of behaviors that simply aren't seen in other games. Army of Two: The 40th Day has iterated and improved on the AI in the original Army of Two, but we also implemented an array of completely new behaviors that we know everyone is going to have a blast experiencing.

One big component of Army of Two's AI governs the partner when someone plays the game solo. This provides a unique challenge for us as we have to create AI that is not only smart, but AI that can also do nearly everything that real humans can without any awkward moments in-between. When we set out to improve the partner AI we had a lot of feedback from our fans to help focus our efforts, and in general they had two main gripes with the partner AI that we specifically fixed.

 

Caption: Information about AI is placed in every map using the Unreal Editor so that partner AI and enemy AI can intelligently navigate through the world and use cover. Yellow circles identify suitable places for cover.

 

Perhaps the most wide-spread annoyance that players had when playing alone with the partner AI was dragging/healing. In Army of Two players could end up frustrated as the partner AI did silly things like drag them into danger instead of towards safety and it just wasn't fun to die in the heat of combat as your AI-controlled partner indecisively dragged you around in circles. As a result it was really important that we improved how the partner AI heals players. In addition to refining the AI, we found that the best method for solving this issue was to just give players more control. Now, when wounded players are being dragged they have the option of canceling. Players can choose to drag their own crippled bodies around, attack with their pistol, or simply call for their partner to come and help. By giving the player control over these things the partner AI has much less opportunity to act in a frustrating way, and it's really just more fun to have more control over how things play out.

 

Caption: An Unreal Editor screenshot of a map with icons and wireframe lines indicating various elements, including yellow-circle cover indicators.

 

A second gripe that players often had when interacting with the partner AI concerned a lack of responsiveness to commands. Sometimes players would issue the command for their partner to advance but there simply wouldn't be a response. Most often players thought the partner AI was too stupid to execute the command, when in fact the AI was actually refusing to advance because it was too dangerous. The AI was acting intelligently, but the players weren't receiving adequate feedback and as a result concluded that their AI partner wasn't smart enough to respond. We addressed this issue by implementing positive audio feedback. When your partner can't carry out a command it will now indicate why with an audio prompt. Players still won't be able to kamikaze their partner into certain death, but they also won't be left wondering why Salem or Rios is taking cover despite commands to advance.

 

Caption: Cover points, shown in yellow, are clearly visible around obstacles in this top-down view of a map.

 

We also wanted to make sure that the partner AI was fully capable of performing the entire range of coop moves that are available in the game. Previously coop moves were scripted to occur at very specific points in the game so there wasn't freedom to simply decide when to perform coop snipe, back to back, or any of the other moves. Now the AI can initiate more coop moves and can perform different roles within them. For example, the partner AI can now hold the riot shield while the player takes the offensive role of shooting. The partner AI will intelligently, and dynamically, navigate through the world and stop at smart spots while protecting you with the riot shield. In Army of Two the player was simply forced into taking the shield-holding role.  Similarly, the player now has more control over the AI partner with the coop playbook. The player can use the coop playbook to set up a variety moves that the partner AI will then be fully capable of acting out.

The partner AI will also act more humanlike as a result of what we call microscripting. Microscripting lets us define a sequence of actions and animations in order to create behaviors that seem extremely intelligent and human-like. The result is that the partner AI will react in some relevant and interesting way to the current situation (much like a human might) instead of simply waiting for combat to begin.

 

Check back next week for the second part of Nathan Brierley'a developer diary where he'll provide more insight into Army of Two: The 40th Day's Artificial Intelligence, including details on how enemy AI works and how it has been improved. Check us out on Twitter @Army_of_Two and Facebook for updates!

comments (0)