# SR Analysis Figure Index

All figures are in `results/figures/` as both PNG and PDF (300 DPI, publication quality).

---

## Figure 1: Illusion Cross-Diameter Generalization
**File**: `fig_illusion_degradation.png`, `fig_illusion_degradation.pdf`

**Caption**: CFD closed-loop validation of the joint symbolic regression formula
across target cylinder diameters. The formula was trained on 0.75L and 1.0L data
jointly. Performance degrades monotonically as diameter deviates from the training
range. At 1.5L, the PPO policy employs high-frequency periodic modulation (5.6x
the shedding frequency), which symbolic regression cannot capture with the current
feature set. The shaded regions indicate PPO-level performance (similarity > 0.9)
and degradation regime.

**Paper section**: Results — Symbolic Regression — Illusion Cross-Diameter Generalization.

---

## Figure 2: Karman Cross-Re Formula Validation
**File**: `fig_karman_cross_re.png`, `fig_karman_cross_re.pdf`

**Caption**: Comparison of PPO policy and joint PySR formula performance across
Reynolds numbers for the Karman cloak task. The joint formula
(alpha_F = daF_dt - 14.95 * mu * Cl_tot) was trained on Re 50-400 data and
generalizes to unseen intermediate Reynolds numbers (25, 70, 150, 300). The dashed
line shows the average PPO performance across trained Reynolds numbers.

**Paper section**: Results — Symbolic Regression — Karman Cross-Re Joint Formula.

---

## Figure 3: Formula Structure Comparison
**File**: `fig_formula_comparison.png`, `fig_formula_comparison.pdf`

**Caption**: Structural comparison of the discovered symbolic control laws for the
Karman cloak and illusion tasks. The Karman formula is dominated by force-feedback
terms (action derivative and viscous-scaled lift coefficient), while the illusion
formula is dominated by error-tracking terms (drag coefficient mismatch between
pinball and target). This structural difference reflects the fundamentally different
control objectives: wake preservation vs. wake sculpting.

**Paper section**: Results — Symbolic Regression — Structural Comparison.

---

## Figure 4: Vortex Cross-Scene Generalization
**File**: `fig_vortex_generalization.png`, `fig_vortex_generalization.pdf`

**Caption**: The Karman joint formula, trained only on Karman vortex street data,
generalizes to two transient vortex cloaking tasks without retraining. For the
Lamb dipole, the symbolic formula exceeds the PPO policy's performance. This
demonstrates that the discovered feedback structure (force-feedback with viscous
scaling) captures a universal cloaking mechanism rather than a scene-specific
strategy.

**Paper section**: Results — Symbolic Regression — Cross-Scene Generalization.

---

## Figure 5: PPO Control Action Timeseries
**File**: `fig_action_comparison.png`, `fig_action_comparison.pdf`

**Caption**: Representative PPO control actions for the illusion 1.0L scene,
showing the front cylinder (dominated by drag-error tracking) and rear cylinders
(oscillating in anti-phase). The actions are non-dimensional alpha = omega/U0,
where omega is the cylinder rotational angular velocity. The periodic structure
reflects the vortex shedding cycle of the target cylinder.

**Paper section**: Results — Symbolic Regression — Control Action Analysis.

---

## Figure 6: Master Results Table
**File**: `fig_master_table.png`, `fig_master_table.pdf`

**Caption**: Complete results table for all illusion scenes. Green cells indicate
near-PPO performance (similarity > 95%), yellow indicates moderate degradation
(80-95%), and red indicates significant degradation (< 80%). The 1.5L scene
(gray) is fundamentally non-fittable by symbolic regression due to its
high-frequency action modulation. "% of PPO" shows the formula's performance
as a percentage of the PPO baseline.

**Paper section**: Results — Symbolic Regression — Summary Table.

---

## Data Sources

All numerical values in these figures are derived from:
- `scene_registry.json` — canonical result registry
- `results/validations/*.json` — CFD closed-loop validation outputs
- `data/*/controlled.npz` — PPO inference data (actions, sensors, forces)

## Reproduction

To regenerate all figures:
```bash
PYTHONPATH=src conda run -n pycuda_3_10 python -m SR_analysis.archive.stage4.stage_4_analyze
```
