{"id":21625629,"url":"https://github.com/eljandoubi/dqn-for-navigation","last_synced_at":"2026-05-08T06:53:08.256Z","repository":{"id":59945688,"uuid":"539900334","full_name":"eljandoubi/DQN-for-navigation","owner":"eljandoubi","description":"An implementation of Deep Q-Learning Network for solving a Unity environment that can navigate and collect bananas in a large, square world.","archived":false,"fork":false,"pushed_at":"2022-09-29T13:12:51.000Z","size":14422,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-21T00:07:29.690Z","etag":null,"topics":["banana-collector-environment","deep-q-learning","double-dqn","dueling-dqn","prioritized-experience-replay","pytorch","reinforcement-learning","unity-environment"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eljandoubi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-22T09:26:21.000Z","updated_at":"2022-09-29T01:35:54.000Z","dependencies_parsed_at":"2023-01-19T00:30:43.324Z","dependency_job_id":null,"html_url":"https://github.com/eljandoubi/DQN-for-navigation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eljandoubi/DQN-for-navigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eljandoubi%2FDQN-for-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eljandoubi%2FDQN-for-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eljandoubi%2FDQN-for-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eljandoubi%2FDQN-for-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eljandoubi","download_url":"https://codeload.github.com/eljandoubi/DQN-for-navigation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eljandoubi%2FDQN-for-navigation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32770544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["banana-collector-environment","deep-q-learning","double-dqn","dueling-dqn","prioritized-experience-replay","pytorch","reinforcement-learning","unity-environment"],"created_at":"2024-11-25T01:09:56.534Z","updated_at":"2026-05-08T06:53:08.233Z","avatar_url":"https://github.com/eljandoubi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[//]: # (Image References)\n\n[image1]: https://user-images.githubusercontent.com/10624937/42135619-d90f2f28-7d12-11e8-8823-82b970a54d7e.gif \"Agent\"\n\n[image2]: https://user-images.githubusercontent.com/10624937/42386929-76f671f0-8106-11e8-9376-f17da2ae852e.png\n\n# DQN-Navigation\nThis repository contains material from Udacity's [Value-based Methods](https://github.com/udacity/Value-based-methods) github.\n\n\n## Introduction\n\nFor this project, we train an agent to navigate (and collect bananas!) in a large, square world.  \n\n![Trained Agent][image1]\n\nA reward of +1 is provided for collecting a yellow banana, and a reward of -1 is provided for collecting a blue banana.  Thus, the goal of your agent is to collect as many yellow bananas as possible while avoiding blue bananas.  \n\nThe state space has 37 dimensions and contains the agent's velocity, along with ray-based perception of objects around agent's forward direction.  Given this information, the agent has to learn how to best select actions.  Four discrete actions are available, corresponding to:\n- **`0`** - move forward.\n- **`1`** - move backward.\n- **`2`** - turn left.\n- **`3`** - turn right.\n\nThe task is episodic, and in order to solve the environment, an agent must get an average score of +13 over 100 consecutive episodes.\n\n\nFor the Optional Challenge: Learning from Pixels\n\n\nThis environment is almost identical to the project environment, where the only difference is that the state is an 84 x 84 RGB image, corresponding to the agent's first-person view of the environment.\n\n## Dependencies\n\nTo set up your python environment to run the code in this repository, follow the instructions below.\n\n1. Create (and activate) a new environment with Python 3.9.\n\n\t- __Linux__ or __Mac__: \n\t```bash \n    conda create --name drlnd \n    source activate drlnd\n\t```\n\t- __Windows__: \n\t```bash\n\tconda create --name drlnd \n\tactivate drlnd\n\t```\n2. Follow the instructions in [Pytorch](https://pytorch.org/) web page to install pytorch and its dependencies (PIL, numpy,...). For Windows and cuda 11.6\n\n    ```bash\n    conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge\n    ```\n\t\n\n3. Follow the instructions in [this repository](https://github.com/openai/gym) to perform a minimal install of OpenAI gym.  \n\t- Install the **box2d** environment group by following the instructions [here](https://github.com/openai/gym#box2d).\n\n    ```bash\n    pip install gym[box2d]\n    ```\n    \n4. Follow the instructions in [Navigation](https://github.com/udacity/Value-based-methods/tree/main/p1_navigation) to get the environment.\n\t\n5. Clone the repository, and navigate to the `python/` folder.  Then, install several dependencies.\n```bash\ngit clone https://github.com/eljandoubi/DQN-Navigation.git\ncd DQN-Navigation/python\npip install .\n```\n\n6. Create an [IPython kernel](http://ipython.readthedocs.io/en/stable/install/kernel_install.html) for the `drlnd` environment.  \n```bash\npython -m ipykernel install --user --name drlnd --display-name \"drlnd\"\n```\n\n7. Before running code in a notebook, change the kernel to match the `drlnd` environment by using the drop-down `Kernel` menu. \n\n![Kernel][image2]\n\n## Training and inference\nYou can train and/or inference Navigation (Pixels) environment:\n\nFirst, go to `p1_navigation/`.\n\nThen, run the training and/or inference cell of `Deep_Q_Network_Navigation(_Pixels).ipynb`.\n\nThe pre-trained model with the highest score is stored in `Navigation_(Pixels_)checkpoint`.\n\n\n## Implementation and Resultats\n\nThe implementation and resultats are discussed in the report.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feljandoubi%2Fdqn-for-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feljandoubi%2Fdqn-for-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feljandoubi%2Fdqn-for-navigation/lists"}