Maximize the dynamic aperture (DA) area of the PETRA-4 booster synchrotron ring by optimizing two sextupole strengths (DBA_k2 and SF_h), subject to chromaticity feasibility constraints (both horizontal and vertical chromaticities must be >= 0).
The optimization uses the mpBAX framework: a Bayesian optimization loop that trains neural network surrogate models of expensive physics simulations, then uses those surrogates to propose new candidate solutions.
Only train.py. You can:
- Tune hyperparameters: learning rates, network sizes, training schedules, number of loops, initial samples, grid resolution, etc.
- Modify the Algorithm.propose() strategy: replace COBYLA with other optimizers (L-BFGS-B, differential_evolution, dual_annealing), add multi-start optimization, change candidate selection logic
- Adjust model configuration: model architecture params (dropout, neurons, epochs), training mode, early stopping
- Implement adaptive strategies: e.g. start coarse then refine, decay learning rate, schedule proposal counts across loops
- Add exploration mechanisms: propose some points from uncertain regions, use acquisition functions
prepare.py— the physics (lattice, oracles, utilities)evaluate.py— the metric computationprogram.md,CLAUDE.md— instructions
DA area in mm^2 of the best feasible solution, evaluated with the real physics oracle.
Higher is better. Printed as METRIC: <value> at the end of the run.
Total runtime must be under 10 minutes.
- Hyperparameter balance: Finding the right tradeoff between initial samples, number of loops, and model capacity within the time budget
- Propose strategy: Replace single-start COBYLA with multi-start optimization, evolutionary methods, or Bayesian acquisition functions
- Sampling efficiency: Better initial designs (Sobol, stratified), or adaptive sampling that targets interesting regions
- Model improvements: Try different model_type ('fc' vs 'split' vs 'sine'), adjust network depth/width, tune dropout/regularization
- Training strategy: retrain vs finetune mode, weight schemes for new vs old data, learning rate schedules
- Curriculum learning: Start with coarse grid/few turns, increase fidelity in later loops