{"id":16278542,"url":"https://github.com/frankroeder/dreamduck","last_synced_at":"2026-05-16T17:40:26.593Z","repository":{"id":47223611,"uuid":"192999574","full_name":"frankroeder/dreamduck","owner":"frankroeder","description":"World Models Experiments for Duckietown","archived":false,"fork":false,"pushed_at":"2021-09-08T01:08:06.000Z","size":27660,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-23T22:39:33.613Z","etag":null,"topics":["baselines","deep-learning","dreaming","duckietown","ducks","gym","gym-environment","mixture-density-networks","ppo2","reinforcement-learning","self-driving","self-driving-car","vae"],"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/frankroeder.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":"2019-06-20T23:33:56.000Z","updated_at":"2021-09-08T05:34:26.000Z","dependencies_parsed_at":"2022-09-11T14:10:20.903Z","dependency_job_id":null,"html_url":"https://github.com/frankroeder/dreamduck","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/frankroeder/dreamduck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankroeder%2Fdreamduck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankroeder%2Fdreamduck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankroeder%2Fdreamduck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankroeder%2Fdreamduck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankroeder","download_url":"https://codeload.github.com/frankroeder/dreamduck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankroeder%2Fdreamduck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001537,"owners_count":26083119,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["baselines","deep-learning","dreaming","duckietown","ducks","gym","gym-environment","mixture-density-networks","ppo2","reinforcement-learning","self-driving","self-driving-car","vae"],"created_at":"2024-10-10T18:58:54.853Z","updated_at":"2025-10-09T14:29:12.521Z","avatar_url":"https://github.com/frankroeder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# World Model DuckieTown\n\nThis repository is an implementation of the [WorldModelsExperiments](https://github.com/hardmaru/WorldModelsExperiments)\ncombined with forks of [gym-duckietown](https://github.com/Bassstring/gym-duckietown)\nand [baselines](https://github.com/Bassstring/baselines).\n\nThere are three gym environments provided.\n\n1. `DreamDuck-v0`: default environment `dreamduck/envs/env.py`\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"media/default.png\"\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n2. `DreamDuck-v1`: world model representation `dreamduck/envs/realenv.py`\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"media/real.gif\"\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n3. `DreamDuck-v2`: dream environment `dreamduck/envs/rnnenv.py`\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"media/dream.gif\"\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n## Getting Started\n\n### Installation\n\n1. Create a virtual environment with `python3 -m venv venv` and activate\n  it with `source venv/bin/activate`\n  - If the module is not present run `sudo apt-get install python3-venv`,\n    otherwise make use of instructions for your OS\n\n2. Install dependencies `pip install -r ./dreamduck/envs/requirements.txt`\n\n3. Install baselines fork\n  `pip install  git+https://github.com/Bassstring/baselines`\n\n4. Install this module `pip install -e .`\n\n## Manual Control\n\nAll three environments can be controlled manually:\n\n### Default environment\n\n- `python dreamduck/envs/env.py`\n- Use the flag `-h` for all options\n\n### World Model Interpretation of the real Environment\n\n- `python dreamduck/envs/realenv.py`\n- Show real observation next to world model interpretation with `--debug`\n\n### Dreaming without real Environment\n\n- `python dreamduck/envs/rnnenv.py`\n- Make use of flag `--temp` to control uncertainty\n\n## Training\n\n### baselines (0.1.5)\n\nThe baselines module provide a straightforward way of training an agent\nwith different algorithms and settings out of the box.\n\nWith the following commands an agent is trained in the dream and evaluated\nin the real environment interpreted by our world model.\n\n- `python -m baselines.run --alg=ppo2 --env=DreamDuck-v2 --num_timesteps=2e7\n  --network=mlp --num_env=2 --save_path=./models/dreamduck_rnnenv_ppo2 --log_path=train_rnnenv_logs`\n\n- `python -m baselines.run --alg=ppo2 --env=DreamDuck-v1 --network=mlp --num_timesteps=0\n  --load_path=./models/dreamduck_rnnenv_ppo2 --play`\n\nFor debugging purposes invoke baselines with following environmental variable:\n\n- `DEBUG_BASELINES=1 python -m baselines.run --alg=ppo2 ...`\n\n## Running headless training with xvfb\n\n- Install xvfb `sudo apt install xvfb -y`\n- Run `xvfb-run -a -s \"-screen 0 1400x900x24 +extension RANDR\" -- python -m\n  baselines.run --alg=ppo2 --env=DreamDuck-v0 --num_timesteps=2e7\n  --network=cnn_lstm --num_env=8 --save_path=./models/dreamduck_cnn_lstm_ppo2\n  --log_path=train_logs`\n\nIf there are issues follow [this](https://github.com/duckietown/gym-duckietown#running-headless-and-training-in-a-cloud-based-environment-aws)\ninstruction.\n\n\n## Presentation to initial Results\nhttps://docs.google.com/presentation/d/1wxcVQcTnhOC700dCKF-H1ftDOI84jh5EPQZgoMzgHvc/edit?usp=sharing \n\n## Authors\n\n[Frank Röder](https://frankyroeder.de) \u0026 [Shahd Safarani](https://github.com/Shahdsaf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankroeder%2Fdreamduck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankroeder%2Fdreamduck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankroeder%2Fdreamduck/lists"}