How danijar/daydreamer works
This repository’s documented product is DayDreamer: a world-model reinforcement-learning system for physical robots. Its principal workflow has an acting process collecting robot/environment experience into replay, followed by a learner that trains a latent world model and an actor-critic behavior from replay and imagined trajectories. The tree also contains separate locomotion-imitation and model-free RL implementations; they are not folded into that documented workflow. Some runtime wiring is unsampled, so uncertain links are omitted.
Main entry points: acting.py Acting process · train.py Train entry · learning.py Learning process · agent.py Dreamer agent
Components 18
Execution
- Train entry
embodied/agents/dreamerv2plus/train.py - Acting process
embodied/run/acting.py - Learning process
embodied/run/learning.py - Imitation PPO
motion_imitation/learning/ppo_imitation.py - Imitation runner
motion_imitation/learning/imitation_runners.py
World Model
- Dreamer agent
embodied/agents/dreamerv2plus/agent.py - Actor-critic
embodied/agents/dreamerv2plus/behaviors.py - Model networks
embodied/agents/dreamerv2plus/nets.py - TensorFlow utilities
embodied/agents/dreamerv2plus/tfutils.py
Robot Environments
- Environment adapters
embodied/envs/robot_interface.py - Gym adapter
embodied/envs/gym.py - Robot task environments
motion_imitation/envs/locomotion_gym_env.py - Robot environment builder
motion_imitation/envs/env_builder.py - Reference motion task
motion_imitation/envs/env_wrappers/imitation_task.py - Motion data
motion_imitation/utilities/motion_data.py
Experience
- Replay store
embodied/replay/store.py - Random policy
embodied/core/random.py
Other components
- Operator
Connections 16
- Operator → Train entry: starts
README.md - Train entry → Acting process: runs acting
README.md - Train entry → Learning process: runs learning
README.md - Acting process → Environment adapters: interacts with
- Acting process → Replay store: stores experience
README.md - Learning process → Replay store: samples experience
README.md - Learning process → Dreamer agent: trains
- Dreamer agent → Actor-critic: updates behavior
embodied/agents/dreamerv2plus/agent.py - Dreamer agent → Model networks: uses
embodied/agents/dreamerv2plus/agent.py - Model networks → TensorFlow utilities: uses
embodied/agents/dreamerv2plus/nets.py - Robot environment builder → Robot task environments: constructs
motion_imitation/envs/env_builder.py - Robot task environments → Reference motion task: wraps task
- Reference motion task → Motion data: loads reference
motion_imitation/envs/env_wrappers/imitation_task.py - Imitation runner → Imitation PPO: trains with
motion_imitation/learning/ppo_imitation.py - Imitation runner → Robot environment builder: builds environment
- Acting process → Random policy: fallback policy