config

Neuroevolution subtask (regular + test) and task configs.

class cneuromax.fitting.neuroevolution.config.NeuroevolutionSubtaskConfig(output_dir='${hydra:runtime.output_dir}', data_dir='${oc.env:CNEUROMAX_PATH}/data/', seed=0, device='cpu', agents_per_task=1, total_num_gens=10, save_interval=0, save_first_gen=False, pop_merge=False, env_transfer=False, fit_transfer=False, mem_transfer=False, eval_num_steps=0, logging=True)[source]

Bases: FittingSubtaskConfig

Neuroevolution subtask config.

Parameters:
  • agents_per_task (int, default: 1) – Number of agents per task (num_tasks = num_nodes x tasks_per_node).

  • total_num_gens (int, default: 10) – Number of generations to run the experiment for (including the previous number of generations).

  • save_interval (int, default: 0) – Number of generations between each save point. 0 means no save point except for the last generation.

  • save_first_gen (bool, default: False) – Whether to save the state of the experiment after the first generation (usually for plotting purposes).

  • pop_merge (bool, default: False) – Whether to merge both generator and discriminator populations into a single population. This means that each agent will be evaluated on both its generative and discriminative abilities.

  • env_transfer (bool, default: False) – Whether an agent’s environment state (position, velocity, …) is transferred to its children if it passes through the selection process.

  • fit_transfer (bool, default: False) – Whether an agent’s fitness is transferred to its children if it passes through the selection process.

  • mem_transfer (bool, default: False) – Whether an agent’s memory (hidden state) is transferred to its children if it passes through the selection process.

  • eval_num_steps (int, default: 0) – Number of environment steps to run each agent for during evaluation. 0 means that the agent will run until the environment terminates (eval_num_steps = 0 is not supported for env_transfer = True).

  • logging (bool, default: True) – Whether to log the experiment to Weights & Biases.

class cneuromax.fitting.neuroevolution.config.NeuroevolutionSubtaskTestConfig(output_dir='${hydra:runtime.output_dir}', data_dir='${oc.env:CNEUROMAX_PATH}/data/', seed=0, device='cpu', agents_per_task=1, total_num_gens=10, save_interval=0, save_first_gen=False, pop_merge=False, env_transfer=False, fit_transfer=False, mem_transfer=False, eval_num_steps=0, logging=False, num_tests=2, test_num_steps=0)[source]

Bases: NeuroevolutionSubtaskConfig

Neuroevolution subtask test config.

Parameters:
class cneuromax.fitting.neuroevolution.config.NeuroevolutionTaskConfig(space=<class 'types.Builds_BaseSpace'>, agent=<class 'types.PartialBuilds_BaseAgent'>, logger=<class 'types.PartialBuilds_init'>, config=<class 'types.Builds_NeuroevolutionSubtaskConfig'>, defaults=<factory>)[source]

Bases: Config

Neuroevolution task config.

Parameters: