{"id":17059334,"url":"https://github.com/danijar/daydreamer","last_synced_at":"2025-04-09T14:14:32.220Z","repository":{"id":65285985,"uuid":"536161249","full_name":"danijar/daydreamer","owner":"danijar","description":"DayDreamer: World Models for Physical Robot Learning","archived":false,"fork":false,"pushed_at":"2022-12-19T15:17:52.000Z","size":39908,"stargazers_count":310,"open_issues_count":7,"forks_count":32,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-02T12:12:48.238Z","etag":null,"topics":["reinforcement-learning","robotics","world-models"],"latest_commit_sha":null,"homepage":"https://danijar.com/daydreamer","language":"Jupyter Notebook","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/danijar.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-13T14:18:23.000Z","updated_at":"2025-03-30T09:29:25.000Z","dependencies_parsed_at":"2023-01-16T06:45:53.882Z","dependency_job_id":null,"html_url":"https://github.com/danijar/daydreamer","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%2Fdaydreamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danijar%2Fdaydreamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danijar%2Fdaydreamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danijar%2Fdaydreamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danijar","download_url":"https://codeload.github.com/danijar/daydreamer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054193,"owners_count":21039952,"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":["reinforcement-learning","robotics","world-models"],"created_at":"2024-10-14T10:33:57.837Z","updated_at":"2025-04-09T14:14:32.198Z","avatar_url":"https://github.com/danijar.png","language":"Jupyter Notebook","funding_links":[],"categories":["Decision-Coupled / Sequential / Global Latent Vector"],"sub_categories":["Earlier"],"readme":"# DayDreamer: World Models for Physical Robot Learning\n\nOfficial implementation of the [DayDreamer][paper] algorithm in TensorFlow 2.\n\n![DayDreamer Robots](https://github.com/danijar/daydreamer/raw/main/media/header.gif)\n\nIf you find this code useful, please reference in your paper:\n\n```\n@article{wu2022daydreamer,\n  title={DayDreamer: World Models for Physical Robot Learning},\n  author={Wu, Philipp and Escontrela, Alejandro and Hafner, Danijar and Goldberg, Ken and Abbeel, Pieter},\n  journal={Conference on Robot Learning},\n  year={2022}\n}\n```\n\n[paper]: https://danijar.com/daydreamer/\n\n## Method\n\nDayDreamer learns a world model and an actor critic behavior to train robots\nfrom small amounts of experience in the real world, without using simulators.\nAt a high level, DayDreamer consists of two processes. The actor process\ninteracts with the environment and stores experiences into the replay buffer.\nThe learner samples data from the replay buffer to train the world model, and\nthen uses imagined predictions of the world model to train the behavior.\n\n![DayDreamer Model](https://github.com/danijar/daydreamer/raw/main/media/model.png)\n\nTo learn from proprioceptive and visual inputs alike, the world model fuses the\nsensory inputs of the same time step together into a compact discrete\nrepresentation. A recurrent neural network predicts the sequence of these\nrepresentations given actions. From the resulting recurrent states and\nrepresentations, DayDreamer reconstructs its inputs and predicts rewards and\nepisode ends.\n\nGiven the world model, the actor critic learns farsighted behaviors using\non-policy reinforcement learning purely inside the representation space of the\nworld model.\n\nFor more information:\n\n- [Project website](https://danijar.com/project/daydreamer/)\n- [Research paper](https://arxiv.org/pdf/2206.14176.pdf)\n- [YouTube video](https://www.youtube.com/watch?v=xAXvfVTgqr0)\n\n## Setup\n\n```\npip install tensorflow tensorflow_probability ruamel.yaml cloudpickle\n```\n\n## Instructions\n\nTo run DayDreamer, open two terminals to execute the commands for the learner\nbnd the actor in parallel. To view metrics, point TensorBoard at the log\ndirectory. For more information, also see the [DreamerV2][dv3] repository.\n\n[dv3]: https://github.com/danijar/dreamerv2\n\nA1 Robot:\n\n```\nrm -rf ~/logdir/run1\n```\n\n```\nCUDA_VISIBLE_DEVICES=0 python embodied/agents/dreamerv2plus/train.py --configs a1 --task a1_sim --run learning --tf.platform gpu --logdir ~/logdir/run1\n```\n\n```\nCUDA_VISIBLE_DEVICES=1 python embodied/agents/dreamerv2plus/train.py --configs a1 --task a1_real --run acting --tf.platform gpu --env.kbreset True --imag_horizon 1 --replay_chunk 8 --replay_fixed.minlen 32 --imag_horizon 1 --logdir ~/logdir/run1\n```\n\nXArm Robot:\n\n```\nrm -rf ~/logdir/run1\n```\n\n```\nCUDA_VISIBLE_DEVICES=0 python embodied/agents/dreamerv2plus/train.py --configs xarm --run learning --task xarm_dummy --tf.platform gpu --logdir ~/logdir/run1\n```\n\n```\nCUDA_VISIBLE_DEVICES=-1 python embodied/agents/dreamerv2plus/train.py --configs xarm --run acting --task xarm_real --env.kbreset True --tf.platform cpu --tf.jit False --logdir ~/logdir/run1\n```\n\nUR5 Robot:\n\n```\nrm -rf ~/logdir/run1\n```\n\n```\nCUDA_VISIBLE_DEVICES=0 python embodied/agents/dreamerv2plus/train.py --configs ur5 --run learning --task ur5_dummy --tf.platform gpu --logdir ~/logdir/run11\n```\n\n```\nCUDA_VISIBLE_DEVICES=1 python embodied/agents/dreamerv2plus/train.py --configs ur5 --run acting --task ur5_real --env.kbreset True --tf.platform cpu --tf.jit False --logdir ~/logdir/run11\n```\n\n## Questions\n\nPlease [open an issue][issues] on Github.\n\n[issues]: https://github.com/danijar/daydreamer/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanijar%2Fdaydreamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanijar%2Fdaydreamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanijar%2Fdaydreamer/lists"}