def discretize_action_space_desc(self):
<EOL>unique_list = []<EOL>for nice, record in self.action_space_desc.items():<EOL><INDENT>list_for_record = []<EOL>if record["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>head_key = record["<STR_LIT>"][<NUM_LIT:0>][<NUM_LIT:0>]<EOL>head_value = record["<STR_LIT>"][<NUM_LIT:0>][<NUM_LIT:1>]<EOL>list_for_record.append((head_key, <NUM_LIT:0.0>))<EOL>set_ = set()<EOL>for key_and_scale in self.action_space_desc[nice]["<STR_LIT>"]:<EOL><INDENT>if key_and_scale[<NUM_LIT:1>] not in set_:<EOL><INDENT>list_for_record.append((head_key, key_and_scale[<NUM_LIT:1>] / head_value))<EOL>set_.add(key_and_scale[<NUM_LIT:1>])<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>list_for_record = [(record["<STR_LIT>"][<NUM_LIT:0>], False), (record["<STR_LIT>"][<NUM_LIT:0>], True)]<EOL><DEDENT>unique_list.append(list_for_record)<EOL><DEDENT>def so(in_):<EOL><INDENT>st = "<STR_LIT>"<EOL>for i in in_:<EOL><INDENT>st += str(i[<NUM_LIT:1>])<EOL><DEDENT>return st<EOL><DEDENT>combinations = list(itertools.product(*unique_list))<EOL>combinations = list(map(lambda x: sorted(list(x), key=lambda y: y[<NUM_LIT:0>]), combinations))<EOL>combinations = sorted(combinations, key=so)<EOL>self.discretized_actions = combinations<EOL>
Creates a list of discrete action(-combinations) in case we want to learn with a discrete set of actions,
but only have action-combinations (maybe even continuous) available from the env.
E.g. the UE4 game has the following action/axis-mappings:

```javascript
{
'Fire':
    {'type': 'action', 'keys': ('SpaceBar',)},
'MoveRight':
    {'type': 'axis', 'keys': (('Right', 1.0), ('Left', -1.0), ('A', -1.0), ('D', 1.0))},
}
```

-> this method will discretize them into the following 6 discrete actions:

```javascript
[
[(Right, 0.0),(SpaceBar, False)],
[(Right, 0.0),(SpaceBar, True)]
[(Right, -1.0),(SpaceBar, False)],
[(Right, -1.0),(SpaceBar, True)],
[(Right, 1.0),(SpaceBar, False)],
[(Right, 1.0),(SpaceBar, True)],
]
```