{"id":17059289,"url":"https://github.com/danijar/dreamer","last_synced_at":"2025-04-05T14:08:19.671Z","repository":{"id":47155865,"uuid":"236560315","full_name":"danijar/dreamer","owner":"danijar","description":"Dream to Control: Learning Behaviors by Latent Imagination","archived":false,"fork":false,"pushed_at":"2021-09-10T20:49:29.000Z","size":44,"stargazers_count":527,"open_issues_count":6,"forks_count":109,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T13:10:00.586Z","etag":null,"topics":["artificial-intelligence","deep-learning","reinforcement-learning","robotics","world-models"],"latest_commit_sha":null,"homepage":"https://danijar.com/dreamer","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danijar.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}},"created_at":"2020-01-27T18:19:56.000Z","updated_at":"2025-03-23T05:40:33.000Z","dependencies_parsed_at":"2022-09-03T23:23:23.374Z","dependency_job_id":null,"html_url":"https://github.com/danijar/dreamer","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/danijar%2Fdreamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danijar%2Fdreamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danijar%2Fdreamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danijar%2Fdreamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danijar","download_url":"https://codeload.github.com/danijar/dreamer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345854,"owners_count":20924102,"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":["artificial-intelligence","deep-learning","reinforcement-learning","robotics","world-models"],"created_at":"2024-10-14T10:33:49.016Z","updated_at":"2025-04-05T14:08:19.650Z","avatar_url":"https://github.com/danijar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dream to Control\n\n**NOTE:** Check out the code for [DreamerV2](https://github.com/danijar/dreamerv2), which supports both Atari and DMControl environments.\n\nFast and simple implementation of the Dreamer agent in TensorFlow 2.\n\n\u003cimg width=\"100%\" src=\"https://imgur.com/x4NUHXl.gif\"\u003e\n\nIf you find this code useful, please reference in your paper:\n\n```\n@article{hafner2019dreamer,\n  title={Dream to Control: Learning Behaviors by Latent Imagination},\n  author={Hafner, Danijar and Lillicrap, Timothy and Ba, Jimmy and Norouzi, Mohammad},\n  journal={arXiv preprint arXiv:1912.01603},\n  year={2019}\n}\n```\n\n## Method\n\n![Dreamer](https://imgur.com/JrXC4rh.png)\n\nDreamer learns a world model that predicts ahead in a compact feature space.\nFrom imagined feature sequences, it learns a policy and state-value function.\nThe value gradients are backpropagated through the multi-step predictions to\nefficiently learn a long-horizon policy.\n\n- [Project website][website]\n- [Research paper][paper]\n- [Official implementation][code] (TensorFlow 1)\n\n[website]: https://danijar.com/dreamer\n[paper]: https://arxiv.org/pdf/1912.01603.pdf\n[code]: https://github.com/google-research/dreamer\n\n## Instructions\n\nGet dependencies:\n\n```\npip3 install --user tensorflow-gpu==2.2.0\npip3 install --user tensorflow_probability\npip3 install --user git+git://github.com/deepmind/dm_control.git\npip3 install --user pandas\npip3 install --user matplotlib\n```\n\nTrain the agent:\n\n```\npython3 dreamer.py --logdir ./logdir/dmc_walker_walk/dreamer/1 --task dmc_walker_walk\n```\n\nGenerate plots:\n\n```\npython3 plotting.py --indir ./logdir --outdir ./plots --xaxis step --yaxis test/return --bins 3e4\n```\n\nGraphs and GIFs:\n\n```\ntensorboard --logdir ./logdir\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanijar%2Fdreamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanijar%2Fdreamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanijar%2Fdreamer/lists"}