QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.go_explore.GoExplore Class Reference

Explore reachable states by returning to an archive of visited cells. More...

Public Member Functions

 stats (self)
 cells (self)
 best (self)
 explore (self, max_env_steps)
 Spend an additional budget, including the cost of all replay actions.

Detailed Description

Explore reachable states by returning to an archive of visited cells.

Run the exploration phase of Go-Explore with a Gymnasium-style environment.

:param env_factory: Factory for a single environment with seeded reset,
    five-value step, and close methods.
:param cell: Callable mapping observation and info to a stable hashable key.
:param sample_action: Callable given observation, info, and a seeded NumPy
    generator. Return a legal exploration action compatible with deepcopy.
:param exploration_steps: Maximum new actions per selected cell.
:param max_trajectory_steps: Optional cap on the length of any saved path.
:param snapshot: Optional callable taking the environment and returning
    its complete restorable state, including RNG and wrapper state.
:param restore: Paired callable receiving a fresh copy of that snapshot
    and the environment as ``restore(env, snapshot)``. Return the restored
    observation and info. Without the pair, reset and replay each path.
:param seed: Seed for cell selection, actions, and a fixed reset seed.

Definition at line 81 of file go_explore.py.

Member Function Documentation

◆ best()

qdpy.algorithms.go_explore.GoExplore.best ( self)
Return the highest-return path, with shorter paths winning ties.

Definition at line 132 of file go_explore.py.

◆ cells()

qdpy.algorithms.go_explore.GoExplore.cells ( self)
Return independent snapshots of the highest-return paths to each cell.

Definition at line 127 of file go_explore.py.

◆ explore()

qdpy.algorithms.go_explore.GoExplore.explore ( self,
max_env_steps )

Spend an additional budget, including the cost of all replay actions.

Advance the archive by exactly this many calls to env.step on success.

Definition at line 190 of file go_explore.py.

◆ stats()

qdpy.algorithms.go_explore.GoExplore.stats ( self)
Return the current step totals and archive coverage as a cell count.

Definition at line 118 of file go_explore.py.


The documentation for this class was generated from the following file: