The matrices, cookbooks, playbooks, and code templates provided by this skill are allknowledge referencesrather thandecision instructions. For the same competition problem, different teams should rightly have different modeling paths. The recommendations in the matrix are only technical starting points— your task is to combine the specific constraints of the problem, the data characteristics, and the team's judgment to makereasoned choices, rather than copying the recommendations.
Usage workflow
After receiving a problem-solving task, operate according to the following five-stage workflow.
Step 0: Determine the user's entry point
First determine at which stage the user enters:
- Has new problem text, starting from scratch -> Stage 1
- Already has problem analysis results, needs model recommendations -> Stage 2
- Needs to first search the literature before deciding which model to choose -> Stage 1.5
- Has determined the model, needs algorithm development and code -> Stage 3
- Modeling is complete, needs to connect to the paper -> Stage 4
- The user directly specified a model name(e.g., "solve with GA") -> Stage 3, skip Stages 1-2
- The user input matches a known problem type -> Load the corresponding Playbook to obtain a complete solution demonstration (the 12 Playbooks cover all problem types of national competition A/B/C + American competition D/E/F)
Stage identification rules
| The user says | Entry stage |
|---|---|
| "How do I solve this problem" + paste the problem | Stage 1 |
| "Help me analyze this problem" | Stage 1 |
| "Help me search for literature on similar problems" | Stage 1.5 |
| "Are there papers on similar problems that I can refer to" | Stage 1.5 |
| "Which model is good to choose" | Stage 2 |
| "How to choose between XGBoost and random forest" | Stage 2 |
| "Help me write GA code" | Stage 3 |
| "How is this formula derived" | Stage 3 |
| "Modeling is done, preparing to write the paper" | Stage 4 |
| "Help me write the abstract" | Stage 4 -> guide switching to the paper skill |
Stage 1: Problem decomposition and analysis
Goal: Determine the mathematical essence of each subproblem and output structured analysis results.
Automatically load:references/problem-decomposition.md
Steps:
- Read the problem text provided by the user and extract key information
- According to
problem-decomposition.mdmethodology, determine the mathematical essence type for each subproblem (12 types in total):- prediction/regression, classification/discrimination, evaluation/ranking, optimization/decision-making, mechanism/physics, clustering/grouping, association/causality, game/strategy
- Geometry/Kinematics, Statistical Inference/Experimental Design, Network Science/Graph Theory, Ecosystems/Environment
- Clarify for each sub-problem: input variables, output objectives, constraints
- Analyze the data flow and progressive relationships between sub-problems
- Output structured analysis results (see the output format below)
Output Format:
## 题目拆解
### 题目概况
- 比赛类型:[国赛/美赛]
- 题型:[A/B/C/D/E/F]
- 核心场景:[一句话概括]
### 子问题分析
#### 子问题一:[标题]
- 数学本质:[预测/评价/优化/机理/分类/...]
- 输入:[哪些变量/数据]
- 输出:[需要得到什么]
- 约束:[有哪些限制条件]
- 难点:[关键挑战]
#### 子问题二:[标题]
...
### 子问题关系
[描述数据流:问题一的输出如何成为问题二的输入]
### 整体建模流程图(文字描述)
问题一([本质类型]) → [中间结果] → 问题二([本质类型]) → [中间结果] → 问题三([本质类型])
After completion: Pause and wait for the user to confirm the analysis results. After confirmation, proceed to Phase 1.5.
Phase 1.5: Literature Search
Objective: Use literature evidence to support model selection—know "how others solve this type of problem" before deciding "how we will solve it."
Trigger Condition: Executed after Phase 1 is completed. If the user explicitly indicates that literature search is not needed (e.g., they have already searched themselves, have a clear model preference, or are pressed for time), proceed directly to Phase 2.
Auto-load:../math-modeling-paper/references/literature-review.md(cross-skill reading, only load the first part "Literature Search", do not expand the full text)
🚨 Hard limit (to prevent infinite searching, must be followed):
- Execute at most 5 WebSearch calls(do not search for every search formula, it is 5 times in total)
- Stop immediately after finding 5-8 highly relevant papers, there is no need to exhaust all search formulas
- T2/T3 fallback is only executed when the user explicitly requests it, do not automatically cascade fallback
- If satisfactory results have already been found in the first 3 searches, skip directly to Step 4 to organize the evidence and do not continue searching
Steps:
- From the search keywords already generated in Step 4 of Phase 1,select only the 2-3 most core groups(not all of them), with at least 1 group each in Chinese and English—English covers international journals, Chinese covers the core journals of CNKI/Wanfang/VIP
- Inform the user: briefly list the suggested 2-3 groups of search formulas (a mix of Chinese and English is fine, no need for 3-5 groups each), and explain the source grading. See
literature-review.mdSection 1.3 - Ask the user: "Do you need me to search on your behalf? An estimated 3-5 searches will cover the core literature (half in Chinese and half in English). If you have already searched yourself, you can directly tell me the literature you found, and we will skip this step."
- User agrees → Execute Step 4, use Google Scholar / Semantic Scholar for English, and directly use WebSearch with Chinese keywords for Chinese (covering public pages of CNKI/Wanfang/VIP),do not go through the three-level cascade T1→T2→T3
- User refuses or already has literature → Skip searching, directly ask the user to provide the literature they found, and proceed to Step 5
- Execute search (follow the hard limit):
- Chinese-English allocation: Among the 5 searches, 2-3 in English + 2-3 in Chinese (for Chinese searches, directly use Chinese keywords in WebSearch, e.g.,
"玻璃文物" "成分分类" 机器学习) - Chinese journal identification: In the search results, links from
cnki.net、wanfangdata.com.cn、cqvip.comusually correspond to papers indexed by CNKI/Wanfang/VIP. Prioritize Chinese papers marked as "core journal", "EI indexed", "SCI indexed", "CSSCI", "CSCD" - After each search, check: Have 5+ relevant papers been found (Chinese and English combined)? Yes → stop searching
- Have 5 WebSearch calls already been used? Yes → stop searching
- Extract from the search results: what methods were used for similar problems? How do the effects of each method compare? Is there a generally recognized benchmark method?
- Mark journal quality: English journals prioritize SCI Q1/Q2; Chinese journals prioritize first-level journals/core journals (see
literature-review.mdSection 1.5 journal classification); avoid citing general journals/conference short papers as much as possible
- Chinese-English allocation: Among the 5 searches, 2-3 in English + 2-3 in Chinese (for Chinese searches, directly use Chinese keywords in WebSearch, e.g.,
- Output a literature evidence summary(journal level must be marked):
## 文献检索摘要
### 子问题一:[标题]
| 检索式 | 关键发现 |
|--------|---------|
| "[检索式1]" | [1-2句话:什么方法被用了、效果如何,来自什么级别期刊] |
| "[检索式2]" | [1-2句话] |
**方法分布**(按期刊含金量排序):
- 方法A — [N]篇,代表:[Author (Year), 期刊名, SCI Q1/Q2] 在 [场景] 中达到 [性能]
- 方法B — [M]篇,代表:[Author (Year), 期刊名, 中文核心]
**对本题的启示**:[1-2句话]
- Carry the literature evidence into Stage 2 — each candidate model recommendation should cite the search findings
After completion: pause for confirmation, then proceed to Stage 2.
Stage 2: Model matching
Goal: recommend the most suitable model for each subproblem, and provide comparisons and reasons combined with literature evidence.
Auto-load:references/model-selection-matrix.md
Load on demand: the cookbook for the corresponding domain (e.g., if it is determined to be an optimization problem → load cookbook-optimization.md)
Steps:
- For each subproblem, check
model-selection-matrix.mdthe matrix corresponding to the essential type in - Match models according to scenario characteristics (sample size, linear/nonlinear, interpretability requirements, etc.)
- Combine with the literature search results from Stage 1.5: if similar problems in the literature generally use a certain method, mark it as "literature-supported" in the recommendation; if the matrix recommendation is inconsistent with the mainstream literature, explain why
- Give at least 2 candidate models for each subproblem, proposed from different matrix dimensions or different perspectives. The matrix is only a starting point — you should combine the specific constraints of the problem, data characteristics, literature evidence, and team judgment to make areasoned choice
- Explain the applicable boundaries of each candidate model: under what conditions is A more preferable? Under what conditions is B more preferable?
- If multiple matrix entries match at the same time (e.g., both 0-1 variables and multi-objective), follow the
model-selection-matrix.mdstarting withconflict resolution rulesto handle it - If multiple domains are involved, load the corresponding cookbook for deeper understanding
Principles for using the matrix:
The matrix isknowledge referencerather thanlookup results. For the same competition problem, different teams should reasonably have different modeling paths. To reduce the high consistency in model selection when different users use this skill independently:
- Understand each row in the matrix as "candidate model A vs candidate model B; the choice depends on the specific scenario trade-offs" — do not interpret the matrix as the only correct answer
- When multiple matrix entries are applicable at the same time, listthe different recommendations pointed to by each entry, and let users choose according to their own background and preferences
- When users choose between two candidate models of comparable strength, encourage them to prefer the one they are more familiar with and for which they have more code resources
Output format:
## 模型推荐
### 问题一:[标题]
| 维度 | 内容 |
|------|------|
| 数学本质 | [类型] |
| 场景特征 | [样本量/线性度/可解释性要求/...] |
| 匹配的矩阵条目 | [列出所有适用的矩阵行,如:(a)"含整数/0-1变量"→IP, (b)"多目标冲突"→NSGA-II] |
| **候选模型A** | **[模型名]** — 更适用于 [条件] |
| **候选模型B** | **[模型名]** — 更适用于 [条件] |
| 文献证据 | 方法A:[Author (Year), 期刊名, 级别], [性能];方法B:[Author (Year), 期刊名, 级别], [性能] |
| 选择建议 | [在本题的特定场景下,A和B各自的优势和风险,何种情况下选A、何种情况下选B] |
| 不选A的情况 | [什么具体条件下应放弃A选B] |
### 问题二:[标题]
...
After completion: pause and wait for the user to confirm the model selection. After confirmation, proceed to Stage 3.
Stage 3: Algorithm development + code generation
Goal: for the confirmed model, provide formula derivations, algorithm pseudocode, and runnable code adapted to the problem.
Auto-load: the corresponding cookbook + code-templates/ templates for the corresponding language and domain under
Loading rules:
- Optimization category →
cookbook-optimization.md - ML/data category →
cookbook-ml.md - Evaluation type →
cookbook-evaluation.md - Mechanism type →
cookbook-mechanistic.md - Statistics type →
cookbook-statistical.md - Graph theory/network type →
cookbook-network.md - Clustering/grouping type →
cookbook-clustering.md - Game/strategy type →
cookbook-game-theory.md - MCM/ICM Problem D/E/F or involving network science/ecology/policy →
mcm-specific-guide.md
Steps:
- Extract the algorithm's "problem adaptation framework" from the cookbook
- Map the problem's specific variables and constraints into the algorithm framework
- Provide the adapted formula derivation (starting from the problem, not copied from a textbook)
- Generate algorithm pseudocode (Input / Output / Steps format)
- Load the corresponding code template,replace all variable names, function names, and comments in the templatewith the specific content of this problem. The template only provides the algorithmic logic skeleton—every line of the final code should be rewritten around this problem: variable names use the symbols from the problem, function names describe this problem's operations, and comments explain why it is calculated this way. If two teams use the same template to solve the same problem, the resulting code should be completely different in naming and comments
- If the user has not specified a language, default to Python; for physics/engineering, default to MATLAB
Output format:
## 算法展开:[模型名]
### 问题适配
[将本题的具体变量/约束映射到算法框架]
### 公式推导
[从问题出发的公式推导,LaTeX 格式]
### 算法伪代码
\`\`\`
Algorithm: [名称]
Input: [具体输入变量]
Output: [具体输出变量]
Steps:
1. [步骤]
2. ...
\`\`\`
### Python 代码
\`\`\`python
[完整可运行代码,含注释和问题适配点]
\`\`\`
### 关键参数说明
| 参数 | 含义 | 取值依据 | 建议范围 |
|------|------|---------|---------|
| ... | ... | ... | ... |
After completion: pause and wait for user confirmation. After confirmation, proceed to Phase 4.
Phase 4: Paper integration
Goal: organize the modeling results into draft paper fragments and guide the switch to the paper skill.
Automatically load:references/paper-bridge.md
Steps:
- According to the mapping table in paper-bridge.md, reorganize the outputs of each phase into paper chapter fragments
- Formulas uniformly use LaTeX format (
$$ $$or$ $) - Result data is given in Markdown tables
- Pseudocode uniformly uses algorithmic style
- Output
[PAPER_READY]switch signal
Output format:
## 论文草稿片段
### 问题重述草稿
[阶段1拆解结果整理为论文规范的"问题重述"]
### 问题分析草稿
[阶段1+1.5+2的整合,含文献依据、为什么选这些模型、建模流程图]
### 文献综述草稿(如有检索)
[阶段1.5的文献证据整理为论文可用的综述段落]
### 模型建立与求解草稿
[阶段3的公式+伪代码,按子问题组织]
### 附录代码
[阶段3生成的完整代码]
---
[PAPER_READY] 建模方案已完成。建议切换到 **math-modeling-paper** skill 继续论文写作。
当前输出的论文草稿片段可直接嵌入正文各章节。
Rules between phases
- Each phase must pause, waiting for user confirmation before proceeding to the next phase
- The user may skip phases: if the user says "just give me the code," that is equivalent to skipping Phases 1-2. Phase 1.5 (literature search) is recommended but may be skipped—if the user has already searched on their own, has a clear model preference, or is pressed for time, they may proceed directly to Phase 2
- The user may go back: if in Phase 3 the model is found unsuitable, they may return to Phase 2 to rematch; if they doubt the direction of model selection, they may return to Phase 1.5 to supplement the literature search
- Playbook reference: at the end of Phase 1, check whether it matches a known problem-type template. If it matches, load the corresponding playbook as a reference for ideas—the playbook shows one feasible path, not the only path. The problem you encounter will definitely differ from the playbook's example: different data, different constraints, different requirements. The value of the playbook is to let you see "how this type of problem is generally approached," not "what should be copied for this problem." Always start from your problem, not from the playbook
- Language preference: confirm during the first interaction whether the user prefers Python or MATLAB. For physics/engineering (Problem A), default to MATLAB; for data/ML (Problem C), default to Python; for optimization (Problem B), either is acceptable
Reference resources
references/problem-decomposition.md— problem decomposition methodology (12 problem types, including keyword generation for literature search in Step 4)references/model-selection-matrix.md— Model Decision Matrix (95+ scenarios)references/paper-bridge.md— Paper Linking Rules (including literature→paper bridging)references/mcm-specific-guide.md— MCM/ICM Special Topics: Model Naming/Memo/Letter/Our Work/Transferability Checkreferences/cookbook-optimization.md— Optimization Algorithm Manual (GA/PSO/SA/LP/DP; see NSGA-II inreferences/code-templates/python/optimization/nsga2_template.py)references/cookbook-ml.md— ML Algorithm Manual (XGBoost/RF/SVM/NN)references/cookbook-evaluation.md— Evaluation Method Manual (TOPSIS/AHP/Entropy Weight/Fuzzy)references/cookbook-mechanistic.md— Mechanistic Modeling Manual (Heat Conduction/ODE/Geometry/Optics/Fluid/Vibration)references/cookbook-statistical.md— Statistical Method Manual (Hypothesis Testing/ANOVA/DOE/Monte Carlo/Bayesian/Compositional Data/Time Series/Grey Relational Analysis)references/cookbook-network.md— Graph Theory and Network Algorithm Manual (Network Flow/Shortest Path/Centrality/K-Shell/Bipartite Matching/Multilayer Networks)references/cookbook-clustering.md— Clustering Method Manual (Hierarchical Clustering/K-Means/DBSCAN/GMM/Compositional Data CLR Transformation)references/cookbook-game-theory.md— Game Theory Modeling Manual (Static/Dynamic/Evolutionary Games/Nash Equilibrium/Stackelberg)references/playbooks/— 12 complete example problems worked through end to end (National Competition: Physical Mechanisms/Scheduling Optimization/Strategic Games/ML Classification/ML Regression/Evaluation Decision-Making/Path Planning/Data Insights/Geometric Kinematics; MCM/ICM: Network Science/Environmental Science/Policy Analysis)references/code-templates/— Python & MATLAB runnable code templates (22 Python + 7 MATLAB)- Cross-skill:
../math-modeling-paper/references/literature-review.md— Literature Search Strategies, Review Writing, Citation Formats, Parameter Provenance (automatically loaded in Stage 1.5)