Appendix A: Inside the Metabolic Simulation Engine

In the main post, we explored the "Blade Runner Problem"—AI systems that simulate competence rather than earn it. RecipeAlchemy.ai originally fell into this trap, generating outputs that looked rigorous but weren’t grounded in actual logic.

This appendix explains how the rebuilt engine avoids that failure mode. It models your body’s response to diet, movement, and medication using published science, verifiable equations, and transparent logic. If it gives you a number, it can show you exactly how it got there.


🔍 What the Engine Simulates

  • Body Composition Change
    Predicts fat and lean mass shifts over time with calorie changes.
  • MATADOR Protocol (Intermittent Dieting)
    Alternates restriction and recovery phases to preserve metabolic rate.
  • Activity Modeling
    Accounts for work, non-exercise movement, and exercise to calculate total energy expenditure.
  • GLP-1/Tirzepatide Effects
    Adjusts metabolism and body composition predictions for medications like Ozempic or Mounjaro.
  • Monte Carlo Projections
    Simulates a range of outcomes based on realistic lifestyle variability.

⚙️ Selected Algorithms

1. Resting Metabolic Rate (RMR)

// Lean individuals
return 370 + (21.6 * leanMass);

// General population
return 10 * weight + 6.25 * height - 5 * age + genderModifier;

Sources: Mifflin-St Jeor, Katch-McArdle, Frankenfield et al.
Accuracy: ±7–8%


2. Adaptive Thermogenesis — The “Biggest Loser” Effect

In a landmark study of The Biggest Loser contestants, participants lost massive amounts of weight—but also saw permanent drops in metabolic rate. Years later, even after regaining weight, their bodies burned fewer calories than before.

This is adaptive thermogenesis: a protective response where the body suppresses metabolism during prolonged calorie deficits.

// Calculates time- and weight-based slowdown
totalAdapt = min(weeks * rate + percentWeightLost * impact, maxCap);

Key insights:

  • Metabolic rate may drop 10–20% during long-term dieting
  • Recovery takes time—even with maintenance eating
  • Diet breaks modeled to restore ~50% of suppressed metabolism

Sources: Trexler et al. (2014), Hall et al. (2016), Rosenbaum & Leibel (2008)


3. Monte Carlo Activity Simulation

  • Runs lifestyle scenarios with different adherence levels
  • Includes changes in NEAT (non-exercise activity thermogenesis)
  • Outputs full range of possible results—not just averages

Purpose: Shows best/worst/most likely outcomes before you begin
Sources: Hall et al. (2011), Pontzer et al. (2016)


4. Protein Synthesis Rate Modeling — Preserve the Muscle That Matters

Losing weight is easy. Losing the right kind of weight—mostly fat while preserving muscle—is the real challenge. This algorithm estimates your body’s protein synthesis capacity, i.e., how much lean mass it can maintain or build given current conditions.

// Accounts for age, protein intake, deficit severity, and activity
synthesisRate = base * activityModifier * proteinModifier * deficitPenalty;

Sophistication:

  • Declines with age (~1% per decade after 30)
  • Suppressed by calorie deficit
  • Enhanced by resistance training and high protein intake
  • Plateaus above ~2.2g protein/kg LBM/day

Example output:

{
  "totalDailyGrams": 98.2,
  "limitingFactors": {
    "age": 0.87,
    "deficit": 0.78,
    "protein": 1.03,
    "activity": 1.15
  }
}

Sources: Phillips (2011), Morton et al. (2018), Helms et al. (2014)


🧪 Scientific Integrity

  • All models are backed by peer-reviewed studies
  • Validated against clinical datasets (e.g. CALERIE, NHANES)
  • Outputs include error margins and confidence intervals
  • Testing includes synthetic profiles and anonymized user outcomes

💡 Why This Matters

The original version of RecipeAlchemy.ai looked impressive—but simulated its results without ever calculating them. That’s the heart of the Blade Runner Problem: performance you can’t verify, metrics you can’t trust.

This engine fixes that.

Every calorie estimate, every protein target, every prediction comes from validated, explainable logic. It doesn’t just generate numbers—it earns them.