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:
FittingSubtaskConfigNeuroevolution
subtaskconfig.- Parameters:
agents_per_task (
int, default:1) – Number of agents per task (num_tasks=num_nodesxtasks_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.0means that the agent will run until the environment terminates (eval_num_steps = 0is not supported forenv_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:
NeuroevolutionSubtaskConfigNeuroevolution
subtasktest config.- Parameters:
num_tests (
int, default:2) – Number of episodes to evaluate each agent on.test_num_steps (
int, default:0) – Number of environment steps to run each agent for during testing.0means that the agent will run until the environment terminates.logging (
bool, default:False) – SeeNeuroevolutionSubtaskConfig.logging.
- 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:
ConfigNeuroevolution
taskconfig.- Parameters:
space (
Any, default:<class 'types.Builds_BaseSpace'>) – SeeBaseSpace.agent (
Any, default:<class 'types.PartialBuilds_BaseAgent'>) – SeeBaseAgent.logger (
Any, default:<class 'types.PartialBuilds_init'>) – Seewandb.init().config (
Any, default:<class 'types.Builds_NeuroevolutionSubtaskConfig'>) – SeeNeuroevolutionSubtaskConfig.