Two Weeks in Review

Published May 10, 2024

I spent the last two weeks stuck in a loop. I've been trying to optimize an impossible problem. While considering "rest" as part of the LHF planning algorithm, I found two features of session planning that work like a scale. Pushing on one side affects the other. It took me two weeks to realize that I couldn't push both ends of the scale down at the same time.

I'll talk more about that optimization work later. Let's focus on a few wins first.

Exercise Directory

The exercise directory continued its steady expansion.

New Exercises

Updated Exercises

  • Refine Lying Shoulder Rotation exercises' steps.
  • Add chest and front shoulder primary muscles to One-Handed Plank.
  • Refine steps for Trap Bar Deadlifts.
  • Allow for a slightly narrower grip on close-grip exercises.

I also started to consider visualizations for the exercises. Rather than record myself doing every exercise, I'd like to create animations that demonstrate the videos. I prefer animations for a few reasons:

  • I'm a private person. I like to think I'm not that vain too. I don't need 260+ videos of me out there doing exercises on the internet.
  • I can illustrate the animations however I like. I could show a skeleton covered in muscles, with the targetted muscles highlighted while the skeleton performs the exercise. I can animate a male, female, or androgynous character performing the exercises.
  • I can easily tweak an animation compared to a video. Say I learn that I want to place my hands a bit closer on a Close-Grip Bench Press. Rather than re-recording a video, I hope that I'll be able to open an animation file, move the character's hands closer, and export the web-ready animation.

That said, I have no experience with animation. There's a lot to learn here. Animations aren't the highest priority yet, but I'm thinking about them.

App Development

Considering "Rest"

I mentioned my intention in my last post, but I didn't get into details. I ultimately didn't change the LHF planning algorithm. This post won't be what I thought it would be. I thought I'd explain a route, from start to finish, of discovering a problem and my journey to the solution. This post won't be that.

Instead, I'll talk about what I learned and how I might redefine my problem statement and approach a solution differently next time.

Repeating from my last post, I wanted to optimize the following parts of LHF's planning algorithm:

  • Variety: Distribute exercises somewhat evenly. Don't schedule a barbell bench press every chest session. Go through many other chest exercises before scheduling the barbell bench press again
  • Inclusion: Every exercise gets scheduled within an acceptable standard deviation. No exercise left behind.
  • Rest: Muscles should receive appropriate rest between sessions. Don't work the glutes every session.

LHF already optimizes for Variety and Inclusion. Rest is the new consideration. I knew that LHF had a problem with Rest. I felt like I was working some muscles way more than other muscles. I measured muscle activation frequency with LHF's current planning algorithm and came up with the following table:

Muscle Percentage Occurance Avg. Occurance (every X sessions) Percentage muscle appears in exercise directory
Abdominal 32.9% 3.038 9.51%
Bicep 31.6% 3.16 6.08%
Calf 26.6% 3.762 3.04%
Chest 43.7% 2.29 13.3%
Forearm - Inner 32.3% 3.098 6.46%
Forearm - Outer 27.2% 3.674 2.66%
Glute 73.4% 1.362 26.6%
Hamstring 31% 3.224 6.08%
Lat 32.9% 3.038 8.37%
Lower Back 46.2% 2.164 14.8%
Oblique 29.1% 3.435 7.60%
Quad 51.9% 1.927 16.3%
Rotator Cuff - Back 28.5% 3.511 3.04%
Rotator Cuff - Front 26.6% 3.762 1.90%
Shoulder - Back 43.7% 2.29 7.98%
Shoulder - Front 64.6% 1.549 19.8%
Shoulder - Side 29.7% 3.362 4.94%
Thigh - Inner 36.1% 2.772 11.8%
Thigh - Outer 26.6% 3.762 2.28%
Trap 32.3% 3.098 6.46%
Tricep 27.2% 3.674 7.22%

LHF activated glutes in 73.4% of planned sessions! That's too much glute work, or at least, too much unintentional glute work. By introducing Rest I hoped to program specific rest periods for individual muscles. While glutes activated 73.4% of sessions, calves activated 26.6% of sessions. The difference in these numbers is a function of the percentage that the muscle appears in the exercise directory. Notice the last column in the table. Glute-activation occurs in 26.6% of exercises while calves occur in 3.04%.

We've approached "the loop", the impossible problem. Inclusion and Rest are at odds. If I program LHF to include every exercise, I can't also program LHF to Rest muscles. With glutes appearing in 26.6% of exercises, how do I include all those exercises and rest glutes?

Think of it from the LHF planning algorithm's perspective. I ask the algorithm to generate a session. It thinks, "Okay, you want me to include all exercises, let me see what's available." There's a 26.6% chance that a glute-activating exercise is due for inclusion. At the same time, the algorithm thinks, "Okay, but you want me to rest glutes because I just scheduled them in the previous session." If the algorithm includes five exercises in every session, how do I ensure glutes aren't included in this session? I need to fill five slots for this session. I also need to include every exercise in the database over the long term. I also need to rest glutes some amount between sessions.

Okay, it's not an impossible problem to optimize these parameters. I could do ten exercises every session. I'd be at the gym for 2+ hours, and I have a feeling it'd be detrimental to my body. I shouldn't throw the word "impossible" around so quickly. I could optimize Variety, Inclusion, and Rest if I wanted to stay at the gym longer.

I'm down, but I'm not out. There may be other ways to optimize this problem. After two weeks of thinking in circles though, I've hit my stopping point. I'll accept good enough for now and let this idea simmer on the back burner.