base

BaseSpace and its config.

class cneuromax.fitting.neuroevolution.space.base.BaseSpaceConfig(eval_num_steps='${config.eval_num_steps}', logging='${config.logging}')[source]

Bases: object

Holds BaseSpace config values.

Parameters:
class cneuromax.fitting.neuroevolution.space.base.BaseSpace(config, num_pops, *, evaluates_on_gpu)[source]

Bases: ABC

Space Base class.

A Space is a torchrl environment wrapper with which agents produce behaviour and receive fitness scores.

Parameters:
abstract evaluate(agents, curr_gen)[source]

.

Method called once per iteration (every generation) in order to evaluate and attribute fitnesses to agents.

Parameters:
Return type:

ndarray[float32, Any]

Returns:

The fitnesses and number of steps ran.