Staticplay CurioDynamics
Curiosity-driven symbolic physics discovery from raw trajectories (position, velocity, time). The agent observes only state and learns a sparse symbolic model that recovers hidden dynamics such as gravity, drag, and wind.
What It Does
- Generates a hidden physics world (projectile motion with drag + wind).
- Observes only
position,velocity, andtime. - Learns a symbolic acceleration model via sparse regression.
- Recovers interpretable formulas like:
ax = wind โ k * vx * |vx|ay = โg โ k * vy * |vy|
Quick Start
Requires Python 3.10+.
python .\physics_world.py
CLI Usage
python .\physics_world.py --episodes 50 --steps 200 --g 9.81 --drag 0.12 --wind 0.4 --drag_power 2.0 --dt 0.1 --seed 123
How It Works
- Simulates a hidden world with gravity + drag + wind.
- Collects state transitions only (no equations given).
- Fits a sparse symbolic model over a small feature library.
- Interprets the recovered constants as wind and gravity.
Latest Test Results
Hidden world: quadratic drag + wind
g_true = 9.81
drag_true = 0.12
wind_true = 0.4
model_ax: ax = 0.4 โ 0.12 * vx|vx|
model_ay: ay = โ9.81 โ 0.12 * vy|vy|
wind_est = 0.4
g_est = 9.81
Example Output
{'g_true': 9.81, 'drag_true': 0.12, 'wind_true': 0.4, 'drag_power_true': 2.0,
'model_ax': {'vx_abs_vx': -0.12, '1': -2.209},
'model_ay': {'vy_abs_vy': -0.12, '1': -13.034},
'wind_est': 0.4, 'g_est': 9.81, 'samples': 634}
Install
No external dependencies beyond standard library.
If you want a virtual environment:
python -m venv .venv
.\.venv\Scripts\activate
python .\physics_world.py
Files
physics_world.py: hidden physics world + curiosity agent + symbolic regression
How To Run Different Scenarios
Edit run_stress_test(...) in physics_world.py:
winddragdrag_powerepisodessteps
Example:
result = run_stress_test(
episodes=50,
steps=200,
g=9.81,
drag=0.12,
wind=0.4,
drag_power=2.0,
dt=0.1
)
print(result)
Notes
This is intentionally minimal and deterministic to highlight discovery mechanics. The feature library is constrained to keep the model interpretable.
Acknowledgements
- teliov/symcat-to-synthea
Links
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support