Quick Start
Create a world
Section titled “Create a world”import numpy as npfrom jax_evogym import EvoWorld, H_ACT, SOFT, V_ACT
world = EvoWorld()world.add_from_array("robot", np.array([[H_ACT, SOFT, V_ACT]]), 0, 0)world.to_json("robot.json")EvoWorld is a numpy-only world definition. No JAX required at this stage.
Run an environment
Section titled “Run an environment”import jax.numpy as jnpimport numpy as npfrom jax_evogym import H_ACT, SOFT, V_ACT, WalkerV0
body = np.array([[H_ACT, SOFT, V_ACT]])env = WalkerV0(body)
obs, state = env.reset()action = jnp.ones(env.n_actuators)obs, state, reward, done = env.step(state, action)Environments handle the full build pipeline internally: compile the world template, instantiate the built world, and expose a JIT-compiled step function.
Use the builder API directly
Section titled “Use the builder API directly”import numpy as npfrom jax_evogym import EvoWorld, FIXED, H_ACT, SOFT, V_ACTfrom jax_evogym import compile_world_template, instantiate_world
world = EvoWorld()world.add_from_array("ground", np.array([[FIXED, FIXED, FIXED, FIXED]]), 0, 0)world.add_from_array("robot", np.array([[H_ACT, SOFT, V_ACT]]), 1, 2)
template = compile_world_template(world, robot_name="robot")built = instantiate_world(template)
print(built.sim_state.positions.shape)print(built.static_collider_data.point_positions.shape)The builder API gives you direct access to SimState, CollisionData, ActuatorInfo, and all other simulation primitives. Use this when you need control beyond what the built-in environments provide.
Where to go next
Section titled “Where to go next”- Concepts — how the pieces fit together
- Environments — all 7 built-in environments
- Rendering — generate GIFs from rollouts
- Voxel Types — the full cell type reference