Track Player Movement in a First-Person Shooter Game 

In a first-person shooter game, an agent is hiding inside a level and waiting to jump out at the player. The agent cannot see the player, but can hear what they are doing and can then match that against its knowledge of the layout to estimate the players position. Consider a layout with 27 regions of four typesgrass, metal grates, water, and door portals.

show complete Wolfram Language input

Assign colors to the different types of regions.

In[2]:=
Click for copyable input
X

Walking on the different terrain types produces different kinds of sounds.

In[3]:=
Click for copyable input
X

Probabilities of giving out sounds depends on the terrain type.

In[4]:=
Click for copyable input
X

Visualize the layout of the level.

show complete Wolfram Language input
Out[7]=

Assume the player enters through one of the doors with equal probability.

In[8]:=
Click for copyable input
X

The player remains in the current region with probability 10%, and otherwise is equally likely to move to any of the neighboring regions.

In[9]:=
Click for copyable input
X
In[10]:=
Click for copyable input
X

The agent hears the following sequence of noises.

In[11]:=
Click for copyable input
X

This shows that most likely the player entered through the door marked 27 and is currently in region 7.

In[12]:=
Click for copyable input
X
Out[12]=
de es ja pt-br zh