Skip to content

Planning with Expected Free Energy in Learned World Models

Wouter W. L. Nuijten, Bert de Vries

cs.AI

Abstract

An agent that learns a model of its environment from scratch has to choose which data to collect. When the reward is sparse, the reward is no help with that choice until the agent has found the goal. Active inference adds a reason to explore: the expected free energy (EFE) of a plan combines a preference over observations with the information that the plan is expected to give about the agent's model, in one functional. So far, EFE-based planners have explored only in models whose structure the agent is given, and most active inference agents with learned neural models train policy networks or drop the information terms. We plan with an EFE-based planning functional as it stands, by gradient descent through a learned world model with neural features and a Bayesian last layer, which keeps the information gain in closed form. The agent has no value function or learned policy, and the task enters only as a preference prior on observations, whose scale takes the place of an exploration weight; one scale serves all problems. We evaluate the same agent, with one configuration and starting from scratch, on four sparse control problems: pendulum swing-up, mountain car, acrobot and cart-pole swing-up. In its tenth episode, it keeps the pendulum upright in 75% of the steps, the tip of the acrobot above the goal height in 21% and the cart-pole upright in 89%, more than PETS, PETS with an exploration bonus tuned for each problem, MBPO and SAC. Without the epistemic terms, the same agent does not reach the goal in its tenth episode on the pendulum, the mountain car and the acrobot, although a random policy does.

Create a lesson