Optimizing Your Algorithm

Developing a Mental Model to Supplant Outcome-Obsessed Thinking

Adefoluke Shemsu

--

Some Pretext

I would never surmise to understand life and the world more than the next person, but I’m certainly guilty of giving the most esoteric aspects of life a lot of thought. I read too much philosophy too early in my life, but the benefit of this was it created space for curiosity.

Then, as I aged and built more practical skills and perspectives (like in data and technology), I grew bored of pure esotericism because many of those ideas seemed to require sterility in one’s environment — especially juxtaposing the settings for Peace of Mind (Seneca) or Become Who You Are (Alan Watts), for example, to Times Square in 2024. In fact, I believe that the way many of those ideas are presented is innately exclusive based on factors like language, cultural context, and general access. So now, I preoccupy some of my free time with breaking these age-old, seemingly unquestioned ideas down as far as I can to the point of modular standardization where an effective way to do an idea can be contextualized and then affixed to who we uniquely are.

It takes months to write these things because I’m not seeking anything from the writing beyond the ability to hopefully share information and stimulate interesting conversations. Regardless of how this turns out, I had a blast with it.

The Inception of This Idea

For the past six years, I have attempted to intentionally allocate my energy — especially when it comes to how I spend my time and where I apply focus. Through an iterative application of this thinking over several years, I noticed a positive trend in the outcomes of my varied professional and educational goals. Granted, I’m not remotely near the end — and probably won’t be for decades — but I can say it has been interesting to watch this intention take the material form of milestones I set out to pursue just over 3 years ago after pivoting from field-based nonprofit and public sector work to pursue broader impact through technology, business, and (eventually) policy.

While these milestones are nominal, reaching them — despite many alleged barriers and purported negative externalities — caused me to think more practically about the school of thought that might’ve aided my progress beyond circumstance.

In exploring this idea with an intent to articulate it more cogently, I found that building and iterating through a mental model framed almost entirely by “structured fluidity” was my strength. A model predicated on building upon and prioritizing one’s frame of iterative thought and action rather than distinctive, time-contingent steps toward a desired outcome. This deviation from the general norm (norms being the “I need {accolade} by {insert time}; I should be in {position in life} by {age}; I should have {object, relationship} by the time I’ve {insert general milestone}”) seemed to increase the probability of a favorable outcome without the undue stress of over-reliance on the when, what, and how of the outcome — all with an added emotional benefit of even less dependence on the largely unpredictable events influencing said outcome. It was a very interesting idea to play with, so I decided to dig into it.

The following selection will be my attempt at pulling the esoteric thread of what could be summarized as the components of adaptability, and then re-weaving that thread until it takes a standard, near-mathematical structure. The process of thought experimentation was challenging because I couldn’t think of a strong enough analogy to break this idea into practical terms. It wasn't until finishing my Applied Data Science Program that it became clear.

In a scenario where we’d want to pragmatize the esoteric, it’s helpful to get back to First Principles. What did that mean for me here? Well, a frame of approach implies that a mental model focuses on enhancing what can be controlled while fortifying against what cannot, as opposed to outcome-oriented thinking about the approach itself. I then wove my educational background in data analytics and data science into this thinking, leading to a sudden, unintentional correlation between data science, machine learning, and life.

This raised an interesting question: What is a mental model if it, in its simplest form, is designed to be an optimized function of how we receive (inputs) experiences (raw data, features) that can be interpreted, treated, reframed, (processed) and engineered through conscious and unconscious aspects of who we are which can augment the overall performance of said model (parameters) to the point of improving the probability of increasingly positive experiences (outputs)?

An algorithm.

That’s when I realized my approach to mental modeling was akin to treating my mind like a nonlinear, adaptive algorithm.

The Building Blocks of a Mental Model

Since I don’t know who might end up reading this, I’ve decided to add this section to solidify and contextualize my points. Within any data project that I’ve done, there is a section in the report called the “Data Dictionary”, designed to help the reader easily identify and follow the thread of analyses being performed — especially during the “pre-processing” phase of the analysis, where data can be added, removed, treated, or otherwise re-defined to fit the domain and business requirements to conduct an effect analysis or deploy a model that makes accurate predictions.

First, let’s define what an algorithm is. In the simplest terms, an algorithm is a step-by-step set of instructions or rules designed to solve a problem or perform a specific task.

Within the context of my school of thought around mental modeling, an algorithm is simply a systematic process for making decisions or solving problems based on inputs (past experiences) and parameters (values, beliefs, lessons, etc.). This mirrors, in nonambiguous terms, the process of experiencing life.

These parameters, along with weights (your energy and priorities) enable the focal point of one’s life to become the optimization of one’s system (mental model), rather than the product of it. Just as an algorithm optimizes a solution based on given data, the mental model “algorithm” helps an individual navigate unpredictable events by using learned patterns, values, and priorities to influence decision-making and improve the probability of a favorable outcome without prioritizing the outcome itself.

Defining Systems and Data Points Underlying a Mental Model

Algorithm: A systematic, step-by-step set of instructions or rules designed to solve a problem or perform a specific task, which can be built into larger systems to help the stakeholders within that system categorize a problem, identify trends within that problem, or make predictions that help them design a solution.

Our algorithm is nonlinear, or driven by an equation that doesn’t focus on predicting incoming events or outgoing outcomes of those events, but rather attempts to capture and identify the dynamic, complex nature of events — regardless of how those events relate.

This nonlinear algorithm is defined by a few key components and steps within our context. The components:

  • Raw data: This data is considered raw because it is unstructured — coming from all directions, multiple data sets (in this case, these data sets could be other people’s experiences), and results from events in life that were intended and unintended — deserved or not.
  • Features: Features help us observe meaningful patterns from our jumbled mass of experiences. In this context, they can be defined as the beliefs, values, and other forms of passive, nature/nurture-driven learning and a subconscious categorization of experiences starting as far back as childhood to make up who we are. In the context of our nonlinear algorithm, and within the machine learning lifecycle, there are opportunities to uncover hidden relationships between features. These patterns unlock a method called feature engineering, which in simple terms is defined as the active manipulation of passively received data (experiences) to improve how an algorithm performs. A simple example of this might be the notion of shifting your pattern of thought from life happening to you to happening for you. Whether or not the notion is true, your perspective of your experience will change, thus impacting your mental model — often improving its performance.
  • Parameters: Parameters in this context represent our conscious decisions — the one aspect of our lives we can control. In machine learning, parameters fulfill a series of important roles in the functionality of a nonlinear algorithm, most notably in applying weights to our features, thus impacting the influence (or importance) of a set of features on the performance of an algorithm. Parameters help reduce the overall complexity of a model, determine how that model prioritizes features, and directly impact a model’s ability to learn at a faster rate. Zooming back out, this correlates to our mental model in how our decisions — from definitive actions to targeted thinking and lessons learned— can, over time, accumulate to positively or negatively influence our relationship to and ability to process features, which will also tie into those other performance metrics, like the complexity of our mental model (may manifest as anxiety, frustration, analysis paralysis) or our learning rate (can be tied both to our ability to both pursue new experiences or adapt to existing experiences).
  • Weights: Weights in the world of algorithms apply a series of calculations that affix a number for every feature within your data set as they are processed, unlocking the functional role of parameters in optimizing an algorithm. Weights, though tied to parameters, are important to call out in this context because they serve as a click down from your conscious decisions. What are the two elements of a conscious decision — especially pertaining to adaptability in the pursuit of something — are most influential? In this example, our “weights” take on the form of a combination of energy and priority, with energy being the level of effort applied, and priority being a stack-ranking system underlying your level of effort, thus also impacting how your features and parameters interplay to optimize or minimize the performance of your mental model. This can fundamentally change how you intake and process data.

Why Choose a Nonlinear Mental Model?

The decision to equate an effective mental model to a nonlinear algorithm came from a days-long conversation with ChatGPT. I have enough data science and statistics exposure to intuitively understand the structure of an algorithm that would fit this case, but holistically quantifying such an esoteric concept (in equation form) required iterative thought over the past few months, kicking different ideas around. Then, once I had a solid base, I spent a few weeks walking ChatGPT through the idea.

After several iterations, edits, and caveats, here’s what I came up with:

The Linear Mental Model

Linear Mental Model
Linear Mental Model (Translated)

This mental model follows what we might define as a lack of an ability to adapt as life changes. Here’s how:

  • Simple: Every past experience contributes directly to your mental model based on its weight (value, belief, etc.). Each event is separate, and there’s no interaction between them.
  • Predictable: It assumes that your mental state is simply the sum of what you’ve learned from isolated experiences.

The Nonlinear Mental Model

Nonlinear Mental Model
Nonlinear Mental Model (Translated)

