An open API service indexing awesome lists of open source software.

https://github.com/nonkloq/nn_dqn-from-scratch

Artificial Neural Network (MLP) and Deep Q-Learning Implementation from scratch, only using numpy.
https://github.com/nonkloq/nn_dqn-from-scratch

custom-gym-environment deepqlearning dqn-from-scratch dqn-tensorflow neural-network neural-networks-from-scratch

Last synced: about 1 year ago
JSON representation

Artificial Neural Network (MLP) and Deep Q-Learning Implementation from scratch, only using numpy.

Awesome Lists containing this project

README

          

# Artificial Neural Network and Deep Q-Learning Network from Scratch

Implementation of a Neural Network (MLP) and Deep Q-Learning Network (DQN) using only the numpy library. The DQN is trained to play the Cartpole game.

## Multilayered Perceptron (ANN)

### Neural Network Construction: [Notebook](nn-mlp_from_scratch.ipynb)

This notebook provides a step-by-step procedure for constructing a multilayered perceptron.

### Neural Network Implementation: [NeuralNetwork](nn.py)

This file contains the full implementation of the neural network, with added momentum to the weight updating step. To save and load the `NeuralNetwork`, use `save_network` and `load_network` from [saveload.py](saveload.py).

## Deep Q-Learning Network

### Train DQN to Play Cartpole: [Notebook](dqn_from_scratch.ipynb)

This notebook demonstrates how to use the `NeuralNetwork` to implement the DQN algorithm.

### Custom Gym Environment

**Maze Harvest:** [Environment](maze_harvest.py)
> Check the Agent Training Notebook to learn more about the environment.

### DQN Using TensorFlow to Play Maze Harvest

**DQN Using TensorFlow:** [DQN](dqn_tf.py)

**Agent Training:** [Notebook](maze_harvest_train_tf.ipynb)

### Networks Folder

This folder contains pre-trained networks. Refer to the notebooks to learn how to load and use the networks.

## License

This project is licensed under the terms of the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.