DDx (Dynamic Diagnosis) is an intelligent, iterative problem-solving system inspired by the critical-thinking process seen in House M.D.. It is designed to break down complex mathematical problems into manageable phases, leveraging multiple agents to collaboratively solve and refine solutions.
-
Phased Problem Solving: DDx splits problem-solving into six logical phases:
- Understanding: Decipher the problem statement and identify goals.
- Decomposition: Break the problem into smaller, solvable components.
- Planning: Create a strategy to solve the subproblems.
- Execution: Solve each component systematically.
- Verification: Validate the solutions against the original problem.
- Compilation: Combine results into a cohesive final answer.
-
Interactive Agents: Mimics the dynamic interaction of "House" (critical guide) and "Team" (problem solvers) to iteratively improve solutions.
-
Tool Integration: Leverages symbolic computation (e.g., SymPy) for mathematical operations during the execution phase.
-
Verbose Debugging: Option to enable detailed output for tracking agent reasoning and decision-making.
- Input a Problem: Provide a complex mathematical or symbolic problem to DDx.
- Iterative Problem-Solving:
- The "House" agent oversees the process, iteratively questioning and refining the solution.
- The "Team" agent generates outputs for each phase.
- Tools & Execution: Utilize computational tools like SymPy for precise calculations.
- Verification & Refinement: Validate and refine solutions until the "House" agent is satisfied.
- Final Answer: Output a fully solved and explained solution.
from ddx_ai import DDx
DDx("<question>", verbose=False)
Nondimensionalize the polynomial: [ P(x) = a_1 x^{25} + a_2 x + a_3 ] into the form: [ \epsilon y^{25} + y + 1 ] Express (\epsilon) as a function of (a_1), (a_2), and (a_3).
-
Understanding Phase:
- Identify the goal: Transform the polynomial into the specified nondimensional form.
- Extract key coefficients: (a_1), (a_2), (a_3).
-
Decomposition Phase:
- Break the problem into:
- Variable scaling ((L)) to make (y^1) coefficient equal to 1.
- Normalizing the constant term to 1.
- Calculating (\epsilon).
- Break the problem into:
-
Execution Phase:
- Perform substitutions: (x = L y), where (L = \frac{1}{a_2}).
- Solve for (\epsilon = \frac{a_1 a_3^{24}}{a_2^{25}}).
-
Verification Phase:
- Substitute back into the polynomial to ensure it matches the desired form.
-
Compilation Phase:
- Final answer: [ \boxed{\epsilon = \frac{a_1 a_3^{24}}{a_2^{25}}} ]
- Iterative Refinement:
- Mimics real-world diagnostic processes to refine solutions through critical questioning.
- Dynamic Interactions:
- Encourages agents to think critically, ensuring high-quality solutions.
- Phased Approach:
- Logical segmentation for tackling complex problems methodically.