This model integrates the inevitability of life into energy expenditure, prioritization, and how those factors interplay with life experiences. Here’s how:

  • Complexity: Experiences don’t just stand alone — they interact, influence one another, and are shaped by how much energy or focus you put on them.
  • Dynamic: The mental model is shaped not only by each experience but also by how much priority and energy you assign to them and how they combine to affect your overall outlook or decision-making.

How These Elements Drive the Model

These components, comprising an algorithmic system, are fed with a series of steps that start with an input and end output from this system. Within our context, here’s how these components and steps interplay:

  1. An event occurs, and an experience is added to our bank of raw data.
  2. The psychological, physical, and emotional value is identified and then categorized following previous patterns relating to a similar mapping of psychological, physical, or emotional data points. This categorization either becomes a new “feature” or is consolidated with an older, similar feature.
  3. This data in tandem with our entire set of features gets filtered by our model “parameters”, which are comprised of subconscious and conscious patterns in our behavior, which will eventually cycle back to influence how we interact with those data points (experiences) in the future.
  4. Assuming no deviation from the norm, the comfort of familiar thoughts, experiences, and feelings reduces any explicit need to make conscious decisions that disrupt our mental model in its current state. This limits the ability to effectively incorporate new lessons and adaptations into our mental model, thus stagnating its performance and our ability to leverage more relevant, higher-quality data to improve our features, parameters, and the varied weights influencing them.

With this algorithmic cycle, the series of outputs from this model feed negative or positive trends predicated largely on finding the “best fit” (minimizes the distance between data points and improves predictive capability) while also embedding the appropriate pre-processing (how we ingest, filter through, and retain the best of) of our data.

A “Well Adjusted” Mental Model is Like Good Data Hygiene

Our ability to process data can be supported by our understanding of the role of data quality in developing a well-structured algorithm. Contrary to what one might assume, the nature of a single experience or even a single feature as a collection of experiences doesn't assign high or low quality to the data feeding our mental model. A combination of positive and negative experiences enables an optimized, “best fit” for your mental model, as each data point serves its own definitive, mathematical purpose in “regularizing” (generalizing) the data as it is processed, which broadens our ability to extract the best lessons from experiences as they happen.

Negative experiences, psychological dispositions based on those experiences, negative self-concepts emerging from those dispositions, etc. — require tremendous energy, more aggressive weighting, and a more adaptive capability to stabilize the performance of our mental models. This may lead to spotting trends that aren’t there (anxiety, paranoia, imposter syndrome), losing trends altogether (low self-esteem, second-guessing oneself, recusal from reality through channels of escapism), or what may become a negative form of optimization where your thoughts and actions converge to predictably reduce the quality of outcomes, even when considering the unpredictability of life events. Learning to optimize against this requires more energy, deeper prioritization, and an intentional approach to how those weights and parameters apply to features.

Positive experiences conversely require much less energy but can be equally detrimental to our mental model. A model built only on positive experiences may be great in terms of weighing priority, but not in applying energy productively, as that factor is most often derived from meaningful iterations through negative inputs to your model — experiences that provide the lessons that give us insight into how we might adapt our model to the uncertainty of living.

Reasons to Prioritize Mental Model Refinement Over Outcome-Driven Planning

Now that we understand the anatomy and application of a mental model through the lens of a nonlinear algorithm, how can we define the benefit of adopting this school of thought over the traditional school of thought in life? Is a mental model so much better than a plan-based model? What are the differences between building a mental blueprint and making a plan?

Timing, flexibility, certainty, and the inevitability of reality.

A mental model is simply a foundation: An infrastructure of lessons, actions, and other holistic inputs informing a well-fortified mind, with the refined functionality to easily tune the when, what, and how of building upon said foundation and increasing the probability of beneficial outputs, leading to an improved ability to reasonably predict favorable outcomes over time. So, while an outcome can be achieved through this frame of thinking, it does not make up the foundation of your mental model. This creates a well-delineated psychological barrier between who you are and what you achieve.

An outcome-oriented planning model, however, depends on factors far beyond your influence and makes little room for the aspects of your experiences that you own — how you react. It requires more external certainty — especially with events like the when, what, and how of a thing you want to do. Plans tend to predicate on a material outcome because the desired outcome informs their linear anatomy. An approach to life that is contingent upon definitive chronology, specific actions of people, and other external factors will prove fruitless with time, even for those who lived fortunate lives.

What’s more interesting — we technically already agree about this. In Western culture, we all acknowledge that plans don’t carry water when faced with the reality of our lives. But why is it — despite knowing and widely agreeing upon this fact — that we never thought through approaching this from a different perspective?

