reinforcement

BaseReinforcementSpace.

class cneuromax.fitting.neuroevolution.space.reinforcement.BaseReinforcementSpace(config, env)[source]

Bases: BaseSpace, ABC

Reinforcement Base Space class.

Parameters:
final run_pre_eval(agent, curr_gen)[source]

Resets/loads the environment before evaluation begins.

Parameters:
Return type:

TensorDict

Returns:

See run_post_eval.out.

env_done_reset(agent, out, curr_gen)[source]

Resets the agent/environment when the environment terminates.

Parameters:
Return type:

TensorDict | dict[str, bool]

Returns:

See run_post_eval.out.

final run_post_eval(agent, out, curr_gen)[source]

Resets the agent & saves the environment post-evaluation.

Parameters:
Return type:

None

final evaluate(agents, curr_gen)[source]

Evaluation function called once per generation.

Parameters:
Return type:

ndarray[float32, Any]