Core Concepts¶
Understanding WorldFlux architecture and key components.
Reference / Deprecated onboarding page
This page is retained for backward compatibility and deep background reading. For the supported onboarding path, use Installation and Quick Start.
What Is a World Model?¶
A world model is a neural network that learns to predict how an environment evolves. It enables:
- Planning: Predict outcomes without direct environment interaction
- Imagination: Generate synthetic experience for training
- Efficient Learning: Learn from fewer real interactions
Architecture Overview¶
graph LR
subgraph Input
A[Observation]
end
subgraph WorldModel["World Model"]
B[Encoder]
C[State]
D[Dynamics]
E[Decoder]
end
subgraph Output
F[Predictions]
end
A --> B
B --> C
C --> D
D --> C
C --> E
E --> F
style C fill:#e1f5fe
style D fill:#fff3e0 Key Components¶
Encoder¶
Compresses high-dimensional observations into compact latent representations.
State¶
Core representation that captures environment state:
Dynamics Model¶
Predicts next latent state from current state and action:
Decoder¶
Reconstructs observations and predicts rewards from latent states:
Imagination Rollouts¶
trajectory = model.rollout(initial_state, actions)
# trajectory.states
# trajectory.rewards
# trajectory.continues
Training Loop¶
World models learn from trajectories:
- Collect trajectories (obs, actions, rewards, dones)
- Store in
ReplayBuffer - Sample batches
- Compute losses
- Update model
- Repeat