|
| | stats (self) |
| | train (self, max_env_steps) |
| | Collect reward-free replay and update the shared contrastive model.
|
| | policy (self, species, *, device=None, seed=0) |
| | Copy a portable species actor with fresh inference randomness.
|
| | evaluate (self, *, episodes=1, descriptor=None, archive=None, seed=0) |
| | Audit every species on common seeded resets independently of training.
|
Discover controllable skills with a population of continuous-action SAC species.
Use jointly classified species-skill pairs and a shared particle exploration reward.
Each species has a separate actor, critics and replay buffer. A shared
contrastive encoder scores successor observations against all learned
species-skill prototypes. Its joint log likelihood decomposes into
skill and conditional species log likelihoods. A nearest-particle
bonus encourages visitation of underrepresented states.
This implementation uses discrete skills, Gymnasium Box observations
and Box actions. A new episode holds one skill fixed throughout.
Each call visits species in round-robin order and can spend its full
interaction budget. A cutoff contributes the measured transitions
to replay and the next call starts a fresh episode.
:param env_factory: Callable returning a fresh Gymnasium environment.
:param config: SSDConfig for intrinsic rewards and speciation.
:param sac: SACConfig shared by the independent learners.
:param policy: PolicyConfig for the actors.
:param max_episode_steps: Horizon for collection and independent evaluation.
:param seed: Private search and reset seed.
:param device: PyTorch device.
Definition at line 153 of file ssd.py.