Build API
The core builder API is the canonical way to compile and instantiate object-separated EvoGym worlds.
For the stable public surface and compatibility-only symbols, see API Boundary.
Public types
Section titled “Public types”ObjectTemplate
Section titled “ObjectTemplate”Compiled template for one object. Includes:
- object identity and origin
- local grid
- local point/spring data
- dynamic boxel collision geometry
- generalized cell geometry for rendering and static collision
- robot/deformation metadata
- actuator mappings
WorldTemplate
Section titled “WorldTemplate”Compiled world template containing:
- world bounds
- robot name
- ordered
ObjectTemplateentries - robot template index
WorldTemplateSet
Section titled “WorldTemplateSet”Paired template wrapper:
primarymirrormirror_mode
Use this when you want primary/mirrored templates available together, typically for within-genome evaluation.
StaticColliderData
Section titled “StaticColliderData”Precomputed static-terrain collider geometry omitted from dynamic SimState.
Key fields:
point_positionscell_verticescell_vertex_countcell_edge_acell_edge_bsurface_edge_maskcell_types
BuiltWorld
Section titled “BuiltWorld”Concrete built runtime payload containing:
sim_statetopologyconstantscollision_datastatic_collider_dataactuator_infoper_axis_infodeformation_inforobot_point_indicesrobot_point_maskdynamic_terrain_point_indicesfixed_terrain_sample_positionsrender_infogrid_hgrid_w
Public functions
Section titled “Public functions”compile_world_template(world, robot_name="robot")
Section titled “compile_world_template(world, robot_name="robot")”Compile a single WorldTemplate.
compile_world_templates(world, robot_name="robot", mirror_mode="none")
Section titled “compile_world_templates(world, robot_name="robot", mirror_mode="none")”Compile a WorldTemplateSet.
Supported mirror_mode values:
"none""paired"
instantiate_world(template, robot_override=None)
Section titled “instantiate_world(template, robot_override=None)”Build a concrete BuiltWorld from a compiled template.
robot_override
Section titled “robot_override”robot_override lets you vary morphology inside the robot’s fixed local frame.
Rules:
- shape must match the robot template grid exactly
- use the same body-array orientation as
add_from_array(...) EMPTYdisables cells inside that frame- supported robot voxel types can vary across overrides
- slope values are rejected
- terrain objects are never affected
Unsupported experimental slope cells
Section titled “Unsupported experimental slope cells”Slope ids remain in jax_evogym.constants and in internal legacy fixtures, but
they are not part of the stable public build contract.
By default:
compile_world_template(...)rejects slope cellscompile_world_templates(...)rejects slope cells- public top-level imports do not export slope constants
- the designer palette exposes only stable square-cell types
For internal slope investigations and legacy fixtures, pass:
compile_world_template(world, robot_name="robot", allow_experimental_slopes=True)The experimental path preserves the old slope geometry/validation code while
slopes remain geometry-only. Sloped edges receive normal collision response, but
slope friction, support, grip, stiction, and persistent manifold behavior are
disabled. Flat FIXED terrain friction is unaffected.