Hi everyone,
I need some help parallelizing the following:
Thank you
I need some help parallelizing the following:
population = [] generations = 100000 generation = 1 while generation < (generations + 1): params = { 'num_char': 100, 'variables': 'X', 'constants': 'F+-', 'axiom': 'FX', 'rules': { 'X': { 'options': ['+FX', '-FX'], 'probabilities': [0.5, 0.5] } }, 'point': np.array([0, 0]), 'vector': np.array([0, 1]), 'length': 1.0, 'angle': 25 # random } generation += 1 population.append(Creature(params).coords)I believe joblib's Parallel may be useful but I am unsure of how to feed the params dictionary as well as combining the outputs into a single list
Thank you