lingzhi227/symbolic-equation
Discover scientific equations from data using LLM-guided evolutionary search (LLM-SR). Multi-island algorithm with softmax-based cluster sampling, island reset, and LLM-proposed equation mutations. Use for symbolic regression and equation discovery.
npx skills add https://github.com/lingzhi227/agent-research-skills --skill symbolic-equation
Discover interpretable scientific equations from data using LLM-guided evolutionary search.
$0 — Dataset description, variable names, and physical context~/.claude/skills/symbolic-equation/references/llmsr-patterns.mdCreate a specification with:
x: np.ndarray, v: np.ndarray)# Example specification
@equation.evolve
def equation(x: np.ndarray, v: np.ndarray, params: np.ndarray) -> np.ndarray:
"""Describe the acceleration of a damped nonlinear oscillator."""
return params[0] * x
Repeat until convergence or max samples:
Present previous equations as versioned sequence:
def equation_v0(x, v, params):
"""Initial version."""
return params[0] * x
def equation_v1(x, v, params):
"""Improved version of equation_v0."""
return params[0] * x + params[1] * v
def equation_v2(x, v, params):
"""Improved version of equation_v1."""
# LLM completes this
Periodically (default: every 4 hours):
After search completes:
Temperature-scheduled softmax over cluster scores:
temperature = T_init * (1 - (num_programs % period) / period)
probabilities = softmax(cluster_scores / temperature)
Take lingzhi227/symbolic-equation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.