An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter...

28
An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky and Vadim Bulitko, IEEE(2008) Presented By: Agrawal Rahul Kale Sagar Maheshwari Mradul Under The Guidance of: Prof. Pushpak Bhattacharya

Transcript of An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter...

Page 1: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

An Evaluation of Models for Predicting Opponent Position in

First-Person Shooter Games (Counter Strike)

Based on a paper of same title byStephen Hladky and Vadim Bulitko,

IEEE(2008)

Presented By: Agrawal Rahul Kale Sagar Maheshwari Mradul

Under The Guidance of:

Prof. Pushpak Bhattacharya

Page 2: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Objective

• AI-controlled humanoid characters– Skillful– Believable human-like

• Solution Hidden Semi Markov Model[2] Particle Filter[3]

Page 3: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Introduction

• Agents• Real Time Settings• Game State Representation & Actions• Act under Uncertainty

Page 4: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Motivation

• Cheating Inhumanly accurate aim Easier economy in strategy games Simplified physics in car racing Omniscience in games where the game state is partially

revealed to human players

Page 5: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Contribution

• Application & Evaluation of Models– Predict opponent position

• Learning– Game logs– Some observational game information that is

available to humans

Page 6: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Problem Formulation

• Goal of PredictorA = (a1 , a2 , ..., an ), ai Є R2

where n is the no. of opponents

• Inputs– presence/absence of opponents – number of opponents alive– game clock

Page 7: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

• Predictor performance– Prediction accuracy error (PAE) metric

shortest path distance between predictor’s prediction and opponents true position.

– Human similarity error (HSE) metricshortest path distance between a

predictor’s prediction and human expert’s prediction.

Page 8: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

• Objective to minimize HSE & PAE• Both are antagonistic.

Page 9: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Related Work

• Bioshock– Vision cones

• Quake II– Soar Cognitive Architecture

• Isla– Occupancy maps

Page 10: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

• Southy[5] used HSMM– Predict unit’s trajectory using “black-box” motion

model.– Drawback

All units moved at a constant speed. Model was designed for units traveling along optimal

path. Each unit was tracked from single origin to single

destination.

• Use of particle filter– Used to track opponent’s movement

Page 11: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Model Overview

• Dynamic discrete state estimation problem• Find probability distribution when opponent is

not visible• Two models

– Hidden Semi Markov Model– Particle Filter

Page 12: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Hidden Semi Markov Model• The difference between HMM and HSMM (used here)

• Allows transition from one state to other in dmax steps.

• Duration function (Geometric Distribution)

– P(d | st = h) h H, ∀ ∈– where H is set of states– st is state at time t– d is number of time units model is in state st

• We ignore self transitions

Page 13: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Forward Algorithm for HSMM

• We discretize the game map in a 2-D grid G• We set set of states in HSMM H as G• Use this algorithm to predict the position of

the opponent

Page 14: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Particle Filter

• Approximates value of s by a set of weighted particles

• Each particle represents a point in the grid G• And it has a weight whose some over G adds

to 1.

Page 15: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Building the models• Experienced human players have an

accumulated knowledge of games• We use input from their game logs to train

models using their movements and trajectories• We use frames, world coordinates, and view

cones to set the probabilities in HSMM• We just need initial weights in Particle Filter

Page 16: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Updating the models• The observation function

• Above update is used in both models

– Wt is set of visibility cubes

– X(g) is Wt without considering z-coordinate– Cv(p) is visibility cube of point p

Page 17: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Updating the models(cont.)

• The Particle Filter weight update

• HSMM model update– If an opponent is observed at a location s,

then we make corresponding forward probability 1 for that state and 0 for others

• Model is removed if opponent dies

Page 18: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Experimental Setup

• Use of game logs:– A database of 190 championship level game

logs was collected.– 140 game logs were used for training and

rest 50 for testing.– Frames were recorded after every 0.45

seconds.

Page 19: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Experimental Setup

• Collecting Human Data:– Human experts were used for providing

data for prediction.– The experts were able to watch the game.– At certain frames, experts were required to

click on the map, declaring his best guesses.

Page 20: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

An example frame from game log

Page 21: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Empirical Evaluation

• Measuring PAE and HSE:

– Here F(At,Bt) is the mean error per prediction between two coordinate vectors At and Bt for frame t.

– nt is no. of opponents alive.

– π is a permutation over Bt.

Page 22: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Empirical Evaluation

• Measuring PAE and HSE:– For PAE, At are positions provided by

predictor and Bt are true positions.

– For HSE, Bt are positions predicted by human experts.

Page 23: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Experimental ParametersParameter Values

Opposing Team T or CT

Model Type HSMM, PF(500), PF(1000)

Grid Cell Dimension 250,300,350,400

Dimension of cubes 100 units

dmax 10

View cone angle 90 degree

Page 24: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Experimental Results

• Two classes of predictors are used for each model type.

• “Avg.” class represents average performance over all the predictors.

• “Best” class consists of all non-dominated predictors.

Page 25: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

PAE vs HSE Graph

Page 26: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Predictor Performance

Page 27: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

Conclusion

• HSMM gives better results than particle filter for this problem.

• The best HSMM predictors have better accuracy than experiences human players.

• The mistakes they do make are more human like.

Page 28: An Evaluation of Models for Predicting Opponent Position in First-Person Shooter Games (Counter Strike) Based on a paper of same title by Stephen Hladky.

References[1] S. Hladky and V. Bulitko, “An evaluation model for predicting opponent positions in FPS video games”, IEEE, 2005.

[2] K. Murphy, “Hidden semi-Markov models”, University of California, Berkley, Tech. Rep., 2002

[3] C. Darken and B. G. Anderegg, “Particle Filters and Simulcara for More Realistic Opponent Tracking”, AI Game Programming Wisdom 4. Charles River Media, 2008, pp. 419-427.

[4] L. R. Rabiner, A tutorial on Hidden Markov Model and Selected Applications in Speech Recognition, Proceedings of IEEE, Vol 77, No. 2, 1989.

[5] F. Southy, W. Loh and D. Wilkinson, “Inferencing complex agent motions from partial trajectory observations”, in IJCAI, Hyderabad, 2007. pp 2631-2637.