“Life won’t go as planned” is more an observation than a judgment — it doesn’t have to imply absolute failure or that a bad thing will happen when the plan inevitably deviates. It does, however, imply that living a better life may require you to use this observation as a benchmark to your mental model, essentially baking the prediction of unpredictability into your base functionality and perspective. This provides a strong foundation on which to meet unpredictability in an increasingly predictable way due almost entirely to consistency in your improved ability to adapt your thinking to meet the moment.

The concept of inevitably deviated plans acknowledges the likelihood that of 100 outcomes where you’d prefer 1–5 of them, you’re more likely to experience any of the other 95. With a dynamic mental model in place (which is just an optimized ability to process and use information) not only does the nature of the outcome matter less, but you may even be better equipped to make the best of 20/100 outcomes at first, then maybe 35/100, and someday 60/100 — purely through conscientious iteration through the way you process experiences. This approach focuses on extracting the practical good from events as they happen rather than attributing any prospective good to a specific thing happening.

Considering my “95 probable outcomes over 5 expected outcomes” statement on the road to goal completion, a mental model not only provides a framework to add and remove experiences modularly as you grow, but emphasizes an objective truth about success: No amount of effort guarantees a positive outcome, but effort and intention can always improve your chances. Whether that improvement is by a factor of .01 or a factor of 10 is beyond your control, but developing a standardized approach to dynamic thinking can still serve your end without needing to obsess over that end.

Synthesizing These Ideas

In the simplest summary of my “theory”, a mental model serves as life’s algorithm by optimizing your performance in life by applying a layer of analytical rigor to thought and action, namely through a reframing of how an experience is received while understanding oneself intimately enough to understand how a combination of applied energy and prioritization will enable you to align with what you’d like to experience most.

The logic supporting this algorithm states that the dependent and independent variables underlying an event in your life — predicted (intended) or random; internal or external — can generally be additive if perceived as such. Not because they always are, but because they can be framed as such.

If unpredicted (uncontrollable) events can be additive based on mental modeling, this would imply that predictable events — which can be as simple as adopting a new habit or removing an old one — can be doubly additive and can even be scaled (“scaled” meaning adapted to match the demand of the moment you’re in) based on the decisions you make.

Since those predictable events can be comprised of such fundamental elements of living daily life and making different choices with compounding effects (with positive and negative correlations), choosing more constructive decisions will, by default, create a stronger correlation with your overarching desires, thus improving your probability for success in it.

Model Caveats: Hyperparameters and Hyperscalers as Nature and Nurture

While this thought experiment was fun to explore and attempt to apply in a practical sense, there are obvious caveats to this model.

Table created in Google Sheets (don’t judge me)

In the non-linear algorithm, the interaction between nature (hyperscalers) and nurture (hyperparameters) determines how effectively individuals process their past experiences. Past is an open-ended term, however, as those past experiences could reach back into the days when the very foundation for your model was developed beyond your ability to do so. Hyperscalers like socioeconomic status, political stability, and access to healthcare scale the effect of personal experiences, either amplifying or diminishing them. Meanwhile, hyperparameters like the structure of pre-established values, beliefs, and other learned factors like emotional intelligence modulate how well an individual learns from those experiences.

Additionally, energy and priorities play a critical role in determining which experiences are given the most weight and how interactions between experiences shape the mental model, which are both initially informed by our environment and upbringing. Together, these factors drive the non-linear dynamics of how an individual’s mental model evolves, enabling them to better adapt to unpredictable events and make more informed decisions.

Hyperscalers (Nature)

Hyperscalers represent broad societal, economic, and environmental factors that shape an individual’s opportunities, resources, and context. These are often external influences that an individual has little to no control over but which play a critical role in shaping their environment and access to growth (scaling) opportunities.

Socioeconomic Status (SES):

  • Nature: SES is typically inherited or shaped by external factors like family wealth, geography, and education. It sets the stage for what resources and opportunities are available to an individual.
  • Effect: High SES offers access to better education, healthcare, and networks, enhancing personal development. Low SES, on the other hand, can limit access to resources and opportunities, constraining growth.

Cultural Norms and Social Expectations:

  • Nature: Cultural norms and societal expectations are deeply embedded in the environment into which an individual is born. These shape beliefs, values, and the ability to process experiences in ways that align with or push against societal pressures.
  • Effect: Positive cultural norms (e.g., growth, learning) can support personal development, while rigid or limiting expectations can stifle creativity or emotional growth.

