You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenEvolve will iteratively modify the Python code within the `# EVOLVE-BLOCK-START` and `# EVOLVE-BLOCK-END` markers in `initial_program.py`. The goal is to transform the simple initial model into a more complex and accurate symbolic expression that minimizes the Mean Squared Error (MSE) on the training data.
146
+
**OpenEvolve**iteratively modifies Python code segments, delineated by `# EVOLVE-BLOCK-START` and `# EVOLVE-BLOCK-END` markers within an `initial_program.py` file. The primary objective is to evolve a simple initial model into a more complex and accurate symbolic expression that minimizes the Mean Squared Error (MSE) against the training data.
147
147
148
-
An evolved `func` might, for instance, discover a non-linear expression like:
148
+
Below is a symbolic expression discovered by OpenEvolve for the physics task `PO10`:
149
149
150
150
```python
151
-
# Hypothetical example of what OpenEvolve might find:
151
+
import numpy as np
152
+
152
153
deffunc(x, params):
153
-
# Assuming X_train_scaled maps to x and const maps to a parameter in params
*(This is a simplified, hypothetical example to illustrate the transformation.)*
205
+
The ground truth for this PO10 task is represented by the equation:
206
+
$$
207
+
F_0sin(t)−ω_0^2(γt+1)x(t)−ω_0^2x(t)^3−ω_0^2x(t).
208
+
$$
209
+
This can be expanded and simplified to:
210
+
$$
211
+
F_0sin(t)−ω_0^2γtx(t)−2ω_0^2x(t)−ω_0^2x(t)^3.
212
+
$$
213
+
Notably, the core functional forms present in this ground truth equation are captured by the evolved symbolic expression:
214
+
215
+
- The $sin(t)$ component can be represented by `params[4] * np.sin(params[5] * t_val)`.
216
+
- The linear $x(t)$ term corresponds to `params[0] * pos`.
217
+
- The cubic $x(t)^3$ term is `params[1] * pos**3`.
218
+
- The interaction term $t⋅x(t)$ is captured by `params[8] * pos * t_val`.
219
+
220
+
The evolved code also includes terms like `params[2] * np.cos(params[3] * t_val)` (a cosine forcing term) and `params[9]` (a constant bias). These might evolve to have negligible parameter values if not supported by the data, or they could capture secondary effects or noise. The inclusion of the primary terms demonstrates OpenEvolve's strength in identifying the correct underlying structure of the equation.
221
+
222
+
*Note: Symbolic regression, despite such promising results, remains a very challenging task. This difficulty largely stems from the inherent complexities of inferring precise mathematical models from finite and potentially noisy training data, which provides only a partial observation of the true underlying system.*
159
223
160
224
------
161
225
@@ -177,12 +241,28 @@ The `eval.py` script will help you collect and analyze performance metrics. The
177
241
178
242
For benchmark-wide comparisons and results from other methods, please refer to the official LLM-SRBench paper.
0 commit comments