Link Search Menu Expand Document

Documentation

Here you can find documentation for the EvoGym API!

Quicklinks:   EvoWorld,   EvoSim,   EvoViewer,   WorldObject,   envs.EvoGymBase,   helper functions and metadata

Overview

EvoGym consists of three main classes EvoWorld, EvoSim, EvoViewer. 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 EvoWorld instance. 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.


Table of contents