The strategy that we'll adopt to build an agent that is able to maximize the score is as follows:
- Initialize the environment of the Space Invaders-Atari2600 game.
- Preprocess the image frame:
- Remove pixels that do not necessarily impact the action prediction
- For example, pixels below the location of the player
- Normalize the input image.
- Resize the image before passing it to the neural network model
- Stack frames as required by the Gym environment
- Let the agent play the game over multiple episodes:
- During the initial episodes, we'll have high exploration which decays over increasing episodes.
- The action that needs to be taken in a state depends on the value of the exploration coefficient.
- Store the game state and the corresponding ...