Abstract State/Action Defination

We perform an abstraction on actions and merge a sequence of actions into one action. Consider the example in Figure shown below to find and start the conversation with Mike, the player needs to perform a sequence of actions such as walking on the map, looking at a person and confirming that it is Mike.

We use an abstract action find to represent this process. In fact, find is implemented as the original APIs of games, encapsulating all the steps of finding an NPC of the game automatically. Using such abstract actions, we avoid making the MDP unnecessarily large and complex.

Due to the huge space of games, We define the state as a vector <v1, v2, . . . , vn>, where each variable vi in the vector is defined based on the domain knowledge of the expert so that only relevant attributes are included, e.g., items of the player and the scenes and positions. We applied a bucket partition to discretize the continuous values into different buckets. Note that, during the abstraction, only the states that have the same actions are grouped into one abstract state such that we can replay the game with the MDP. The original state and selected abstract state collected from the game is shown below.

{'envstatus': {

'npc': [{

'name': 'Tom',

'id': 1001,

'pos': {'x': 125, 'y': 961, 'z': 0},

'hp': 100,

'enemy': False,'

...

},

{

'name': 'Mike',

'id': 1002,

'pos': {'x': 762, 'y': 720, 'z': 1},

'hp': 80,

'enemy': False,

...

},

...

],

'item': [{

'name': 'apple',

'id': 3001,

'pos': {'y': 263, 'x': 85, 'z': 0},

},{

'name': 'apple',

'id': 3001,

'pos': {'y': 282, 'x': 95, 'z': 0},

},{

'name': 'apple',

'id': 3001,

'pos': {'y': 296, 'x': 77, 'z': 0},

}]

'circle': [{'name': 'teleport1', 'id': '5001', 'pos': {'y': 405, 'x': 129, 'z': 0}}],

'player': {

'name': 'best',

'id': 10001,

'pos': {'y': 52, 'x': 722, 'z': 0},

'hp': 200,

'class': 1,

'gender': 0,

'fashion': [9001,

9002,

9003],

'bag': [{'name': 'hoe', 'id': 3006}, {'name': 'money', 'id': 3009}],

'buff': {

'submit': False,

'dialog': False,

}}

The Original State

{'env':{

'npc':[{

'id':1001,

'die':False

},

{

'x': 125,

'y': 961,

'z':0

}

],

'player':{

'die':False,

'bag':[3006, 3009],

'loc':{'x': 0-100,'y': 700-800, 'z':0-100}

}

}

}

The Selected Abstract State