{"id":22686926,"url":"https://github.com/nonkloq/nn_dqn-from-scratch","last_synced_at":"2025-04-12T05:08:58.675Z","repository":{"id":157181590,"uuid":"628043992","full_name":"nonkloq/nn_dqn-from-scratch","owner":"nonkloq","description":"Artificial Neural Network (MLP) and Deep Q-Learning Implementation from scratch, only using numpy. ","archived":false,"fork":false,"pushed_at":"2024-03-05T12:50:33.000Z","size":285,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T00:36:12.919Z","etag":null,"topics":["custom-gym-environment","deepqlearning","dqn-from-scratch","dqn-tensorflow","neural-network","neural-networks-from-scratch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonkloq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-14T19:24:53.000Z","updated_at":"2024-02-20T09:20:42.000Z","dependencies_parsed_at":"2023-12-26T09:57:12.436Z","dependency_job_id":null,"html_url":"https://github.com/nonkloq/nn_dqn-from-scratch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonkloq%2Fnn_dqn-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonkloq%2Fnn_dqn-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonkloq%2Fnn_dqn-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonkloq%2Fnn_dqn-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonkloq","download_url":"https://codeload.github.com/nonkloq/nn_dqn-from-scratch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519545,"owners_count":21117761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-gym-environment","deepqlearning","dqn-from-scratch","dqn-tensorflow","neural-network","neural-networks-from-scratch"],"created_at":"2024-12-09T23:16:15.450Z","updated_at":"2025-04-12T05:08:58.649Z","avatar_url":"https://github.com/nonkloq.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Artificial Neural Network and Deep Q-Learning Network from Scratch\n\nImplementation 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.\n\n## Multilayered Perceptron (ANN)\n\n### Neural Network Construction: [Notebook](nn-mlp_from_scratch.ipynb)\n\nThis notebook provides a step-by-step procedure for constructing a multilayered perceptron.\n\n### Neural Network Implementation: [NeuralNetwork](nn.py)\n\nThis 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).\n\n## Deep Q-Learning Network\n\n### Train DQN to Play Cartpole: [Notebook](dqn_from_scratch.ipynb)\n\nThis notebook demonstrates how to use the `NeuralNetwork` to implement the DQN algorithm.\n\n### Custom Gym Environment\n\n**Maze Harvest:** [Environment](maze_harvest.py)\n\u003e Check the Agent Training Notebook to learn more about the environment.\n\n### DQN Using TensorFlow to Play Maze Harvest\n\n**DQN Using TensorFlow:** [DQN](dqn_tf.py)\n\n**Agent Training:** [Notebook](maze_harvest_train_tf.ipynb)\n\n### Networks Folder\n\nThis folder contains pre-trained networks. Refer to the notebooks to learn how to load and use the networks.\n\n## License\n\nThis project is licensed under the terms of the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonkloq%2Fnn_dqn-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonkloq%2Fnn_dqn-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonkloq%2Fnn_dqn-from-scratch/lists"}