evolve

Evolutionary operations for Neuroevolution fitting.

The selection operation is implicit in cneuromax, see update_exchange_and_mutate_info() for more details.

cneuromax.fitting.neuroevolution.utils.evolve.mutate(agents_batch, exchange_and_mutate_info_batch, num_pops)[source]

Mutate agents_batch.

Parameters:
Return type:

None

cneuromax.fitting.neuroevolution.utils.evolve.evaluate_on_cpu(agents_batch, space, curr_gen)[source]

Evaluate agents_batch.

Parameters:
Return type:

ndarray[Shape[Len_agents_batch, Num_pops, [fitness, num_env_steps]], dtype[float32]]

Returns:

The output of agent evaluation performed by the process calling

this function on the agents it maintains (agents_batch). See evaluate().

cneuromax.fitting.neuroevolution.utils.evolve.evaluate_on_gpu(ith_gpu_comm, agents_batch, space, curr_gen, *, transfer)[source]

Gather agents_batch on process subset & evaluate.

Parameters:
Return type:

ndarray[Shape[Len_agents_batch, Num_pops, [fitness, num_env_steps]], dtype[float32]]

Returns:

The output of agent evaluation by this process. See

evaluate().