A few years ago, I read “Algorithms to Live By” by Brian Christian and Tom Griffiths. The book explores how computer science algorithms can be applied to everyday human problems—from finding an apartment to deciding when to stop dating and commit. I couldn’t stop thinking: what if these algorithms were actually accessible in an app?
That’s how entscheid.io was born—a mobile decision-making toolbox that puts real algorithms in your pocket.
The Problem with Decisions
We make thousands of decisions daily, most on autopilot. But for the important ones—should I take this job offer? When should I stop looking for apartments? Is my morning coffee actually affecting my sleep?—we often rely on gut feelings or crude pros-and-cons lists.
The irony is that mathematicians and computer scientists have been solving these exact problems for decades. The solutions exist. They’re just buried in academic papers, not smartphone apps.
Six Algorithms, One App
entscheid.io implements six decision-making tools, each backed by real algorithms:
| Tool | Algorithm | When to Use It |
|---|---|---|
| Optimal Stopping | 37% Rule | Apartment hunting, hiring, dating |
| Best Combination | Bayesian Optimization | Recipe optimization, finding ideal settings |
| Correlation Tracker | Tetrachoric Coefficient | Testing if habits affect outcomes |
| Task Scheduler | SPT/LPT Algorithms | Prioritizing your to-do list |
| Time Tracker | Statistical Analysis | Understanding how long tasks actually take |
| Pro/Con Analysis | Weighted Scoring | Comparing job offers, major purchases |
Let me walk through the most interesting implementations.
The 37% Rule: When to Stop Looking
The “secretary problem” is a classic in optimal stopping theory. Imagine you’re hiring an assistant from a pool of candidates. You interview them one by one and must decide immediately after each interview—no callbacks. How do you maximize your chance of picking the best?
The mathematically optimal strategy: reject the first 37% of candidates (just observe them), then pick the next candidate who’s better than everyone you’ve seen.
This applies everywhere: apartment hunting, dating, even parking spots. Here’s how I implemented it:
function getR(n) {
if (n <= 6) return Math.round(n / 2)
if (n <= 9) return Math.floor(n / 2)
return Math.round(n * 0.37) // The magic number
}The edge cases matter. For very small n (like 3 apartments), the pure 37% rule breaks down—you’d reject just 1 and have only a 50% chance of success. For small pools, a 50% exploration phase actually performs better.
Bayesian Optimization: Finding the Perfect Recipe
This is where things get mathematically interesting. Say you’re trying to perfect your pasta sauce. You can tweak garlic amount, cooking time, and salt level. Each combination requires actually making and tasting the sauce—expensive in time and ingredients.
Bayesian optimization solves this by building a probabilistic model of how good each combination might be, then intelligently choosing which combination to try next.
I implemented a full Gaussian Process Regression in JavaScript:
// Predict mean and uncertainty at a new point
predict(X_new) {
const K_star = this.kernelMatrix(X_new, this.X_train);
const K_star_star = this.kernelMatrix(X_new, X_new);
// Mean prediction
const mean = math.multiply(K_star, this.alpha);
// Uncertainty (variance) prediction
const v = math.lusolve(this.L, math.transpose(K_star));
const variance = math.subtract(K_star_star, math.multiply(math.transpose(v), v));
return { mean, variance };
}The model uses a Gaussian kernel to measure similarity between parameter combinations, then predicts both the expected quality AND the uncertainty of untested combinations.
To decide what to try next, I implemented three acquisition functions:
- Expected Improvement (EI): Balance exploitation and exploration
- Probability of Improvement (PI): Focus on beating the current best
- Upper Confidence Bound (UCB): Be optimistic about uncertainty
This is the same math used in hyperparameter tuning for machine learning models—now applied to your cooking experiments.
Correlation Tracking: Does Coffee Affect My Sleep?
We often have theories about cause and effect. “I sleep worse when I drink coffee after 2pm.” But do we actually test these hypotheses systematically?
The correlation tracker lets you log binary observations (coffee: yes/no, good sleep: yes/no) and calculates the tetrachoric correlation coefficient:
export const tetrachoric = (a, b, c, d) => {
// Handle edge cases for small samples
a = Math.max(a, 0.5)
b = Math.max(b, 0.5)
c = Math.max(c, 0.5)
d = Math.max(d, 0.5)
return Math.cos(Math.PI / (1 + Math.sqrt(a * d / b / c)))
}Where a, b, c, d are counts in a 2x2 contingency table. The tetrachoric coefficient estimates what the correlation would be if the underlying variables were continuous and normally distributed—perfect for binary observations of inherently continuous phenomena like sleep quality.
Architecture Decisions
Why React Native?
Cross-platform was essential. I wanted to ship to both iOS and Android without maintaining two codebases. React Native with Expo provided the fastest path to both app stores while keeping the development experience pleasant.
Offline-First & Privacy
Every piece of data stays on your device. No accounts, no servers, no analytics tracking what decisions you’re making. This was a deliberate choice:
- Privacy: Your decision-making data is deeply personal
- Reliability: The app works without internet
- Simplicity: No backend to maintain means the app can exist indefinitely
Redux Persist handles state management, automatically syncing to AsyncStorage. The entire app runs locally.
The Math Stack
For the Gaussian Process implementation, I needed serious linear algebra. The mathjs library handles matrix operations, LU decomposition, and solving linear systems. For simpler statistics, simple-statistics covers mean, median, and standard deviation calculations.
Lessons Learned
1. Academic rigor doesn’t mean bad UX. The algorithms are real and mathematically correct, but the interface hides the complexity. Users don’t need to understand Gaussian kernels to optimize their recipes.
2. Side projects benefit from constraints. No backend meant no DevOps, no server costs, and forced me to think carefully about what’s truly necessary.
3. The 37% rule applies to building apps too. I explored many feature ideas before committing. The first six features that made the cut aren’t necessarily the first six I thought of.
entscheid.io is free, has no ads, and is available on Google Play and the App Store. The algorithms that academics developed over decades are now a tap away.
Sometimes the best decision is to let math decide.