Skip to content

Latest commit

 

History

History
192 lines (139 loc) · 10.9 KB

File metadata and controls

192 lines (139 loc) · 10.9 KB

🧮 Math Modeling Trainer

Interactive AI Coach for Mathematical Modeling Competitions (CUMCM, MCM/ICM)

License: MIT PRs Welcome Platform Target: CUMCM & MCM/ICM HOL Verified

English中文文档Algorithm Selection GuideTraining TemplateExamples


💡 Why Math Modeling Trainer?

When preparing for mathematical modeling competitions such as CUMCM (China Undergraduate Mathematical Contest in Modeling), MCM/ICM (Mathematical Contest in Modeling), or HiMCM, most students encounter key bottlenecks:

Dimension Traditional Static GitHub Repos Generic LLMs (ChatGPT / DeepSeek) 🌟 Math Modeling Trainer (This Project)
Problem Diversity Limited to historical contest problems Always repeats the same drone/SEIR problem prompts 🛡️ 5-Round Cross-Disciplinary Cooldown: strictly rotates across 8 diverse industrial/scientific scenarios
Interaction Mode Passive reading of static solution PDFs Dumps 3000-word full answers and code immediately 🎯 Socratic Step-by-Step Mentoring: problem understanding -> qualitative framing -> top-level skeleton -> algorithm intuition
Algorithm Rigor Blindly copying packages without boundary knowledge Suggests fragile models with zero consideration of contest grading criteria 🧠 Dual-Direction Algorithm Defense: explains why this method works AND why alternative candidates fail
Review & Archiving Fragmented notes lost after sessions Dialogues disappear without reusable outputs 📋 5D High-Score Review Cards: formatted code block ready for 1-click export to Obsidian / LaTeX

🏗️ Core Architecture & Flowchart

graph TD
    Start([User Invocation: Start Contest Practice / Review]) --> CheckCooldown[1. Read Cooldown Board in 历史记录.md]
    CheckCooldown --> FilterPool[2. Filter Out Scenarios & Models in 5-Round Cooldown]
    FilterPool --> PickScenario[3. Select Fresh Cross-Disciplinary Scenario from Pool]
    
    subgraph Socratic_Coaching [Contest-Grade Q1~Q4 Step-by-Step Guidance]
        Present[Present Complete Problem Background, Parameters & Q1~Q4] --> Q1[Start Guidance for Q1]
        Q1 --> S1[① Qualitative Framing: Optimization / Prediction / Evaluation]
        S1 --> S2[② Top-Level Skeleton: Decision Variables, Physical Bounds, Objectives]
        S2 --> S3[③ Algorithm Intuition: Guide user to formulate the computer search logic]
        S3 --> S4[④ Academic Naming & Dual-Defense: Why this works vs failure modes of others]
        S4 --> Card1[⑤ Generate 5D High-Score Review Summary Card]
        Card1 --> Q2[Proceed to Next Sub-Question...]
    end
    
    PickScenario --> Present
    Card1 -. Automatic Archival .-> UpdateLog[4. Automatically Append to 历史记录.md Log]
Loading

⚡ 10-Second Quick Start

Option 1: For Cursor Users (Recommended)

Clone this repository into your workspace, or copy .cursor/skills/math-modeling-daily-review/ directly:

# In your workspace root
mkdir -p .cursor/skills
git clone https://github.com/Dunphil692/math-modeling-trainer.git temp-repo
cp -r temp-repo/.cursor/skills/math-modeling-daily-review .cursor/skills/
cp temp-repo/templates/历史记录.md ./历史记录.md
rm -rf temp-repo

Option 2: For Google Antigravity Users

Symlink into your global skills directory:

ln -s /path/to/math-modeling-trainer/skills/math-modeling-daily-review ~/.gemini/config/skills/

Option 3: For Claude Code / OpenCode / Any Agent CLI

Place SKILL.md and 历史记录.md in your workspace, then ask in your conversation:

"Start mathematical modeling contest practice mode, generate a full contest-grade problem for today"


🎮 Five Full-Cycle Interactive Modes

This Skill covers the complete lifecycle of math modeling competitions from daily algorithm training $\rightarrow$ pre-contest mock drilling $\rightarrow$ 72h war-room guidance $\rightarrow$ post-contest judge review:

Mode Trigger Phrases Core Value Delivered
Mode A: Deep Algorithm Review "Review ARIMA", "Explain TOPSIS" Problem intuition, formal formulation, hyper-parameter physics, pros/cons.
Mode B: Interactive Drill & Quiz "Quiz me", "Test my understanding" Concept discrimination questions on edge cases and algorithm pitfalls.
Mode C: 5-Round Cooldown Contest Drill "Generate contest problem", "Mock CUMCM" 8-scenario cooldown rotation, Q1~Q4 step-by-step guidance, 5D review cards.
Mode D: 72h In-Contest War-Room "War room mode", "Problem selection & plan" 3D feasibility scoring, 3-member 72h Gantt scheduling, 300-word abstract formula.
Mode E: Contest Judge Paper Review "Review my paper draft", "Judge paper defense" 100-point deduction audit: abstract numbers, invalid assumptions, dual defenses.

