Here you can find documentation for the EvoGym API!
Quicklinks: EvoWorld, EvoSim, EvoViewer, WorldObject, envs.EvoGymBase, helper functions and metadata
EvoGym consists of three main classes
EvoWorld specifies the initial state of any voxels & objects that make up an EvoGym environment.
EvoSim is a steppable soft-body simulator which can be initialized from an
EvoViewer provides tools to visualize any
EvoSim. The following code example shows how these classes interact with each other:
from evogym import EvoWorld, EvoSim, EvoViewer world = EvoWorld.from_json('example_environment.json') sim = EvoSim(world) viewer = EvoViewer(sim) for i in range(500): sim.step() viewer.render('screen')
Each of these classes is documented in detail. There are also tutorials showing more involved usage.
Finally, for creating
gym-like environments, extend the
evogym.envs.EvoGymBase class (which itself inherits from
gym.Env). See the tutorials for an example of how to do this.