-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow no discrete spaces in CMAwM
#142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test case to verify that CMA
and CMAwM
sample the same solutions when there is no discrete spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that this PR does not break the behavior.
Compare the output of `CMAwM` examples between the main branch and this PR.
Refs #141 (review)
$ python examples/cmaes_with_margin_binary.py
evals f(x)
====== ==========
300 68618.49576
600 21210.89351
900 11419.74892
1200 9766.59631
1500 2287.18761
1800 1036.66449
2100 555.96057
2400 299.55161
2700 226.28945
3000 137.59309
3300 102.83340
3600 51.99137
3900 44.46696
4200 22.83239
4500 40.03485
4800 6.33165
5100 33.68194
5400 3.40997
5700 12.95023
6000 2.84832
6300 1.93740
6600 2.09330
6900 1.19557
7200 0.58144
7500 0.43266
7800 0.16168
8100 0.26816
8400 0.00694
8700 0.00122
9000 0.00026
9300 10.00014
9600 0.00008
9900 0.00004
10200 0.00001
10500 0.00001
10800 0.00000
11100 0.00000
11400 0.00000
11700 0.00000
12000 0.00000
12300 0.00000
12600 0.00000
12900 0.00000
13200 0.00000
13500 10.00000
13800 0.00000
14100 0.00000
14400 0.00000
14700 0.00000
15000 0.00000
15300 0.00000
15600 0.00000
15900 0.00000
16200 0.00000
16500 0.00000
(venv) [x86_64] $ python examples/cmaes_with_margin_integer.py
evals f(x)
====== ==========
300 1904022.30461
600 1409836.10163
900 882058.87773
1200 58020.64838
1500 81524.48477
1800 253148.59077
2100 121403.45418
2400 12351.22957
2700 1010035.38304
3000 35047.40626
3300 20165.55120
3600 503.20468
3900 54753.50048
4200 12866.92421
4500 26431.29918
4800 1488.78339
5100 23.57124
5400 20.28810
5700 7.01852
6000 2.04298
6300 0.91450
6600 0.29444
6900 0.21582
7200 0.01590
7500 0.00664
7800 0.00115
8100 0.00020
8400 0.00004
8700 0.00001
9000 0.00000
9300 0.00000
9600 0.00000
9900 0.00000
10200 0.00000
10500 0.00000
10800 0.00000
11100 12742.74986
11400 0.00000
11700 0.00000
12000 0.00000
12300 0.00000
12600 0.00000
12900 0.00000
13200 0.00000
13500 0.00000
13800 1000000.00000
14100 0.00000
14400 0.00000
14700 0.00000
15000 0.00000
Let me work on it at #143. |
For flexible use in other libraries such as Optuna, this PR allows input of no discrete spaces for
CMAwM
(should behave the same asCMA
in that case).Dependent on #141.