A Software Engineer's Take on The Political Spectrum<br>AuthorsNameAryan EbrahimpourGitHub@avestura<br>7 min read<br>Table of Content<br>Back in the 1800s, there was a low chance of making an oil well in the United States.<br>People already knew about petroleum "seeps", a place where natural liquids escape<br>to the Earth's surface, but it was too expensive and complex to skim it off<br>the water for hundreds of years.
It wasn't until 1859 that Colonel Drake decided to change the story.<br>His strategy was to use a steam engine to ram the drill through the soil<br>of Pennsylvania in the hope of finding oil. Still, not only did he run<br>out of money midway through the work, but his effort also brought ridicule<br>and was known derisively as “Drake’s folly”1, as townsfolk doubted his plans<br>would work. None of that stopped Drake, and he took a loan2 to keep the<br>operation going until he found oil 69.5 feet under the ground. Today,<br>his well is known as the Drake Well and is located at the center of<br>the Drake Well Museum. It is the first commercial oil well in the United States,<br>and was designated a National Historic Chemical Landmark in 2009.
He changed the game by exploring new areas to look for the oil instead<br>of exploiting the seeps that were already found. The industry jumped on<br>the idea, and exploring for new wells and approaches to find oil mines skyrocketed.
That said, exploiting the wells already found never stopped. Although<br>explorers expanded west from Ohio to Texas, the trade-off between exploring<br>and exploiting never vanished. Should we keep squeezing the old wells and<br>optimize extracting them, or should we take the risk of drilling into new places?
Same terminology exists in software
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
We borrow terminology and literature from different fields of science and<br>incorporate them into computer software. Not only because naming is hard,<br>but also because those terminologies fit so well with the software problems.<br>Software is a fairly young industry, and other industries faced some challenges way<br>longer before we did.<br>As a result, we directly imported the terms "explore" and "exploit" into<br>the software literature to use them in soft computing approaches.
Imagine an administrator who wants<br>to hire the best secretary out of nnn<br>rankable applicants for a position. The applicants are interviewed one by one<br>in random order. A decision about each particular applicant is to be made<br>immediately after the interview. Once rejected, an applicant cannot be recalled.<br>During the interview, the administrator gains information sufficient to rank the<br>applicant among all applicants interviewed so far, but is unaware of the quality<br>of yet unseen applicants. The question is about the optimal strategy<br>(stopping rule) to maximize the probability of selecting the best applicant.<br>If the decision can be deferred to the end, this can be solved by the simple<br>maximum selection algorithm of tracking the running maximum (and who achieved it),<br>and selecting the overall maximum at the end. The difficulty is that the decision<br>must be made immediately3.<br>This is the famous secretary problem.
The decision between exploring and exploiting is not challenging here.<br>In the case of the secretary problem,<br>we know for a fact that we should explore only 37% of the secretaries (equal to 1/e1/e1/e),<br>and then pick the first item with a better score than the explored items.<br>This solution is mathematically provable. However, this is not always the case:<br>in most problems, the decision between exploration and exploitation is up<br>the creek without a paddle.
The Soulmate Algorithm I (by icanbarelydraw.com 4)
In many software problems, we are dealing with an enormous input and output space.<br>In this situation, soft computing approaches come into play for optimizing<br>high-level solutions of the problems that are unsolvable in polynomial time.<br>Think about it: how would you find the next best move in chess? The search<br>space is astronomical, and trying every move would take forever.
One approach is to generate a solution and then evaluate if that's a good one<br>using a fitness function. We can now decide to either exploit by working on the solution<br>and improving it, or to explore by generating entirely new ones.<br>That decision depends on the value of the fitness function.<br>Similarly, that's how we optimize solutions in metaheuristic procedures<br>like genetic algorithms<br>or simulated annealing.
The image above illustrates the exploitation vs exploration in the 8 queens problem.<br>In this puzzle, one should place eight chess queens on an 8×8 board so<br>that no two queens threaten each other; thus, a solution requires<br>that no two queens share the same row, column, or diagonal. Here we found<br>a solution that has only three threats, but the optimal solution should have zero.<br>Now, we can either exploit it and<br>slightly modify our solution to see if we get a better result, or forget<br>about it and explore...