Action Space
Last updated
Last updated
In order for model's actions to convert to something executable in the game world, we need to map it to controller/keyboard inputs - we will call this the model's "action space".
In order to use the actions that an NRN agent recommends, we need to convert it into a format that the game can understand - this will be different for every game. Below we showcase an example of converting the output from an NRN model to a movement vector which can be used in a pong game:
In the code shown above, we have 2 functions for action conversion:
Model -> Game: This is used to execute the recommended action in-game
Game -> Model: This is used to take human inputs and turn it into data that the model can use for training