-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.lisp
More file actions
478 lines (419 loc) · 17.2 KB
/
Copy pathtest.lisp
File metadata and controls
478 lines (419 loc) · 17.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
;; tests for the hypertrophy simulation
(load "main.lisp")
(defmacro run-scenario (title weeks &body body)
`(progn
(reset-subject)
(format t "~%---~%")
(format t "~a (~a weeks)~%" ,title ,weeks)
(dotimes (w ,weeks)
,@body)
(print-result "Quadriceps" 'quadriceps)
(print-result "Pectorals" 'pectorals)))
(defun print-result (label key)
(let ((m (get-muscle key)))
(format t " > ~a: Mass=~,2f | Length=~,2f | Inflamed=~a | Overreach=~a | Collagen=~,2f~%"
label
(muscle-state-myofibrillar-mass m)
(muscle-state-fascicle-length m)
(muscle-state-inflammation-active m)
(muscle-state-in-overreaching-state m)
(muscle-state-collagen-content m))))
;; light load exercises for rep range testing
(register-exercise 'squat-light '(quadriceps gluteus) 0.7 t 'light)
(register-exercise 'squat-very-light '(quadriceps gluteus) 0.7 t 'very-light)
(register-exercise 'squat-heavy '(quadriceps gluteus) 0.7 t 'heavy)
;; 1. Golden standard: 3 sets 3x/week
(run-scenario "3 Sets x 3 Days/Week (The Golden Standard)" 6
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 48)))
;; 2. Bro split: 9 sets 1x/week (tests atrophy window)
(run-scenario "9 Sets x 1 Day/Week (Bro Split)" 6
(perform-workout 'squat 9 1)
(recover-and-adapt 168)) ;; 7 days recovery
;; 3. Junk volume test: 20 sets 1x/week
(run-scenario "20 Sets x 1 Day/Week (Junk Volume)" 6
(perform-workout 'squat 20 1)
(recover-and-adapt 168))
;; 4. High frequency minimalist: 1 set 6x/week ("set 1 is king")
(run-scenario "1 Set x 6 Days/Week (High Freq Minimalist)" 6
(dotimes (i 6)
(perform-workout 'squat 1 1)
(recover-and-adapt 24))
(recover-and-adapt 24)) ;; Rest day
;; 5. Two-a-days with 8h gap (CNS should recover)
(run-scenario "Two-a-Days (8h Gap)" 6
;; Monday
(perform-workout 'squat 3 1)
(recover-and-adapt 8) ;; CNS recovers here
(perform-workout 'squat 3 1)
(recover-and-adapt 160)) ;; Rest of week
;; 6. Two-a-days with only 1h gap (CNS should tank)
(run-scenario "Two-a-Days (1h Gap - CNS Fatigue Test)" 6
;; Monday
(perform-workout 'squat 3 1)
(recover-and-adapt 1) ;; CNS still high!
(perform-workout 'squat 3 1) ;; This session should be trash
(recover-and-adapt 167))
;; 7. Injury loop: daily heavy training (inflammation never clears)
(run-scenario "Daily Heavy Training (Inflammation Block)" 6
(dotimes (i 7)
(perform-workout 'squat 5 0) ;; 0 RIR, High damage
(recover-and-adapt 24)))
;; 8. Detraining: 4 weeks on, 2 weeks off
(run-scenario "Detraining Phase (2 Weeks Off)" 6
(if (< w 4)
;; Train 4 weeks
(progn (perform-workout 'squat 3 1) (recover-and-adapt 168))
;; Rest 2 weeks
(recover-and-adapt 168)))
;; 9. Long detraining: fascicle length drops faster than mass
(run-scenario "Long Detraining (Fascicle Decay)" 6
(if (< w 2)
(progn (perform-workout 'squat 3 1) (recover-and-adapt 168))
(recover-and-adapt 168)))
;; 10. Exercise selection: flyes (stretch) vs bench (stable)
(run-scenario "Exercise Selection: Flyes (High Damage) vs Bench" 6
;; We will train pectorals 2x a week
(dotimes (i 2)
;; Doing flyes creates more damage per unit of stimulus
(perform-workout 'flye 3 1)
(recover-and-adapt 84)))
;;; Comparison baseline for Scenario 10 manually:
(reset-subject)
(format t "~%[Comparison] Bench Press Only (Same Volume)~%")
(dotimes (w 6)
(dotimes (i 2)
(perform-workout 'bench 3 1)
(recover-and-adapt 84)))
(print-result "Pectorals" 'pectorals)
;; 11. Light vs heavy load (same sets to failure) - similar hypertrophy but different recovery
(run-scenario "Light Load Training (16-30RM) - 3x/week" 6
(dotimes (i 3)
(perform-workout 'squat-light 3 1)
(recover-and-adapt 56))) ;; Light loads need >48h even for small volumes
(run-scenario "Heavy Load Training (1-5RM) - 3x/week" 6
(dotimes (i 3)
(perform-workout 'squat-heavy 3 1)
(recover-and-adapt 56)))
;; 12. Overreaching: too much volume + frequency = stagnation
(run-scenario "Overreaching Protocol (High Vol + High Freq)" 6
(dotimes (i 6) ;; 6 days/week
(perform-workout 'squat 6 0) ;; 6 sets to failure
(recover-and-adapt 24))) ;; Only 24h recovery - insufficient!
;; 13. Muscle memory: train -> detrain -> retrain (MUR ability persists)
(progn
(reset-subject)
(format t "~%---~%")
(format t "Muscle Memory (Train -> Detrain -> Retrain)~%")
(format t "Phase 1: training 6 weeks~%")
;; Phase 1: Build muscle
(dotimes (w 6)
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 48)))
(let ((post-train-mass (muscle-state-myofibrillar-mass (get-muscle 'quadriceps)))
(post-train-mur (muscle-state-motor-unit-recruitment-ability (get-muscle 'quadriceps))))
(format t " > After training: Mass=~,2f MUR=~,2f~%" post-train-mass post-train-mur)
;; Phase 2: detraining - mass lost but MUR retained
(format t "Phase 2: detraining 4 weeks~%")
(dotimes (w 4)
(recover-and-adapt 168))
(let ((post-detrain-mass (muscle-state-myofibrillar-mass (get-muscle 'quadriceps)))
(post-detrain-mur (muscle-state-motor-unit-recruitment-ability (get-muscle 'quadriceps))))
(format t " > After detraining: Mass=~,2f MUR=~,2f (MUR should be retained!)~%"
post-detrain-mass post-detrain-mur)
;; Phase 3: retraining - faster due to muscle memory
(format t "Phase 3: retraining 4 weeks~%")
(dotimes (w 4)
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 48)))
(let ((retrain-mass (muscle-state-myofibrillar-mass (get-muscle 'quadriceps))))
(format t " > After retraining: Mass=~,2f~%" retrain-mass)
(format t " > MUR Ability (retained from prior training): ~,2f~%"
(muscle-state-motor-unit-recruitment-ability (get-muscle 'quadriceps)))
;; Check if retraining was faster than initial training
(format t " > Regain efficiency: Initial 6wk gained ~,2f, Retrain 4wk gained ~,2f~%"
(- post-train-mass 100.0)
(- retrain-mass post-detrain-mass))))))
;; 14. Recovery time precision (2 sets/48h vs 6 sets/48h vs 6 sets/96h)
(run-scenario "2 Sets Every 48h (Should Work Well)" 6
(dotimes (i 3)
(perform-workout 'squat 2 1)
(recover-and-adapt 48))
(recover-and-adapt 24))
(run-scenario "6 Sets Every 48h (Insufficient Recovery)" 6
(dotimes (i 3)
(perform-workout 'squat 6 1)
(recover-and-adapt 48))
(recover-and-adapt 24))
(run-scenario "6 Sets Every 96h (Adequate Recovery)" 6
;; 6-8 sets needs >4 days
(perform-workout 'squat 6 1)
(recover-and-adapt 108) ;; 4.5 days - literature says >4 days needed
(perform-workout 'squat 6 1)
(recover-and-adapt 60)) ;; Remaining week
;; 15. Atrophy rate: exponential decay (fastest losses early)
(progn
(reset-subject)
(format t "~%---~%")
(format t "Exponential Atrophy Test~%")
;; Build some muscle first
(dotimes (w 8)
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 48)))
(format t "After 8 weeks training:~%")
(print-result "Quadriceps" 'quadriceps)
;; Now track atrophy week by week
(format t "~%Tracking atrophy (should be faster early, slower later):~%")
(dotimes (week 4)
(recover-and-adapt 168) ;; 1 week
(format t " Week ~a of detraining: Mass=~,2f Length=~,2f~%"
(1+ week)
(muscle-state-myofibrillar-mass (get-muscle 'quadriceps))
(muscle-state-fascicle-length (get-muscle 'quadriceps)))))
;; 16. Very light loads (30RM+) can't cause venous occlusion = less hypertrophy
(run-scenario "Very Light Load (30RM+) - Same Volume" 6
(dotimes (i 3)
(perform-workout 'squat-very-light 3 1)
(recover-and-adapt 72))) ;; Even more recovery needed
;; 17. Short vs long rest periods (short = less MPS)
(run-scenario "Short Rest Periods (60s) - 3x/week" 6
(dotimes (i 3)
(perform-workout-with-rest 'squat 3 1 60) ;; 60 second rests
(recover-and-adapt 56)))
(run-scenario "Long Rest Periods (180s) - 3x/week" 6
(dotimes (i 3)
(perform-workout-with-rest 'squat 3 1 180) ;; 3 minute rests
(recover-and-adapt 56)))
;; 18. Aerobic interference: MPS elevated but goes to repair, not growth
(progn
(reset-subject)
(format t "~%---~%")
(format t "Aerobic Interference (Strength -> Cardio)~%")
(format t "Phase 1: Strength (6 weeks)~%")
(dotimes (w 6)
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 48)))
(format t " > After strength block: ~%")
(print-result "Quadriceps" 'quadriceps)
;; Phase 2: switch to aerobic - will LOSE gains despite MPS elevation
(format t "Phase 2: aerobic 4 weeks (should lose gains)~%")
(dotimes (w 4)
(dotimes (i 5) ;; 5 cardio sessions per week
(perform-aerobic-workout 'quadriceps 45) ;; 45 min moderate intensity
(recover-and-adapt 34)))
(format t " > After aerobic block (note: MPS was elevated but hypertrophy LOST): ~%")
(print-result "Quadriceps" 'quadriceps))
;; 19. Drop sets: CNS fatigue accumulates, light loads at end = more fatigue
(run-scenario "Drop Sets (3 drops per set) - 2x/week" 6
(dotimes (i 2)
(perform-drop-set 'squat 1 3) ;; 1 main set + 3 drops
(recover-and-adapt 84)))
(run-scenario "Straight Sets (4 sets) - 2x/week [Comparison]" 6
(dotimes (i 2)
(perform-workout 'squat 4 1) ;; Same total "sets"
(recover-and-adapt 84)))
;; 20. Individual variation: high responders (less damage) vs low responders
(progn
(reset-subject)
(set-responder-type 'high-responder)
(format t "~%---~%")
(format t "High Responder - High Frequency~%")
(dotimes (w 6)
(dotimes (i 4) ;; 4x/week with 2 sets - should work for high responders (less damage)
(perform-workout 'squat 2 1)
(recover-and-adapt 42)))
(print-result "Quadriceps" 'quadriceps))
(progn
(reset-subject)
(set-responder-type 'low-responder)
(format t "~%---~%")
(format t "Low Responder - High Frequency (bad match)~%")
(dotimes (w 6)
(dotimes (i 4) ;; 4x/week with 2 sets - too much for low responders
(perform-workout 'squat 2 1)
(recover-and-adapt 42)))
(print-result "Quadriceps" 'quadriceps))
(progn
(reset-subject)
(set-responder-type 'low-responder)
(format t "~%---~%")
(format t "Low Responder - Low Frequency (better match)~%")
;; low responders need more recovery
(dotimes (w 6)
(dotimes (i 2) ;; 2x/week - appropriate for low responders
(perform-workout 'squat 3 2) ;; 2 RIR to reduce damage further
(recover-and-adapt 84)))
(print-result "Quadriceps" 'quadriceps))
;; 21. Sleep deprivation: reduces MUR and impairs recovery
(progn
(reset-subject)
(set-sleep-deprived t)
(format t "~%---~%")
(format t "Sleep Deprived Training~%")
(dotimes (w 6)
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 56)))
(print-result "Quadriceps" 'quadriceps))
(progn
(reset-subject)
(set-sleep-deprived nil)
(format t "~%---~%")
(format t "Well-Rested Training~%")
(dotimes (w 6)
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 56)))
(print-result "Quadriceps" 'quadriceps))
;; 22. Weekly volume is meaningless without frequency context
(run-scenario "9 Sets/Week: 3 sets x 3 days (Optimal Distribution)" 6
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 56)))
(run-scenario "9 Sets/Week: 9 sets x 1 day (Poor Distribution)" 6
(perform-workout 'squat 9 1)
(recover-and-adapt 168))
(run-scenario "9 Sets/Week: 1.5 sets x 6 days [Approximated as 2 sets]" 6
;; 40h is borderline - tests recovery limits
(dotimes (i 6)
(perform-workout 'squat 2 1) ;; 2 sets
(recover-and-adapt 40))) ;; ~40h recovery - slightly under 48h
;; 23. MPS for repair vs growth (high damage = MPS goes to repair)
(run-scenario "High Damage Workout (0 RIR, Stretch Bias) - MPS to Repair" 6
(dotimes (i 2)
(perform-workout 'flye 6 0) ;; High stretch, to failure, high volume
(recover-and-adapt 84)))
(run-scenario "Moderate Damage Workout (2 RIR) - MPS to Growth" 6
(dotimes (i 3)
(perform-workout 'bench 4 2) ;; Less stretch, 2 RIR, moderate volume
(recover-and-adapt 56)))
;; 24. Collagen accumulation from chronic high damage (impairs strength/mass ratio)
(run-scenario "Chronic High Damage Training (Collagen Accumulation Risk)" 6
(dotimes (i 4) ;; 4x/week, high damage
(perform-workout 'flye 5 0) ;; Stretch bias, to failure
(recover-and-adapt 42)))
(progn
(format t " > Strength Efficiency (affected by collagen): ~,2f~%"
(calculate-strength-efficiency 'pectorals)))
;; 25. Early training: fascicle length gains dominate over CSA
(progn
(reset-subject)
(format t "~%---~%")
(format t "Early Training (Length vs Mass Ratio)~%")
(format t "First 4 weeks: length gains >> mass gains~%")
(dotimes (w 8)
(dotimes (i 3)
(perform-workout 'squat 3 1)
(recover-and-adapt 48))
(let ((m (get-muscle 'quadriceps)))
(format t " Week ~a: Mass=~,2f (Δ~,2f) | Length=~,2f (Δ~,2f) | Ratio: ~,2fx~%"
(1+ w)
(muscle-state-myofibrillar-mass m)
(- (muscle-state-myofibrillar-mass m) 100.0)
(muscle-state-fascicle-length m)
(- (muscle-state-fascicle-length m) 100.0)
(if (> (- (muscle-state-myofibrillar-mass m) 100.0) 0.01)
(/ (- (muscle-state-fascicle-length m) 100.0)
(- (muscle-state-myofibrillar-mass m) 100.0))
0.0)))))
;; 26. Stimulating reps: only reps near failure cause hypertrophy
(run-scenario "High RIR (4 RIR) - Many Non-Stimulating Reps" 6
(dotimes (i 3)
(perform-workout 'squat 6 4) ;; 6 sets at 4 RIR - more volume but far from failure
(recover-and-adapt 56)))
(run-scenario "Low RIR (1 RIR) - Fewer But Stimulating Reps [Comparison]" 6
(dotimes (i 3)
(perform-workout 'squat 3 1) ;; Half the sets but close to failure
(recover-and-adapt 56)))
;; 27. First set is king: first set = next 5 sets combined
(progn
(reset-subject)
(format t "~%---~%")
(format t "First Set is King test~%")
;; Single set 6x/week = 6 'first sets'
(dotimes (w 6)
(dotimes (i 6)
(perform-workout 'squat 1 1)
(recover-and-adapt 24))
(recover-and-adapt 24))
(let ((single-set-result (muscle-state-myofibrillar-mass (get-muscle 'quadriceps))))
(format t " > 1 set x 6 days/week: Mass=~,2f~%" single-set-result)
;; Now compare to 6 sets 1x/week (same total sets but all in one workout)
(reset-subject)
(dotimes (w 6)
(perform-workout 'squat 6 1)
(recover-and-adapt 168))
(format t " > 6 sets x 1 day/week: Mass=~,2f~%"
(muscle-state-myofibrillar-mass (get-muscle 'quadriceps)))
(format t " > Prediction: Single daily set should win due to 'first set' advantage~%")))
;; 28. Maintenance threshold: 3 sets/week just offsets weekly atrophy
(run-scenario "3 Sets Once Per Week - Maintenance Threshold" 6
;; Literature predicts: should be roughly maintenance (no net gain/loss)
(perform-workout 'squat 3 1)
(recover-and-adapt 168))
(run-scenario "5 Sets Once Per Week - Should Show Net Gain" 6
;; More volume to overcome weekly atrophy window
(perform-workout 'squat 5 1)
(recover-and-adapt 168))
;; 29. Crossover fatigue: training one limb fatigues the opposite limb via CNS
(progn
(reset-subject)
(format t "~%---~%")
(format t "Crossover Fatigue Test~%")
;; Heavy leg workout
(perform-workout 'squat 8 0) ;; High volume to failure
(format t " > After 8 sets squat to failure:~%")
(format t " CNS Fatigue: ~,2f~%" (systemic-state-supraspinal-fatigue *subject*))
;; Immediately try upper body
(perform-workout 'bench 3 1)
(format t " > Bench press quality affected by prior leg workout~%")
(recover-and-adapt 168)
(print-result "Pectorals" 'pectorals)
(print-result "Quadriceps" 'quadriceps))
;; 30. Frequency response varies by individual
(progn
(format t "~%---~%")
(format t "Frequency Response by Individual Type~%~%")
;; High responder doing high frequency
(reset-subject)
(set-responder-type 'high-responder)
(dotimes (w 6)
(dotimes (i 5) ;; 5x/week
(perform-workout 'squat 2 1)
(recover-and-adapt 34)))
(format t "HIGH RESPONDER + HIGH FREQUENCY (5x/wk):~%")
(print-result "Quadriceps" 'quadriceps)
;; High responder doing low frequency
(reset-subject)
(set-responder-type 'high-responder)
(dotimes (w 6)
(dotimes (i 2) ;; 2x/week
(perform-workout 'squat 5 1)
(recover-and-adapt 84)))
(format t "HIGH RESPONDER + LOW FREQUENCY (2x/wk):~%")
(print-result "Quadriceps" 'quadriceps)
;; Low responder doing high frequency (should be bad)
(reset-subject)
(set-responder-type 'low-responder)
(dotimes (w 6)
(dotimes (i 5)
(perform-workout 'squat 2 1)
(recover-and-adapt 34)))
(format t "LOW RESPONDER + HIGH FREQUENCY (5x/wk - MISMATCH):~%")
(print-result "Quadriceps" 'quadriceps)
;; Low responder doing low frequency (should be better)
(reset-subject)
(set-responder-type 'low-responder)
(dotimes (w 6)
(dotimes (i 2)
(perform-workout 'squat 4 2) ;; 2 RIR to reduce damage
(recover-and-adapt 84)))
(format t "LOW RESPONDER + LOW FREQUENCY (2x/wk - MATCH):~%")
(print-result "Quadriceps" 'quadriceps))
(format t "~%---~%")
(format t "tests done~%")