def __init__(self): self.logger = utils.getLogger() self.num_genomes = 0 """metrics to compare different containers""" self.max_quality = -np.inf self.min_quality = np.inf self.total_quality = 0
def __init__(self,env,genome_constructor,batch_size,seed=1): self.env = env self.genome_constructor = genome_constructor self.batch_size = batch_size self.seed = seed self.logger = utils.getLogger() self.current_iteration = 1
def __init__(self, parameters=None, seed=1): self.logger = utils.getLogger() if (parameters == None): self.parameters = self.sample_random_genome() else: self.parameters = parameters self.seed = seed ## Set random number seed for all scipy and numpy operations so that experiments can be reproduced np.random.seed(seed=seed)
from mpi4py import MPI from evo_rbc.env.prosthetic_env import ProstheticEAEnv import evo_rbc.main.utils as test_utils logger = test_utils.getLogger() comm = MPI.Comm.Get_parent() size = comm.Get_size() rank = comm.Get_rank() genomes_matrix = visualise = max_time_steps_qd = joint_error_margin = None max_time_steps_qd = comm.bcast(max_time_steps_qd, root=0) # print("child spawned and running",rank) genomes = comm.scatter(genomes_matrix, root=0) visualise = comm.bcast(visualise, root=0) joint_error_margin = comm.bcast(joint_error_margin, root=0) env = ProstheticEAEnv(max_time_steps_qd=max_time_steps_qd, joint_error_margin=joint_error_margin) qd_function = env.qd_steady_runner # print("visualise",visualise,rank) qd_evaluations = [] for i in range(len(genomes)): behavior, quality = env.evaluate_quality_diversity_fitness( qd_function=qd_function,
def __setstate__(self, state): for k, v in state.items(): self.__dict__[k] = v self.logger = utils.getLogger()
def __init__(self): self.logger = utils.getLogger()