{"id":15637977,"url":"https://github.com/ageron/tiny-dqn","last_synced_at":"2025-04-15T21:17:19.751Z","repository":{"id":66790699,"uuid":"70826462","full_name":"ageron/tiny-dqn","owner":"ageron","description":"A tiny implementation of Deep Q Learning, using TensorFlow and OpenAI gym","archived":false,"fork":false,"pushed_at":"2021-11-19T04:40:39.000Z","size":18,"stargazers_count":94,"open_issues_count":0,"forks_count":45,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-15T21:17:13.171Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ageron.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}},"created_at":"2016-10-13T16:33:14.000Z","updated_at":"2025-03-21T16:06:09.000Z","dependencies_parsed_at":"2024-01-14T11:00:59.472Z","dependency_job_id":"91c16631-fb57-4f43-92f7-3c58c2f21ed4","html_url":"https://github.com/ageron/tiny-dqn","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/ageron%2Ftiny-dqn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageron%2Ftiny-dqn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageron%2Ftiny-dqn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageron%2Ftiny-dqn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ageron","download_url":"https://codeload.github.com/ageron/tiny-dqn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249153953,"owners_count":21221330,"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":[],"created_at":"2024-10-03T11:16:43.972Z","updated_at":"2025-04-15T21:17:19.732Z","avatar_url":"https://github.com/ageron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tiny-dqn\n\nA very short \u0026 simple python implementation of Deep Q Networks using TensorFlow and OpenAI gym. This program learns to play MsPacman. With very little change it could be made to learn just about any other Atari game.\n\nIt is based on the 2013 paper by V. Mnih _et al._, \"Playing Atari with Deep Reinforcement Learning\": [arXiv:1312.5602](https://arxiv.org/pdf/1312.5602v1.pdf).\n\nThe two Q-networks (online DQN and target DQN) have 3 convolutional layers and two fully connected layers (including the output layer). This code implements a replay memory and ɛ-greedy policy for exploration.\n\n## Requirements\n\n* OpenAI gym + dependencies for the Atari environment\n* TensorFlow 1.0+\n* Numpy\n\n## Installation\n\n### On MacOSX\n\n    $ brew install cmake boost boost-python sdl2 swig wget\n    $ cd $your_work_directory\n    $ git clone https://github.com/ageron/tiny-dqn.git\n    $ cd tiny-dqn\n    $ pip install --user --upgrade pip\n    $ pip install --user --upgrade -r requirements.txt\n    $ python tiny_dqn.py -v --render\n\n### On Ubuntu 14.04\n\n    $ apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig\n    $ cd $your_work_directory\n    $ git clone https://github.com/ageron/tiny-dqn.git\n    $ cd tiny-dqn\n    $ vim requirements.txt\n    $ pip install --user --upgrade pip\n    $ pip install --user --upgrade -r requirements.txt\n    $ python tiny_dqn.py -v --render\n\n## Usage\n\nTo train the model:\n\n    python tiny_dqn.py -v --number-steps 1000000\n\nThe model is saved to `my_dqn.ckpt` by default. To view it in action, run:\n\n    python tiny_dqn.py --test --render\n\nFor more options:\n\n    python tiny_dqn.py --help\n\n## Disclaimer\nThis is a draft, I have not had the time to test it seriously yet. If you find any issue, please contact me or send a Pull Request.\n\nEnjoy!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fageron%2Ftiny-dqn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fageron%2Ftiny-dqn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fageron%2Ftiny-dqn/lists"}