A reinforcement learning agent that learns to play Snake through Deep Reinforcement Learning (DQN). This version of Snake was created by Daniel Westbrook, and can be found here. The original game was modified into a better learning environment.
- Numpy
- Pygame
- Scikit-image
- Tensorflow
- Keras
- h5py
All information involving the reinforcement learning algorithm.
Contains several variables used by the DQN and learning algorithm:
- num_of_cols - number of columns for screenshot resizing
- num_of_rows - number of rows for screenshot resizing
- num_of_hidden_layer_neurons - number of neurons in the fully connected layer before the output layer
- img_channels - channels of image
- num_of_actions
- batch_size - batch size in experience replay deque to update
- epsilon
- observe - amount of timesteps to observe until actually training the agent
- gamma
- action_array - list of inputs which are the actions the agent can do
- reward_on_eat - reward given to the agent for eating food
- reward_in_env - reward given to the agent for remaining alive in the environment
- death_reward - reward given to the agent when it dies
- timesteps_to_save_weights - timesteps until the weights of the model are saved to a file
- exp_replay_memory - length of the experience replay deque until it starts popping information from it