QDpy
Loading...
Searching...
No Matches
skill_evaluation.py File Reference

Held-out skill tracking and passive archive metrics for conditioned actors. More...

Go to the source code of this file.

Classes

class  qdpy.rl.skill_evaluation.SkillEvaluation
 Return, achieved descriptor, and constraint measurements at one desired skill. More...
class  qdpy.rl.skill_evaluation.SkillEvaluationResult
 Fixed-skill and optional passive achieved-cell quality-diversity metrics. More...

Namespaces

namespace  qdpy

Functions

 qdpy.rl.skill_evaluation.evaluate_skills (env_factory, policy, skills, *, feature, skill_bounds=None, tolerance=0.1, episodes=1, max_episode_steps=300, seed=0, archive=None, qd_offset=0.)
 Evaluate a conditioned actor on the same held-out reset seeds at every goal.

Detailed Description

Held-out skill tracking and passive archive metrics for conditioned actors.

Definition in file skill_evaluation.py.

Function Documentation

◆ evaluate_skills()

qdpy.rl.skill_evaluation.evaluate_skills ( env_factory,
policy,
skills,
* ,
feature,
skill_bounds = None,
tolerance = 0.1,
episodes = 1,
max_episode_steps = 300,
seed = 0,
archive = None,
qd_offset = 0. )

Evaluate a conditioned actor on the same held-out reset seeds at every goal.

Measure achieved behavior and quality at a fixed nonempty set of skills.

:param env_factory: Callable returning a fresh single Gymnasium environment.
:param policy: Conditioned actor exposing act(observation, skill), or a
    callable taking those arguments and returning a physical Box action.
    A recurrent QDAC-MB policy creates a separate session per episode.
:param skills: Distinct ordered goals, each a vector in physical units.
:param feature: Pre-action callback with the same contract as QDAC.
:param skill_bounds: Physical (low, high) pairs, inferred from a QDAC actor
    if omitted. Pass explicitly for a callable or a DCRL actor.
:param tolerance: Maximum Euclidean distance in normalized skill coordinates.
:param episodes: Number of held-out episodes per goal.
:param max_episode_steps: External horizon used to bound each evaluation episode.
:param seed: Nonnegative reset seed. Each goal starts from the same seed sequence.
:param archive: Optional QDpy Grid or CVTGrid defining achieved-cell geometry.
    Its contents are ignored and it is never mutated. Out-of-domain
    achievements contribute only to the fixed-skill metrics.
:param qd_offset: Finite constant added to the score of each counted skill or cell.
:return: Per-goal measurements, interaction count, and aggregate quality metrics.

Definition at line 96 of file skill_evaluation.py.