Model-based reinforcement learning (RL) enables additional computation at decision time to improve policies before executing them. Traditionally, this policy improvement is facilitated by an online planning algorithm that interacts with the model. Using the learned policy as a prior, the planning algorithm specializes it to the decision at the current state. In continuous control, this pattern has demonstrated the potential for improved sample efficiency and better performance that scales with compute. At the same time, this model that enables online planning can also generate simulated experience for updating the agent's policy or value function via model-free RL. To this end, we introduce Anytime Model-Based $π$-Improvement (AMBI), a model-based RL algorithm for continuous control that uses model-free RL for policy improvement at decision time. Specifically, AMBI treats each decision as a reinforcement learning problem rooted at the current state. At each decision, AMBI initializes a local actor and critic from policy and value function priors, updates both on imagined experience from the current state using actor-critic updates, and selects an action with the refined actor. Using actor-critic refinement in place of trajectory optimization, AMBI is competitive with TD-MPC2 on several high-dimensional continuous-control tasks. We also show that AMBI's performance increases smoothly as a function of compute spent during decision time.
Training World Models (WMs) relies on processing large amounts of high-dimensional data, which typically needs to be stored, read into memory, and moved from memory to compute units. In principle, GPU-native rendering avoids this movement of large image tensors from memory to compute cores, allowing for better GPU utilization, and training speed-ups. Rendering on-demand also allows to control perceptual appearance through the application of visual variations on-the-fly, allowing for higher diversity in training. To this end, we introduce stable-envs, an open-source library for fast, GPU-native rendering allowing to apply controllable variations on multiple simulation environments. By rendering image observations directly on GPU, stable-envs allows end-to-end training speed-ups of up to 1.33x, with no loss of performance. Besides faster training runs, stable-envs also enables reproducible, large-scale evaluations through batched physics while maintaining full determinism. stable-envs currently supports 80 simulation environments across multiple CPU- and GPU-backends, and is openly available at: https://github.com/galilai-group/stable-envs