🎨 Academic Publication-Grade Visualization & Solvers

The repository includes ready-to-run Python scripts featuring Nature / Science / IEEE palettes:

visualization/ (Plotting Toolkit)
├── plot_style.py                  # 1-click Nature/Science styling & font management
├── pareto_front_3d.py             # 3D Multi-Objective Pareto front surface & projections
├── convergence_comparison.py      # Multi-algorithm convergence plot with ±1σ shadow bands
├── sensitivity_heatmap.py         # 2D Parameter cross-perturbation sensitivity heatmap
└── network_spatial_trajectory.py  # Vehicle / drone spatial routing & network topology

solvers/ (Optimization Scaffolds)
├── pulp_mixed_integer.py          # Mixed Integer Linear Programming (MILP) scaffold
├── scipy_sqp_optimization.py      # Constrained Non-linear Programming (SLSQP) scaffold
└── monte_carlo_sensitivity.py     # Monte Carlo parameter uncertainty robustness framework

📋 5D High-Score Review Summary Card Example

After finishing each sub-question, the AI coach automatically produces a self-contained 5D review summary card in a clean monospace block:

================================================================================
          【Sub-Question Q1: Semiconductor Multi-Stage Sampling & Decision】5D Review Card
================================================================================
[Problem & Parameters]
- Nominal defect rate p0 = 10%, confidence level 1-alpha = 95%, consumer tolerance beta = 10%
- Determine optimal sample size n and threshold k balancing producer & consumer risks.

--------------------------------------------------------------------------------
① 📌 Model Architecture
   - Model Type: Statistical Quality Control (SQC) / Hypothesis Testing & Sampling Design
   - Decision Variables: Sample size n in Z+, Rejection threshold k in Z+
   - Constraint Bounds: P(X > k | p <= p0) <= alpha, P(X <= k | p >= p1) <= beta
   - Objective: min n (Minimize testing cost while satisfying dual risk boundaries)

② 🧠 Algorithm & Rationale
   - Search Intuition: Binomial OC (Operating Characteristic) Curve Grid Search
   - Solver Engine: Discrete bisection scan using scipy.stats.binom.cdf.

③ 🛡️ Dual Defense & Pitfall Warning
   - Why this algorithm: Fully compliant with international inspection standards (ISO 2859-1).
   - Why NOT Gaussian approximation: When n*p < 5, normal approximation introduces severe truncation errors, leading to high false-positive rates (major grading deduction point).

④ 📊 Qualitative Insights
   - Sample size n scales super-linearly with confidence requirements; inspection strictness trades off with unit testing cost.

⑤ 🔗 Next Step Bridge
   - Expected residual defect rate from Q1 directly serves as the prior input probability for Q2 assembly stages!
================================================================================

📚 Comprehensive Algorithm Coverage

Includes ready-to-use cheat sheets and mathematical formulation templates:

  • 📊 Evaluation Models: AHP, TOPSIS, Entropy Weight Method, Fuzzy Comprehensive Evaluation, Grey Relational Analysis, DEA, CRITIC.
  • 📈 Forecasting Models: Multivariate Linear/Logistic Regression, Time Series (ARIMA/SARIMA), Grey Model GM(1,1), SVR, LSTM, Epidemiological SIR dynamics.
  • ⚙️ Optimization Models: Linear/Integer Programming (MIP), Non-linear Programming (NLP), Multi-Objective Pareto Optimization, Dynamic Programming, Genetic Algorithms (GA), Particle Swarm Optimization (PSO), Simulated Annealing (SA), Shortest Path (Dijkstra/Floyd).
  • 🤖 Statistics & Machine Learning: K-Means/DBSCAN, PCA, Random Forest/GBDT/XGBoost/LightGBM, SVM, Cellular Automata, Monte Carlo Simulation.

📂 Repository Navigation


🤝 Contributing

Contributions are warmly welcome!

  1. Add new cross-disciplinary scenarios to templates/历史记录.md.
  2. Enrich algorithm defenses & counter-examples in references/algorithm-selection-guide.md.
  3. Contribute new publication-grade plots to visualization/.
  4. Submit full problem walk-through examples to examples/.

Please review our Contributing Guide (CONTRIBUTING.md).


📄 License

This project is licensed under the MIT License.

If you use this project in your academic training or research, please consider citing it using CITATION.cff.