Political and Economic Stability:

  • Nature: The stability of a nation or region is largely beyond an individual’s control but significantly affects opportunities for education, career growth, and personal development.
  • Effect: Stable environments offer predictability and the chance for long-term planning and personal development. Instability introduces stress, limiting an individual’s capacity to focus on personal growth.

Healthcare Systems and Mental Health Support:

  • Nature: Access to mental and physical healthcare is often determined by geography, government policy, and socioeconomic status. It provides essential support for processing difficult experiences and maintaining well-being.
  • Effect: Strong healthcare systems allow individuals to recover from trauma and maintain health, while poor systems may hinder personal resilience and exacerbate negative experiences.

Access to Technology and Information:

  • Nature: Infrastructure, political systems, and global economic trends shape the availability of technology and information. While access is increasing, disparities still exist.
  • Effect: Easy access to information can boost learning and adaptation, while lack of access can limit an individual’s ability to optimize their mental model through learning and self-improvement.

Hyperparameters (Nurture)

Hyperparameters are the personal, internal characteristics that individuals develop based on their experiences, values, lessons, and beliefs. These are individual-level traits and decisions that shape how past experiences influence the mental model. While external hyperscalers influence them, they are more under individual control and represent nurture aspects.

Values, Lessons, Beliefs, Decisions:

  • Nurture: These are shaped by personal experiences, upbringing, education, and individual reflection. They govern how individuals process and interpret life events and prioritize future decisions.
  • Effect: Positive lessons and strong values can lead to resilience and growth. Negative beliefs or poorly learned lessons can distort decision-making and hinder progress.

Emotional Intelligence:

  • Nurture: Emotional intelligence is developed through social interactions, self-awareness, and life experience. It allows individuals to process emotions, understand others, and make better decisions based on experience.
  • Effect: High emotional intelligence enhances one’s ability to adapt to and learn from experiences, improving the quality of the mental model.

Support Systems (Family, Friends, Mentors):

  • Nurture: While social support is influenced by nature (e.g., being born into a strong family), the relationships individuals build are largely under their control. Nurturing meaningful connections improves emotional well-being.
  • Effect: Support systems help individuals process experiences more effectively, reinforcing positive values and beliefs, and providing guidance for difficult decisions.

Priorities and Energy Management:

  • Nurture: The ability to manage energy and prioritize life events is developed through self-discipline, awareness, and life experience. Individuals choose where to focus their energy and how to prioritize various aspects of their lives.
  • Effect: Properly managing energy and priorities enables individuals to learn more effectively from key experiences and make better decisions, optimizing the mental model.

Personal Health and Well-being:

  • Nurture: While certain health aspects are genetic, many aspects of personal well-being (e.g., diet, exercise, mental health practices) are shaped by individual decisions. People nurture their well-being through lifestyle choices.
  • Effect: Good mental and physical health provides the foundation for processing experiences productively and maintaining a resilient mental model. Poor health can distort experience processing and reduce focus on growth.

Closing Thoughts

This was my attempt at making an esoteric thing — the idea that planning is useless— practical by presenting an alternative to traditional planning. It was not easy, especially when determining an analogous delivery of the message, especially trying to balance enough technical bits to structure the idea while incorporating the immeasurable bits.

In this thought experiment or “theory”, we explored the functional application of a mental model through the lens of an algorithm, and how this algorithm does a better job of using your experiences and incorporating life lessons more effectively compared to the traditional, linear thought processes we’re taught to use. I could be totally off base, but this analogy came to mind because an algorithm was the only “practical” thing I could think of that had the structure and functional capability to include so many factors while still sticking to the objective of the analysis.

If you take anything from this at all, let it be to learn to have fun thinking about mundane things. It’s hard to be bored when you have an active mind, and it’s even harder to be discontent when you’ve spent time playing in it — especially as an adult with a more well-informed perspective. I know we’ve all heard “nothing goes according to plan” — I don’t think we’ve all thought “I’d like to break this turn of phrase down to such a level that I can essentially try to use concepts from machine learning and data science to present a probabilistically logical alternative.”

I would love to hear what others think. For the philosophy lovers — does the incorporation of this idea make sense? For the data and technology people — how was the algorithm analogy? For any other analysts and logicians — are there any other logical gaps, fallacies, or otherwise alternative arguments missed?

--

--

Adefoluke Shemsu

Just a guy who happens to be inspired by curiosity about complex concepts, the things that move civilization, and the underappreciated elements of who we are.