Something that chooses actions and can be told an episode restarted.
The reset is what distinguishes this from a plain function. A
world model does not act from the frame in front of it — it acts from
a belief it has been updating since the episode began — so the driver
has to be able to say "that was a different episode, start again". A
stateless policy can implement it as a no-op.
Notes
Actions are expected in (-1, 1). Anything narrower is fine; the
environment is what decides how they are scaled.
Examples
>>> import lucid
>>> from lucid.utils.rollout import Policy, RandomPolicy
>>> isinstance(RandomPolicy(2), Policy)
True