43
Designing AI for Competitive Games Bruce Hayles & Derek Neal

Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Designing AI for Competitive Games

Bruce Hayles & Derek Neal

Page 2: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Introduction

Page 3: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Meet the Speakers

Derek Neal Bruce Hayles

Director of Production Software Engineer

@brucehayles

Page 4: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

The Problem

Page 5: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Same Old Song

New User Plays Single Player Learns to beat the AI

Goes Online Gets Destroyed

Quits the Game, Never to Return.

Gets Frustrated

Page 6: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Could the AI help?

● AI “bots” in competitive games often...

...don't play by the same rules humans do

...teach new players bad behaviors

...unintentionally steepen the learning curve

...make it harder to transition to online play

...aren't useful for experienced players to train against

Page 7: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Challenges● Traditional AI techniques aren't very good at replicating human behavior

AI fighters don't have the same limitations player do

AI fighters don't make decisions the same way players do

AI fighters don't strategize or socialize the way players do

● As the game evolves over time, player strategies tend to change

As a result, even something that was a great AI at the time the game shipped might become “bad” over time

Page 8: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Our Solution● The Shadow System

Copies player behaviors in order to create an unlimited number of unique AI fighters.

● Shadow fighters...

...aren't super human

...are easy to train

...learn strategies, tactics, and social behaviors dynamically

...evolve over time as players get better

Page 9: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Reception

Page 10: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Community Response (https://youtu.be/4gdHArtnVE8)

Page 11: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Survey Responses

• 79% of players report having used the mode

• 48% of players report using the mode regularly

• 46% of players report playing online

• Responses from the survey were extremely positive, with additional

support for the mode and adding new features being the main requests.

Hardcore:

60%

Casual:

29%

Very Casual:

11%

Survey Demographics

Page 12: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Live Demo (https://youtu.be/WTlIowbaKks)

Page 13: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Quick System Overview

Page 14: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Record EverythingWorld States

Actions

Page 15: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Find and Play Back Actions

Page 16: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Sequential Actions• Once an action is selected, the AI will continue playing back

sequential actions until a major deviation is encountered.

Walk Forward Dash Attack

Walk Back Crouch Dragon Punch

Opponent Jumps

Page 17: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Sequential Actions Video (https://youtu.be/J6_WnY49

HRo)

Page 18: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Human Limitations

Page 19: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Reaction Time• Majority of people have

reaction times between 200 and 320ms (between 12 and 19 frames at 60 FPS)

• Most actions in Killer Instinct hit in less than 12 frames, and thus are not reactable.

• Players must choose actions to maximize risk/reward based on history of enemy’s actions

Page 20: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Reactable Not Reactable

Page 21: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Our Solution

• Capture and playback everything that the player did – including the reactions that the player made.

• For example, if a player takes 200ms to react to a fireball, the playback includes 200ms of the player standing around, causing the shadow to mimic this delay.

• A system that fails to capture this “guessing” behavior will not be playing the same game the players are.

Page 22: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Aim Bot Video (https://youtu.be/0aTmcG1D

vc0)

Page 23: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Human Decision Making

Page 24: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Traditional Approach

• Developer explicitly models specific sets of behaviors

• Attack when the opponent is close

• Block when they attack you

• Fidelity and amount of behaviors that can be made are limited by developer resources

Page 25: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

The Shadow System

● Replicates virtually all types of behaviors by:

1. Selecting actions based on how similar the recorded situation is to the current situation; and

2. Continuing to play back the actions that follow the selected action unless a large divergence occurs.

● To determine how similar the two situations are, the Shadow System uses Similarity Functions, Weights, and Heuristics.

Page 26: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Similarity (Health and Distance)

0

20

40

60

80

100

120

0 1 2 3 4 5 6

Health

Distance

Health and Distance

Page 27: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Creating a Score

Add up all the Scores to make a total.The action with the lowest total is the best match.

{ Difference in Health } x { Weight } = Health Score

{ Difference in Distance } x { Weight } = Distance Score

{ Difference in Timer } x { Weight } = Time Score

{ Difference in Meter } x { Weight } = Meter Score

{ Difference in Ammo } x { Weight } = Ammo Score

Page 28: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Target Selection in Counter Strike

Page 29: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Heuristics

● Players often keep track of information that the game does not, and use that information to change their behavior.

For example, players might notice how often an opponent attacks high vs. low, and then change how they're blocking to match

● Deliberately adding tracking for these trends allows the Shadows to adjust their behavior the same way the player does.

Note if a player does not change their behavior in these situations, neither will their Shadow

Page 30: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Human Strategy

Page 31: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

High Level Behaviors

● The Shadow system dynamically captures many types of strategic and tactical behaviors, without explicit knowledge of any of them:

● Rushdown

● Footsies

● Zoning

● Mixups

● Setting traps

● Also captures social behaviors, like taunts

Page 32: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Tournament Player Shadow (https://youtu.be/Mto-

aIJC5q8)

Page 33: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Player Taunted By His Shadow (https://youtu.be/f7xbc0ETV

MA)

Page 34: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Bot Coordination (https://youtu.be/b3nZdPKT

1Ow)

Page 35: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Coordination in Counter Strike

Page 36: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

The Metagame

● As players learn more about the game, the strategies and tactics they employ can change

● New setups

● New combos

● New bugs / exploits

● Balance changes

● By continuously copying player behaviors, Shadows can keep up with the player base as the Metagame shifts

Page 37: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Conclusion

Page 38: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Summary● AI in competitive games often does new players a disservice, but this is a

solvable problem

● The approach we used to build the Shadow system...

...can work for any competitive game

...can potentially save time time and money

...can have benefits outside of gameplay

Such as easier / quicker content generation

Page 39: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Future Ideas

● Training – Play against Shadows of stronger players / teams in order to improve your game

● Tutorials – Shadows with specific behaviors can teach important lessons (e.g., dealing with fireballs)

● Difficulty Ramp – Shadows of varying difficulty levels can gradually ramp up the difficulty level of the game

Page 40: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Future Ideas, Cont.

● Self Reflection – Play against yourself in order to identify your weaknesses

● Filling gaps – When not enough players are available in the matchmaking pool, Shadows can fill the vacant spots

● Drop In / Drop Out – Players can take over for their Shadow at any point, or drop out and leave a shadow

Page 41: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Future Ideas, Cont.

● Remixing Shadows – Combine data from multiple players to create new opponents

● AI Tournaments – Tournaments populated entirely by AI fighters

Page 42: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Special Thanks

Page 43: Designing AI for Competitive Gamestwvideo01.ubm-us.net/o1/vault/gdc2016/...Reactable Not Reactable. Our Solution •Capture and playback everything that the player did –including

Q&A