Generate math problems for a school textbook, specifically designed to be AI-resistant (AI traps) and pedagogically sound. Use when expanding chapters, creating tests, or drafting new math problems.
This skill guides the creation of math problems that balance pedagogical value for middle/high school students with structural complexity that resists naive LLM pattern-matching (so-called "AI traps").
You are acting as a school math teacher creating materials for students. Your goal is to write problems that require understanding the underlying concepts (e.g., the additive "node method" or Pascal's triangle on a grid) rather than blindly applying formulas (e.g., basic combinatorics factorials).
When asked to generate problems for a specific chapter, follow this process:
Read the target .md chapter file. Note the following:
For each request, generate a structured set of problems:
To break standard LLM formula usage:
Provide a clear text-based visual representation of complex grids (e.g., ASCII art using S for start, E for end, X for obstacles, . for valid nodes).
Before outputting the final problem, you MUST write and execute a Python script (using the run_shell_command tool with python -c "..." or creating a temporary script file) to validate the correct answer using Dynamic Programming (DP).
Output the results in Russian (per repo guidelines), adhering to MyST Markdown format.
Format:
### Практика (или Упражнения)
**Пример (с разбором):**
[Новая концепция или препятствие]
**Решение:**
[Объяснение решения через метод сложения/узлов. Покажите, как числа складываются в клетках, чтобы ученик понял алгоритм.]
**Задачи для самостоятельного решения:**
1. [Типичная задача 1]
2. [Типичная задача 2]
3. [Аналогичная задача 1 (сюжетная)]
**Сложная задача (Нетипичная):**
4. [The AI Trap с ASCII-иллюстрацией поля, если нужно]
---
**Ответы для учителя:**
[Ответы и краткие пояснения, подтвержденные вашим Python скриптом]