Algorithms to Live By: Sliding Window
In the book Algorithms to Live By, it outlines algorithms that can help you in your daily life:
Optimal Stopping: Look at the first 37 percent of options and then pick the next one that is better.
Explore/Exploit: Try new things at the start and later stick with what works best.
Sorting: Sort only if you will search often, otherwise leave things unsorted.
Caching: Keep the most used items close and let go of what you rarely use.
Scheduling: Do the shortest or most urgent tasks first to cut down on delays.
Bayes’s Rule: Update your beliefs each time you get new information.
Overfitting: Keep things simple because simple rules often work better.
Relaxation: Change a hard problem into an easier version and solve that.
Randomness: Add randomness to avoid being predictable and to find new options.
Networking: Share resources fairly and avoid bottlenecks to keep things moving.
Game Theory: Use fair and repeatable strategies to encourage cooperation.
Computational Kindness: Make decisions easier for others by giving clear and simple choices.
While the above are useful, I would like to add one more algorithm for you to consider - the sliding window.
Think of it like looking through a small window that moves forward over time. Similar to caching and scheduling, you only see the recent past and the near future. This keeps your mind from trying to hold everything at once. By narrowing your focus, you can reduce anxiety and avoid overloading your “memory". The sliding window has helped me relax more.