遗传算法

This commit is contained in:
Cricial
2026-03-15 17:15:30 +08:00
parent 03ac80715f
commit a69e272e43
27 changed files with 934 additions and 191 deletions

View File

@@ -1,11 +1,11 @@
{
"config": {
"pop_size": 20,
"n_gen": 10,
"pop_size": 10,
"n_gen": 60,
"n_var": 12,
"bound_min": -5,
"bound_max": 5,
"cx_prob": 0.5,
"cx_prob": 0.8,
"mut_prob": 0.2,
"cx_alpha": 0.5,
"mut_sigma": 0.1,
@@ -15,45 +15,22 @@
"seed": 42
},
"best_individual": [
51.0,
0.4550083673391433,
0.4230074859901629,
1.0,
24.0,
0.9607789032744504,
3.0,
0.4271578472186195,
0.5342606663518962,
0.06796086337575724,
4.322914089653634,
1.2286610916299323
64.0,
1.764206087513454,
0.07889021951363398,
0.6743314165751808,
1.0079808674057342,
0.29096678837813245,
0.3695976434649408,
0.2561432647676939,
6.0,
35.0,
1.0079808674057342,
1.0142063414994353
],
"best_fitness": -31.0,
"best_fitness": 0.1761567188324269,
"fitness_curve": {
"best_list": [
-31.0,
-31.0,
-31.0,
-31.0,
-31.0,
-31.0,
-31.0,
-31.0,
-31.0,
-31.0
],
"avg_list": [
-32.9,
-32.8,
-32.5,
-32.5,
-32.3,
-32.1,
-32.0,
-32.3,
-32.6,
-32.5
]
"best_list": []
},
"timestamp": "2025-11-22 19:05:08"
"timestamp": "2026-01-26 22:30:22"
}