Skip to content

Commit

Permalink
added challenge co-evolving mutation rate
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderdittrich committed Feb 28, 2024
1 parent a146375 commit e419de6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions exercise_2_es/problem_ackley.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@
"3. How does a large $\\mu$/$\\lambda$ ratio influence the convergence rate?\n",
"4. We can also introduce a learning schedule by a decaying mutation rate. At $1.0$ there is no decay. How do different decay rates influence the learning process?\n",
"\n",
"-------"
"-------\n",
"\n",
"## **Challenge for motivated students**\n",
"The lecture introduces the concept of co-evolving mutation rates. Can you implement a function `co_evolving_mutation_rate` which implements this concept and integrate it in the evolutionary loop?"
]
},
{
Expand Down Expand Up @@ -232,13 +235,12 @@
"# Evolution\n",
"mean_vector = initialise_mean(num_parameters)\n",
"\n",
"\n",
"# Control of mutation rate\n",
"# Exponential decaying learning rate\n",
"# works like a learning scheduler\n",
"def exp_decay(sigma, sigma_decay, sigma_limit):\n",
" sigma = sigma * sigma_decay\n",
" return np.max((sigma_limit, sigma))\n",
"\n",
"\n",
"# Evolutionary loop\n",
"for gen in range(num_generations):\n",
" population = generate_mutated_offspring(\n",
Expand Down

0 comments on commit e419de6

Please sign in to comment.