Skip to content

Commit

Permalink
Updated examples comments.
Browse files Browse the repository at this point in the history
Updated comment before final commit and PR.
  • Loading branch information
thurinj committed Nov 6, 2023
1 parent a7dc653 commit 38798f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/CMAES.Force.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@

popsize = 48 # -- CMA-ES population size (you can play with this value)
CMA = CMA_ES(parameter_list , origin=origin, lmbda=popsize, event_id=event_id)
CMA.sigma = 3 # -- CMA-ES step size, defined the standard deviation of the initial parameter distribution (you can play with this value, higher values are best for exploration and are generaly worth it)
CMA.sigma = 3 # -- CMA-ES step size, defined as the standard deviation of the population can be ajusted here (3 ~ 4 seems to provide a balanced exploration/exploitation and avoid getting stuck in local minima).
# The default value is otherwise 1 standard deviation (you can play with this value)
iter = 80 # -- Number of iterations (you can play with this value)

if mode == 'database':
Expand Down
5 changes: 3 additions & 2 deletions examples/CMAES.FullMomentTensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ def plot_lune(CMA, p):

popsize = 48 # -- CMA-ES population size - number of mutants (you can play with this value, 24 to 120 is a good range)
CMA = CMA_ES(parameter_list , origin=origin, lmbda=popsize, event_id=event_id)
CMA.sigma = 5.0 # -- Initial standard deviation (4 ~ 5 seems to provide a balanced exploration/exploitation and avoid getting stuck in local minima)
CMA.sigma = 5.0 # -- CMA-ES step size, defined as the standard deviation of the population can be ajusted here (4 ~ 5 seems to provide a balanced exploration/exploitation and avoid getting stuck in local minima).
# The default value is otherwise 1 standard deviation (you can play with this value)
iter = 60 # -- Number of iterations (you can play with this value, 120 to 240 is a good range)

if mode == 'database':
Expand All @@ -273,7 +274,7 @@ def plot_lune(CMA, p):

if comm.rank==0:
print('\nFinished\n')

# ================================================================================================
# FOR EDUCATIONAL PURPOSE -- This is what is happening under the hood in the Solve function
# ================================================================================================
Expand Down

0 comments on commit 38798f2

Please sign in to comment.