Skip to main content

Plan Generation Engine

How MoPlan creates personalized workout programs.


Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│ PLAN GENERATION ENGINE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ EXERCISE │───▶│ CAPABILITY │ │
│ │ SELECTOR │ │ RECOMMENDER │ │
│ └─────────────────┘ └────────┬────────┘ │
│ │ │ │
│ │ Equipment, │ Rep ranges, │
│ │ Goals, Experience │ Sets, Load │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ PERIODIZATION │◀───│ ADAPTIVE │ │
│ │ ENGINE │ │ LEARNING │ │
│ └─────────────────┘ └─────────────────┘ │
│ │ ▲ │
│ │ Phase structure, │ Performance │
│ │ Progressive overload │ feedback │
│ ▼ │ │
│ ┌─────────────────────────────────────────┐ │
│ │ GENERATED PLAN │ │
│ └─────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

Component 1: Exercise Selector

Chooses exercises based on user constraints and goals.

Selection Factors

FactorWeightDescription
Equipment MatchHighOnly selects exercises user can perform
Goal AlignmentHighPrioritizes exercises that match primary goal
Muscle FreshnessMediumAvoids overworking recently trained muscles
User PreferenceMediumRespects liked/disliked exercises
VariationLowIntroduces variety to prevent staleness
Injury AvoidanceCriticalExcludes exercises that aggravate injuries

Selection Logic

1. Filter by equipment availability
2. Filter by injury/limitation exclusions
3. Score by goal alignment (compound vs isolation ratio)
4. Score by muscle freshness (48-72hr recovery)
5. Apply user preference modifiers
6. Select top candidates per muscle group

Component 2: Capability Recommender

Determines appropriate sets, reps, and load for each exercise.

Goal-Based Prescriptions

GoalRep RangeSetsRestIntensity (%1RM)
Strength1-54-63-5 min85-95%
Hypertrophy6-123-460-90 sec65-80%
Endurance12-20+2-330-60 sec50-65%
Power1-53-52-3 min70-85% (explosive)

Load Calculation

estimated_load = (estimated_1RM × intensity_percentage)

For new exercises without history:
- Use body weight ratios for compounds
- Start conservative (65% of expected) for first session
- Auto-adjust based on RIR (Reps in Reserve) feedback

Component 3: Periodization Engine

Structures training across weeks and phases.

Training Phases

PhaseDurationVolumeIntensityFocus
Accumulation3-4 weeksHighModerate (65-75%)Build work capacity
Intensification2-3 weeksModerateHigh (75-85%)Increase weight
Realization1-2 weeksLowPeak (85-95%)Test PRs
Deload1 week50%50-60%Recovery

Progressive Overload Rules

IF completed_reps >= target_reps AND RIR <= 2:
next_session_weight += 2.5-5 lbs (upper) or 5-10 lbs (lower)

IF completed_reps < target_reps - 2:
maintain_weight OR reduce by 5%

IF missed_session OR low_energy:
maintain_weight, focus on execution

Component 4: Adaptive Learning

Continuously improves recommendations based on performance data.

Adjustment Signals

SignalAdjustment
Exceeded rep targetIncrease weight next session
Failed to hit repsMaintain or decrease weight
High fatigue ratingSuggest deload or reduce volume
Low fatigue + good performanceConsider adding volume
Consistent misses on exerciseSwap for variation or reduce load
PR achievedCelebrate, recalculate 1RM estimates

Muscle Freshness Tracking

Each muscle group has a recovery score (0-100):
- 0: Just trained, needs recovery
- 50: Partially recovered (24-36 hours)
- 75: Mostly recovered (36-48 hours)
- 100: Fully recovered (48-72+ hours)

Schedule workouts to target muscles at 75%+ freshness

Readiness System

Before each workout, assess user readiness to modify the session.

Readiness Factors

FactorWeightAssessment
Sleep Quality30%Hours slept, quality rating
Stress Level25%Work, life stress indicators
Muscle Soreness20%DOMS from previous sessions
Energy Level15%Current perceived energy
Motivation10%Mental readiness to train

Readiness Score Actions

90-100%: Full workout as planned
70-89%: Reduce volume by 10-20% or intensity by 5-10%
50-69%: Light workout, focus on technique and movement
<50%: Suggest active recovery or rest day (Sage takes over)

Deload Detection

Automatic Triggers

DELOAD TRIGGERS:
├── Planned: Every 4-6 weeks based on periodization
├── Performance: 2+ sessions with declining performance
├── Fatigue: Consistently high fatigue ratings (7+/10)
├── Life stress: User reports high external stress
└── Request: User manually requests a lighter week

Deload Protocol

DELOAD PROTOCOL:
├── Volume: Reduce to 50-60% of normal
├── Intensity: Reduce to 50-70% of working weights
├── Focus: Technique, mobility, recovery
└── Duration: 1 week (3-5 light sessions)

Mini-PRs & Celebrations

Track and celebrate small wins to maintain motivation.

Mini-PR TypeDescriptionExample
Weight PRNew max weight for any rep range"New 8-rep max on bench!"
Volume PRMost sets × reps × weight in session"Most total volume on leg day!"
Streak PRConsecutive workout completions"10 workouts in a row!"
Consistency PRBest weekly/monthly adherence"100% adherence this month!"
Form PRFirst time completing new movement"Mastered the Romanian deadlift!"