Skip to content

Commit e8e120f

Browse files
committed
update
1 parent b39f81d commit e8e120f

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

include/matrix_adaptation.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ namespace matrix_adaptation
186186
{
187187
Matrix A;
188188
Vector pc;
189+
/*
190+
First, as only triangular matrices have to be stored, the storage complexity is optimal.
191+
Second, the diagonal elements of a triangular Cholesky factor are the square roots of the eigenvalues
192+
of the factorized matrix, that is, we get the eigenvalues of the covariance matrix for free*/
189193

190194
CholeskyAdaptation(const size_t dim, const Vector& x0, const Float expected_length_z)
191195
: Adaptation(dim, x0, Vector::Ones(dim), expected_length_z),

include/settings.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace parameters
7575

7676
if (modules.ssa == StepSizeAdaptation::SA)
7777
{
78-
mu0 = std::min(lambda0 / 4, mu0);
78+
mu0 = mu.value_or(lambda0 / 4);
7979
}
8080

8181

@@ -100,6 +100,7 @@ namespace parameters
100100
one_plus_one = true;
101101
modules.elitist = true;
102102
modules.active = false;
103+
modules.sequential_selection = false;
103104
modules.weights = RecombinationWeights::EQUAL;
104105
modules.ssa = StepSizeAdaptation::SR;
105106

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ using std::chrono::duration_cast;
99
using std::chrono::duration;
1010
using std::chrono::milliseconds;
1111

12-
static int dim = 10;
12+
static int dim = 20;
1313
static bool rotated = false;
14-
static functions::ObjectiveFunction fun_t = functions::ObjectiveFunction::ELLIPSE;
14+
static functions::ObjectiveFunction fun_t = functions::ObjectiveFunction::SPHERE;
1515
static size_t budget = dim * 10000;
1616

1717

src/weights.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ namespace parameters
66
{
77
static Float get_default_cs(const Settings& settings, const Float mueff, const Float d)
88
{
9+
// TODO: check whether the value of cs needs to be increased when CMA is NONE
10+
911
if (settings.modules.matrix_adaptation == MatrixAdaptationType::NATURAL_GRADIENT)
1012
return (9.0 + 3.0 + std::log(d)) / (5.0 * d * std::sqrt(d));
1113

0 commit comments

Comments
 (0)