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

Optional batched scoring from the reference Kheperax and QDax/Brax v1 tasks. More...

Go to the source code of this file.

Classes

class  qdpy.benchmarks.jax_reference.JAXPolicyBenchmark
 A reference simulator, policy architecture, and compiled batch adapter. More...

Namespaces

namespace  qdpy
namespace  qdpy.benchmarks

Functions

 qdpy.benchmarks.jax_reference.kheperax_maze (*, episode_length=250)
 Build the pyribs deceptive maze using the upstream Kheperax scorer.
 qdpy.benchmarks.jax_reference.qdax_brax (task, *, episode_length=100, reset_seed=0, deterministic=True)
 Build one of the seven benchmark environments with QDax's Brax v1 backend.

Detailed Description

Optional batched scoring from the reference Kheperax and QDax/Brax v1 tasks.

See also
https://jmlr.org/papers/v25/23-1027.html
https://docs.pyribs.org/en/latest/tutorials/ns_maze.html

Definition in file jax_reference.py.

Function Documentation

◆ kheperax_maze()

qdpy.benchmarks.jax_reference.kheperax_maze ( * ,
episode_length = 250 )

Build the pyribs deceptive maze using the upstream Kheperax scorer.

Parameters
episode_lengthMaximum simulator transitions per policy.
Returns
JAXPolicyBenchmark using the standard target maze and a two-layer MLP.
Use the standard target map, final-position descriptor, and seeded upstream resets.

Definition at line 75 of file jax_reference.py.

◆ qdax_brax()

qdpy.benchmarks.jax_reference.qdax_brax ( task,
* ,
episode_length = 100,
reset_seed = 0,
deterministic = True )

Build one of the seven benchmark environments with QDax's Brax v1 backend.

Parameters
taskName from QDAX_BRAX_TASKS.
episode_lengthMaximum simulator transitions per policy.
reset_seedSeed used to choose the common fixed initial state.
deterministicWhether the scorer reuses that state or samples resets from the batch seed.
Returns
JAXPolicyBenchmark using QDax's task, descriptor extractor, and default MLP.
Use the legacy Brax physics and task definitions provided by upstream QDax.

Definition at line 98 of file jax_reference.py.