<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oluwasemilore Adelaja on Medium]]></title>
        <description><![CDATA[Stories by Oluwasemilore Adelaja on Medium]]></description>
        <link>https://medium.com/@monsieurblue00?source=rss-b80b602722cb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Oluwasemilore Adelaja on Medium</title>
            <link>https://medium.com/@monsieurblue00?source=rss-b80b602722cb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 01:28:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@monsieurblue00/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Death of Academia]]></title>
            <link>https://medium.com/@monsieurblue00/the-death-of-academia-928f060febd7?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/928f060febd7</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 13:47:36 GMT</pubDate>
            <atom:updated>2026-11-24T13:47:36.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hmll6g3dN7jnf12fAWr5hA.jpeg" /></figure><p>It has been 4 years since the storm that is Artificial Intelligence hit the domain of academia, and we have since come to understand it as a runaway train taking down everything in its path. The concerning thing is that this train seems to be speeding up, faster than we can predict, and academia as we have done it for millenia is potentially about to become a casualty in its wake.</p><p>Will AI lead us gracefully into the stars or enslave our minds as we have nothing better to do than ponder our helplessness and accept the results it tells us, unable to understand it much less challenge its answers?</p><p>An existential threat is already being posed to academia as the robots have been able to attack from 2 sides, leaving man defenceless.</p><h3>The Ground</h3><p>The first flank Artificial Intelligence has successfully infliltrated has been the so-called ground floor. From the early days of using ChatGpt to cheat on online tests to writing whole articles and reports, this is the ground floor crumbling. AI has given an easier out for the studying class. Why spend all the time and effort needed when Claude can get a much better result in far less time.</p><p>In this competitive landscape, it has become more efficient to use AI to avoid falling behind than stick to your efforts and hard work and pay the consequences of diligence.</p><p>Everyone acts in their individual best interest, but taking a step back and zooming out, we may see the result as underskilled and underqualified students becoming the product of institutions everywhere. They who have relied on AI as a crutch the whole way through various institutions have no choice but to continue to rely on it as they become more and more integral members of the workforce.</p><p>Avoiding the question of if this is indeed as bad as it seems as the argument could be made that there will be no negative side effects to this as AI will get good enough to do whatever any student will have needed to learn anyways, it is evidently a trend of academia dying a slow death as institutions lose their purpose from being unable to train students to the level they have been for millenia.</p><h3>The Sky</h3><p>One may reasonably think that this is not a particularly big issue; AI has taken ground from humans, sure, but those are hardly the people that would define the upper limits of human thought and knowledge anyway. What if AI leaves them “slightly” less educated, the top minds pushing our understanding of the universe do not face the same ethics problem. Efficiently getting through an institution is not their goal in the first place. They are in effect trying to think of what has never been thought of before, and that is hardly efficient or artificial. It takes a thinking person to do it, and it always will.</p><p>This is an optimistic sentiment to have, but in the year 2026, is that really a view that describes reality?</p><p>Classically, revolutionary research and discovery took long, precise, and meticulous human efforts to attain a truth that had eluded generations prior.</p><p>Albert Einstein for example, spent 8 years formulating the equations of the General Theory of Relativity, and the end product was revolutionary physics that solved problems that had puzzled humanity for generations and described our world to a degree before foreign to us. The noble craft of spending years of one’s life trying to solve these problems was important as it pushed our understanding into the skies but also allowed the current generation to serve as the giants on whose shoulders future generations would stand.</p><p>Humanity’s understanding could progress while equiping the next generation with the tools to progress our understanding even further.</p><p>The problem, though, is that Artificial intelligence has started to disrupt this balance, and we are completely unprepared for it.</p><p>Before we progress, let us talk about 2 men who, though separated by centuries, had fates that intertwinned. The first is the famous 17th century mathematician Pierre de Fermat, who made a lot of contributions to the field, chief of which was the so-called “Fermat’s last Theorem”. It was a conjecture he made without proof* that remained unsolved for over 300 years, stumping a multitude of the best minds we have ever seen in the process. Only in the late 20th century was mathematician Andrew Wiles, after spending 6 years on the problem in secrecy, able to solve the problem. The proof was over 100 pages long and acted as a backbone for new mathematics that future generations could build off of, thus completing the story these 2 men shared 358 years after it started.</p><p>Another problem that has puzzled mathematicians even more is the Riemman Hypothesis. It is not just an unsolved maths problem. It is The unsolved maths problem… Well, it was not until a few days ago when it fell. It fell not to witty humans but to a cold-hearted and cold-blooded, unfeeling machine, Claude, to be precise.</p><p>Calling the solution dense is putting it lightly. It is hundreds of thousands of pages long and impossible to follow the reasoning through. It is (as far as we know) valid proof, though. So what’s the problem with that, you ask? Well, before we didn’t know if the Riemann hypothesis was true. We believed it was and built a lot of our modern infrastructure on that assumption. Now we know it’s true but only because a robot told us so. Nothing has really changed, as we are unable to understand why and have no new insights for future generations to stand on, truly intellectually helpless.</p><p>Artificial Intelligence will continue to get better and one by one knock down unsolved problem after unsolved problem. As it does that, though, humanity will still be unable to understand any of it as the proofs are all too dense for us anyways and do not reveal insight to build better maths.</p><p>This is how the Sky falls, when their work yields no fruit as AI will solve whatever problems human have anyway. There will be no reason for humans to pursue these problems any longer as they are outclassed by robots whose work give no insights and are completely unintelligible.</p><p>We will have no intellectual freedom or expression of our own as we accept whatever our AI overlords tell us. Who then is truly the robot?</p><p>When the ground and sky fall completely and simultaneously, then will be the final death of academia by the hands of AI, and you, my friends, are at the beginning of the end.</p><ul><li><em>Interestingly, Fermat claimed he had a proof, but it couldn’t fit in his book but was almost certainly wrong; either mistaken or just plain lying.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=928f060febd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OverAnalyzing : Saturween]]></title>
            <link>https://medium.com/@monsieurblue00/overanalyzing-saturween-b2bfbd304f21?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2bfbd304f21</guid>
            <category><![CDATA[halloween]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 19:40:54 GMT</pubDate>
            <atom:updated>2026-10-31T19:40:54.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*JfnO9GPht8HSZpkC6Etk9A.jpeg" /></figure><p>I remember watching an episode of a popular show many moons ago. In the episode in question — set on halloween —one of our protagonists tries to trick her partner who characteristically has a heart of gold but is quite lacking in brains into thinking that Halloweens occur on a Saturday only once every so many years. Although she briefly objects, saying it should occur every 7 years, she is quickly gaslighted into submission.</p><p>As a kid watching the episode I came to the same conclusion of “every 7 years” that the show writers implied was correct as well but years later the question came back on my mind and I have decided to give the question the justice it deserves (and maybe just a smidge more).</p><p>How often does Halloween fall on Saturdays?</p><h4>In General</h4><p>The instinct the show writers, kid me, and probably the majority of people reading have is not wrong. Saturweens do occur every 7 years… kind of.</p><p>We can argue for this fact from symmetry. Over a long enough period of years, picking a random Halloween should not be biased to any day of the week. There is no obvious reason why it should fall on Saturdays any differently than on Thursdays or any other day of the week, for that matter. The gods of the holidays simply haven’t let us in on any such plans.</p><p>If every day of the week is interchangeable in this way, then they should be equally likely. There are 7 days of the week, so any given Halloween should have a 1 in 7 chance of being any.</p><p>Said differently, in a collection of 7 years, a Saturween should occur in 1… on average. This line of reasoning is statistical and gets us to the fact that any 7 years chosen without bias* should contain a Saturween on average.</p><p>It is a powerful argument as it doesn’t require there to be any pattern to the number of days in each year and does not even require the 7 years to be consecutive at all. As long as we pick 7 and don’t pick in such a way to ensure any day of the week is favoured, this result should be held.</p><ul><li><em>The clause about bias is important. In principle, someone could figure out the pattern behind the Halloween days (subtle foreshadowing) and pick 7 days in such a way to enable them all to be Saturdays or Mondays or something. Our result clearly won’t hold in such a case, but barring something like that, it should. <br>An easy way to get around bias is to pick at random, which works, but in this case, even consecutive days are without bias. Proving that may be testing your patience, so take my word for it this time.</em></li></ul><h4>In Particular</h4><p>Why am I going through this roundabout way to show this fact, though? There are 7 days in a week, so it should take 7 years to reset, right? Not quite.</p><p>It is true that there are 365 days in one year, which is 1 day more than 52 weeks, causing the day of the week of any given date to drift year after year. There is just one problem though… leap years. Every so often, February decides to have an extra day, causing a weekday to be skipped and throwing the whole pattern into disarray.</p><p>Leap Years are the villains. If you check your calendar you’d see that the last time Haloween was on a saturday was 2020, only 6 years ago, and that the next time won’t be until 2037, 11 years from now! As a matter of fact, if you are able (and somehow willing) to check you’d soon find out that Saturweens actually never come separated by exactly 7 years.</p><h4>The Answer</h4><p>It is hardly a paradox but just a problem solvable with a little bit of analysis.</p><p>For our purposes, there are 4 ways Saturweens can occur, on a leap year, a year after a leap year, 2 years after or 3 years after (since leap years come every 4 years). It turns out that the pattern goes something like this:</p><p>If it occurs on a leap year, the next time would be 6 years later (and 2 years after a leap year).</p><p>If it occurs a year after a leap year, the next time would be 6 years later (and a 3 years after a leap year).</p><p>If it occurs 2 years after a leap year, the next time would be 11 years later (and a year after a leap year).</p><p>If it occurs 3 years after a leap year, the next time would be 5 years later (and on a leap year).</p><p>The pattern can be seen to loop. Start on a leap year, and you go L to 2 to 1 to 3 to L.</p><p>For example 2020 was a leap year with a Saturween so the next time must be 6 years later (2 years after a leap year), then 11 years later (1 year after a leap year) then 6 years later (3 years after a leap year) and finally 5 years later on a leap year again in the year 2048*.</p><p>A cool result we can get from this pattern is see that, in our traversal between Saturweens, we changed Saturweens 4 times in 28 years. This brings our average to 7 years as expected and previously shown.</p><ul><li><em>The pattern works for any date from March to December for any day of the week. January and February are slightly different.</em></li></ul><h4>The Twist</h4><p>Every good story has a twist, and this one is no different. Remember how it felt like it should be every 7 years, and I said that consecutive saturweens are never actually separated by 7 years? Well, I lied. It is actually possible for it to be separated by 7 years, but the stars really do have to align.</p><p>The way a protagonist often wins is to know her villain’s weaknesses, so how about we look at the leap year for what it truly is.</p><p>The leap year is a clever invention to get seasons in sync because of cosmic reasons that are not important to our story. The important thing to us is that they happen every 4 years… or almost every 4 years.</p><p>The full story is slightly more complicated. Let’s call the “leap years occur every 4 years” rule ‘rule 1’. It just so happens that every 100 years, a year that should be a leap one actually isn’t. We will call this ‘rule 2’. So 1700, which looks like a leap year, actually wasn’t as well as 1800 and 1900. Why don’t most people know this? Part of the reason may be because of the “unfortunate” coincidence that 2000, which should have been a leap year (due to rule 1) but actually not (because of rule 2) was, in fact, a leap year because of yet another rule.</p><p>Hopefully, I have not lost you yet. There is one final rule that every 400 years is a leap year (rule 3). So 1900 wasn’t a leap year, but 2000 was, and 2100 would not be again.</p><p>Now that we hopefully understand that, why this helps us is that “turning off” leap years for a bit gives us a stretch of years just long enough for the complicated leap year pattern to mess things up. Just 7 years of good old-fashioned normalcy.</p><p>As a matter of fact, it works out that the only way for a saturween to follow another saturween in exactly 7 years is for a saturween to fall exactly on the leap year before the “fake out” leap year due to rule 2.</p><p>So what’s the verdict? Has that ever happened before? So I looked through 14,000,605 possibilities and found ONE!!!</p><p>The Gregorian calendar we use today with the leap year shenanigans only got adopted in 1582, so we can only check after that year, and if we do, we find that October 31st, 1896, was a saturday and 7 years later, on October 31st, 1903, we have yet another saturday. The only pair of Saturweens separated by exactly 7 years.</p><h3>Conclusion</h3><p>So it turns out the show writers were wrong in one way but maybe right in another way they themselves wouldn’t have known. Intuition often does fail us when we try to solve problems, but every now and then we could be right, wrong and right again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2bfbd304f21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Question of Doors and Goats]]></title>
            <link>https://medium.com/@monsieurblue00/a-question-of-doors-and-goats-1a8308fd57fb?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a8308fd57fb</guid>
            <category><![CDATA[puzzle]]></category>
            <category><![CDATA[probability]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 03:02:41 GMT</pubDate>
            <atom:updated>2026-08-30T03:02:41.563Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jephFnGijJmkbsdQQQIMg.jpeg" /></figure><p>You are a contestant awaiting your prize after a sensational performance in a series of challenges. Just before you are given your due prize reward, the jester of a game master subjects you to one final challenge with 3 doors, fake outs, reduced options and nerve wracking decisions. The one thing you keep thinking of though, unable to get off your mind… where did the 2 goats come from?</p><h3>A Famous Puzzle</h3><p>Originally posed over 50 years ago, the Monty Hall problem has become a famous puzzle for probabilistic thinking. Part of its appeal is how simple the posed question is although the solution may be rather unintuitive to those hearing it for the first time. My goal is to pose the question and try to give differing perspectives of how to approach thinking about it till it feels intuitive.</p><p>I assume there is a high chance you have already heard the question before now because of how popular it is but incase you have not I will pose it again.</p><h4>The Question</h4><blockquote>Suppose you&#39;re on a game show, and you&#39;re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what&#39;s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, &quot;Do you want to pick door No. 2?&quot; Is it to your advantage to switch your choice?</blockquote><p>Above is the problem as quoted by Craig F. Whitaker in 1990 in a letter sent into the ‘Ask Marilyn Column’ of the Parade magazine.</p><p>To put in other words, there are three doors, the prize behind one and goats (essentially meaning no prize) behind the other two. You are told to choose one and then immediately after you do, the host opens one of the remaining doors, revealing there is in fact a goat behind it and gives you the chance to switch your guess. Do you take the deal or stick to your original decision?</p><p>The assumptions to keep in mind are that the host already knew what prizes were behind what door and was always going to open one door with a goat before giving you the option to choose. You could count on this to happen.</p><p>Take a second to think about it.</p><h3>Solutions</h3><p>What was your answer?</p><h4>The Thesis</h4><p>The solution you may have come to could be something like this. Before opening the doors, there was a 1 in 3 chance that any chosen door would be correct. As soon as one door is shown not to contain the prize, there are only 2 doors left. The prize could be behind either of them, each with a 1 in 2 (or 50%) chance of having the prize.</p><p>Both doors have the same chance of being correct. You can choose either and most people will not be faulted for sticking to their guts and staying with their initial guess. This solution makes sense. It is simple, intuitive and wrong.</p><p>The interesting thing about this question is that basically no one gets it right at first, save for chance or being “I will choose the obscure answer” about it. The right answer is to switch and I will try to show this from as many differing perspectives as possible till the most skeptical person accepts and finds it intuitive.</p><h4>Simulation</h4><p>I believe that sometimes, people really have to see it happen for them to get past the hump of doubt. Unlikely that a simulation by itself will show definitively the right option but it is a decent start.</p><p>I have written up a script for simulating the Monty Hall problem. The prizes are random each time and the rules of the problem are followed. The contestant can either decide to keep or change their guess. The simulation is run 1 million times and the result is tallied.</p><pre>import random<br><br>stay = 0<br>switch = 0<br>n = 1000000<br><br>for i in range(n):<br>    doors = [0, 1, 2]<br>    prize = random.choice(doors)<br>    initial_guess = random.choice(doors)<br><br>    # Adjust to find door that can be opened<br>    # .remove used as it is easier to deal with changing indices and both removes can act on the same door<br>    doors.remove(initial_guess) # We can&#39;t open the guessed door<br>    if prize in doors: # Needed in case our initial guess was right<br>        doors.remove(prize) # We can&#39;t open the door there is a prize behind<br><br>    opened_door = random.choice(doors) # There could be 2 doors left<br><br>    # Regenerated doors to find valid doors left<br>    doors = [0, 1, 2]<br>    doors.remove(opened_door)<br>    doors.remove(initial_guess)<br>    alternate_guess = doors[0]<br><br>    if initial_guess == prize:<br>        stay += 1<br><br>    if alternate_guess == prize:<br>        switch += 1<br><br>print(f&quot;If the guess was not changed we would win {stay} out of {n} tries&quot;)<br>print(f&quot;If the guess was changed we would win {switch} out of {n} tries&quot;)</pre><p>Running the simulation gave a result of 333556 out of 1000000 tries being a win if the guess was not changed. A result of about a third as opposed to a half like you may have thought. The remaining times were wins for switching your guess.</p><p>So from our simple simulation, about two-thirds of the time switching ends up in a win; twice as much as not switching.</p><h4>Infinity</h4><p>One way to see why it is not the same whether you keep or switch is to consider an alternate question. Imagine there wasn’t just 3 doors but many doors, a million doors or even a billion doors. After you choose, the host opens enough doors with goats until there are only 2 left. The one you chose and one other. Now would you switch? Is it really a 50–50 choice?</p><p>I am guessing everyone or almost everyone at least will switch. It is vanishingly unlikely that you would just happen to pick the correct door first try. In some way the other choice is more likely to be correct somehow. Hold on to that thought.</p><p>This is essentially the same as the standard Monty Hall problem. Yes it is only 3 not a billion but it still shows that a naive 50–50 ignores some nuance to the problem.</p><p>Let us look at it from yet another perspective.</p><h4>Correlation</h4><p>This time around we are going to examine the initial conditions and see the implied outcomes. After making your initial guess, there is a 1 in 3 chance that you are right. The other two third of the time you choose a wrong door.</p><p>The interesting thing though is that only if you were right at first will you win the game. If the prize was behind EITHER of the 2 doors you did not pick, you will lose unless you switch. Why? Well, that is because in both those cases, the host will remove the other door without a prize and leave the door with the prize unopened. If you don’t switch you lose in these cases.</p><p>Another way to look at this is this. Imagine the host who knows the answer wrote down a colour on a piece of paper. Cyan if your initial guess was right and magenta or yellow if it was wrong. We imagine he chooses randomly between magenta and yellow if your initial guess was wrong. This means as far as you know there is all colours are equally likely to have been written with a 1 in 3 chance for each. After the door is opened and you see the goat, the colour written on the paper hasn’t changed. There is still only a 1 in 3 chance the paper contains cyan and thus only a 1 in 3 chance that you win by sticking to your initial answer.</p><h4>An Slight Rule Change</h4><p>I am guessing and somewhat hoping most people (since I talked big earlier) get it by now but we will look at yet another perspective. This one is my favourite way of looking at it so I kept it for last.</p><p>Imagine instead of opening a door before asking you if wanted to switch the host asked this instead. “Will you stick to your current door or switch to both of the remaining doors?”. Basically, if you switch and either door has the prize you win if you don’t, you win if your one door holds the prize.</p><p>I am certain everyone will switch. Maybe not absolutely everyone. Some may not out of spite, but for those that love winning, they would all switch.</p><p>The cool thing is that nothing has changed. The game is the same as earlier just worded and presented differently. Just like before, not switching still only wins if you already had the winning door. Just like before, switching still wins if either of the doors you did not pick had the prize. The games are identical.</p><h3>Epilogue</h3><p>I hope at least one of the perspectives have clicked with everyone. The Monty Hall problem shows 2 things I think. One that human beings have terribly irrational instincts and we often have to think through problems carefully. The other is that probability is amongst the best things at exploiting this weakness of ours. From gambling to disease testing, without training we will fall for probability traps every single time. Case in point, when the problem first gained popularity hundreds of doctors (the academic kind) believed the published answer to be wrong (and wrote to the magazine about it).</p><p>I plan on exploring more probability weirdness in the future. Till then I will leave with this simple question. If a woman says she has 2 children and follows that up by saying one of them is a girl, what are the odds that the other is also a girl?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a8308fd57fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mensis Mirabilis]]></title>
            <link>https://medium.com/@monsieurblue00/mensis-mirabilis-98967d1f3258?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/98967d1f3258</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[chess]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 21:17:22 GMT</pubDate>
            <atom:updated>2026-08-23T21:17:22.429Z</atom:updated>
            <content:encoded><![CDATA[<p>It is now 2026, and robots are slowly becoming better at more and more things than people. The field of chess being a particularly hopeless example as the machines have taken over for almost 3 decades now, with people giving up on any attempt at a struggle.</p><p>Contrary to what some may think, though, the bots are still getting better, even after long since achieving superhuman strength. Any progress obtained akin to squeezing water from rock as these programs have become immensely optimised, nearing the limit of human ingenuiety.</p><p>This may not be completely true, though, as radical improvement and change could often be around the corner and unexpected, just like how it has happened once before.</p><h4>The Famous Battle</h4><p>It is 2018, and the match between the strongest classical computer program “Stockfish 9” versus the rookie neural network sensation by google deepmind “AlphaZero” was held. The match ended 155 wins, 839 draws, and 6 losses in AlphaZero’s favour. This, at least for a moment, brought the question to the minds of people if the Neural Network approach could be the superior approach for a chess bot than what had been used for generations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*y7R1ubkCclWpxyrxNyPK4Q.jpeg" /></figure><p>A detour to understand what made these 2 behemoths different is worth knowing for the story ahead.</p><h4>The Brute-Force Fish</h4><p>Stockfish like the classical chess bots before it leveraged the prime strengths of computers to play chess. It crunched through tens or hundreds of millions of positions every second, calculating and evaluating every single move in the position and every move in response to that and so on, calculating dozens of moves ahead, basically leaving no stone unturned.</p><p>This was costly but it mitigated the computational cost in 2 ways, first after checking dozens of moves ahead it was able to fairly quickly check how good the resulting position was, equivalent to a glance and second it had dozens or even hundreds of clever heuristics to optimise its search so it only did a tiny fraction of the work it would have done it went into a blind search.</p><h4>The Big Brain Alpha</h4><p>AlphaZero, on the other hand, took an opposite approach. It could only search so many positions, thousands a second as opposed to even hundreds of millions the fish could. This was because instead of taking a quick glance at positions to know if they were good, it guided it’s search with a massive neural network. This let it be able to not need to search any and everything since its big brain could allow it to basically ignore some moves that were obviously bad and focus on the promising moves.</p><p>It was the equivalent of taking a deeper think at every position before deciding what to calculate further*.</p><p>It was a trade-off between both approaches, and although classically the brute-force try had been used, it was starting to seem like there was something to the other style.</p><p>Researchers and experts from then on continued to develop bots with both philosophies, although the classical approach remained favoured. It was more flexible, less picky about hardware*, and was still steadily improving even if it may have been a foot behind.</p><p>Then came August 2020.</p><ul><li><em>The style of search used by AlphaZero was a Monte-Carlo tree search, and in practice, it worked similar to how humans actually played chess, relying on intuition and pattern recognition rather than pure brute-force calculation. This presumably led to the observation that AlphaZero played a lot of “human” looking moves throughout its match with the fish.</em></li><li><em>Classical chess engines could run as designed entirely on a computer’s CPU, while AlphaZero used special google exclusive processors called TPUs and modern implementations of the “Big Brain” approach need GPUs for inferrence on the massive Neural Networks.</em></li></ul><h4>An Elo Detour</h4><p>Before we move forward, it is worth understanding how chess playing entities&#39; (human or machine) strengths are measured. An elo rating is a standard value that captures the relative playing strength of a player with a number.</p><p>The higher the number, the stronger the player is (naturally), but more than that, it is a logarithmic, not linear scale. It is set so that player A being 400 points higher rated than player B equates to roughly 10 times the playing strength*.</p><p>Standard benchmarks for human players&#39; ratings are…</p><p>2300 ~ Master strength</p><p>2500 ~ Grandmaster strength</p><p>2700 ~ Super Grandmaster strength*</p><p>2882 = Highest rating ever recorded by a human (by Magnus Carlsen in May 2014)</p><ul><li><em>Basically, if they were to play enough games, you would expect player A to have 10 times the score of player B. At least in principle.</em></li><li><em>An unofficial position for some of the strongest players in the world. For context, there are only ever about 30 or so Super GMs in the world at a given time.</em></li></ul><p>Robots have been rated above 3000 since forever ago and are today higher than 3700. Far outside the reach of any human.</p><p>As you would expect, though, every single one of those gained points has been brutal to achieve, as seen from the below graph of StockFish’s elo progression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*6QF14W8Cz69G68maBjSZxg.png" /><figcaption>Stockfish Elo Progression</figcaption></figure><p>The above chart shows the steady improvement and elo gain by stockfish from version 4 to version 16 over the span of some 9 years. The general trend of the graph is that it generally gets less steep as time goes on as the “low hanging fruits” are all picked off and developers have to get more and more creative to squeeze out whatever gains remain.</p><p>There seems to be an abnormal increase in the elo of stockfish, though sometime late 2020, though, whatever could that be?</p><h4>The Miracle Month</h4><p>Before going further, it is worth seeing just how abnormal the jump in strength really is.</p><p>In the 19 months from January 2019 to July 2020, stockfish gained a rating of 71.88 points, and likewise, in the 34 months from September 2020 to June 2023, stockfish gained a rating of 123.98 points.</p><p>That was steady and methodical progress for an already superhuman and effectively completely optimised machine. In just August of 2020, however, stockfish gained 105.47 points. Over 100 points, in a single month.</p><p>The year is 2018 and in the wake of the uproar caused by AlphaZero Yu Nasu had just developed the use of light weight and fast Neural Networks for evaluation in the game of Shogi; a Japanese Chess variant. The implementation is called NNUE (Efficiently Updatable Neural Network) and works brilliantly.</p><p>2 years later, in 2020, Hisayori Noda ported over the idea to the stockfish project, and development began on it. This culmunated in an adapted version of it being fully developed and added to the main stockfish code base.</p><p>The idea of NNUE was that it replaced the classical handcrafted evaluation metrics developed by experts by extensive testing and their knowledge of the game with a Neural Network that could be trained and allowed to naturally understand how to evaluate positions without being told exactly what to look for. This allowed it to have a better handle on positions that were tricky for the experts and developers to break down, especially in hard code. The improvement was jarring, but the community was not done yet, the Network was constantly being trained and improved as well as entire stockfish system tweaked and tuned to accommodate the major change.</p><p>The next improvement was the clever idea to leverage the existing strength of the old classical evaluator which was faster to use for positions where it would work just fine while using the slower NNUE for more complex positions that required a closer look, creating a smarter hybrid engine of sorts.</p><p>These flurry of changes were what defined the month of August turning stockfish into a completely different monster. Now the tests were there. It was much stronger, but what did this mean in practice. A chance to show off its skills was already here.</p><h4>Old Foe, New Face</h4><p>The TCEC (Top Chess Engine Championship) was a regularly held tournament where various top computer programs would do battle to determine which was the best. At that time, 4 of the last 5 finals were between Stockfish and Leela Chess Zero, and although stockfish was the most recent winner, their head to head in the finals were even.</p><p>The interesting thing about Leela was that she was a project started by the community to recreate the essence of what AlphaZero was. She initially used the same ideas and made continual improvements as time went on. For all intents and purposes, she was the successor and didn’t disappoint, as she had been fairly even with stockfish over the years. This year was about to be different.</p><p>The tournament (TCEC 19) started August 6, just after the initial incorporation of NNUE to stockfish, with stockfish getting better as the tournament progressed. The finals came once again, and like clockwork, nay like fate stockfish was to face Leela once again. The fish faced the successor to the foe that once bested it, this time with a new secret weapon of a similar substance to AlphaZero’s essence. The final match showed that stockfish NNUE was strong not just theoretically but in practice as well, with stockfish winning by the largest margin it had ever defeated Leela by and going on to win the next 10 finals* in a row, 8 times against Leela herself.</p><ul><li><em>All 10 played since.</em></li></ul><h3>Epilogue</h3><p>Improvements to NNUE didn’t end then, though, with it constantly being improved to this day and a full NNUE evaluation implemented in 2023.</p><p>The story, though, is not of what it is or what it did but that it represented the possibility of great improvement in an area where it seemed impossible. Technology is tricky and progress unpredictable. Progress may always seem to have stalled or stopped, but you never know if there is a NNUE jump around the corner.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98967d1f3258" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An anomaly amongst anomalies]]></title>
            <link>https://medium.com/@monsieurblue00/an-anomaly-amongst-anomalies-b965bd00037c?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b965bd00037c</guid>
            <category><![CDATA[basketball]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[nba]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 07:01:51 GMT</pubDate>
            <atom:updated>2026-06-05T07:05:24.626Z</atom:updated>
            <content:encoded><![CDATA[<p>So basketball.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*ggHwpyKaxsx7WWz1gVrxvA.jpeg" /></figure><p>I have become more and more interested in the sport over the last year or so. Being the numbers and data lover that I am, I find it especially satisfying to see the wide selection of analytics and metrics that one can get lost in for analyzing the sport. Football is my first love but I do have to concede that she loses in look in this regard. Being someone that loves to watch the numbers, some may retort that I am not a true fan and the sport is way more than what numbers can capture. I disagree, there is nothing numbers can’t capture. We simply haven’t figured out how to make the numbers capture it. The critics are probably right though, that my loyalty may not truly lie with the sport as I find it an avenue to explore my obsessive obsession about numbers.</p><p>With that out of the way, it should be said if it is not already clear that this is a post for those with an at least cursory knowledge about basketball and a passable interest in the numbers that describe the game.</p><h3>You just had to be there</h3><p>Being a new “fan”, there is no end to the amount of apparently pivotal and historic moments that have been recorded in the annals of basketball that I could only wish I experienced while it happened, and amongst them was how in 2016 one man rained down mayhem never before or since seen on the sport in mind bending ways. Stephen Curry warped the sport, hacked the game, “you just had to be there”.</p><p>This fact is evident to anyone as the sport has definitely changed compared to what it was in years prior to that but that is not the extent of it. Not the 3 point revolution it played a major role in ushering in, not the unanimous MVP award, not the historic Warriors 73–9 record. It, they say, was the way he broke the game by painting the greatest scoring season ever witnessed.</p><p>The 402 3s are nice, the 50–40–90 achievement was cool, the 30 ppg season was decent but they don’t individually or collectively tell the story of what sort of alien Steph was in 2016. You just had to be there.</p><p>I for one wasn’t there and refuse to believe I had to be. With my philosophy being that numbers can tell anything if you try enough, I will do my best to step back* in time 10 years and see exactly what made 2016 Stephen Curry so game breaking.</p><ul><li><em>Get it?</em></li></ul><h3>The Plan</h3><p>Although we don’t have everything, we are not going into this blind. We know this season was supposed to be great as an offensive season and specifically as a scoring season so we can simply check how good it was at that. The game plan is thus</p><ul><li>Find the list of the best scoring seasons</li><li>Find how much they scored</li><li>Find out how well they scored</li></ul><h3>Step 1?</h3><p>The first step is actually contingent on the next 2 because the best scoring seasons are those that scored a lot and did it well so we would need to deal with those questions before fully answering this.</p><h3>Step 2</h3><p>The question of how much a player scores is not a very difficult one. Simply find the highest points per game seasons of all time (a list surely to be filled by a certain name) and we are done, right? Well not quite.</p><p>For one, it matters how long you had to score those points. It is less impressive if you scored a lot but played 48.5 minutes a game to score them. Adjusting the amount of points scored to the amount of minutes the player had to score those points is thus important. A minutes normalized metric like points per 36 (or 48) minutes is thus a better measurement of how much a player scored but even this is not perfect.</p><p>A player on a team that creates a lot possessions every game does not necessarily owe his greater volume of scoring to his skill as a volume scorer but potentially other factors unrelated to scoring. Normalizing not for minutes but possessions instead with a metric like points per 100 possessions is a better metric and will be our de facto measure of “how much a player scores”.</p><p>It obviously is not perfect, but it is good enough.</p><h3>Step 3</h3><p>The next question is how well a player scores and with this question I am asking the question of efficiency. A player that scores a decent amount may be no good as a scorer if he uses all of his team’s possessions to achieve it. Scoring a lot in few enough possessions for the rest of your team mates to rack in points in the rest is a hallmark of a good scorer*.</p><p>Just like with scoring, there is an obvious metric for measuring scoring efficiency, the field goal percentage. This however is a hilariously bad metric as it does not consider the obvious difference between the worth of 2 point and 3 point shots. Any player that makes 4 of every 10 shots will have the same field goal percentage despite the difference in points contributed between making 4 2 pointers and 4 3 pointers. Basically true high efficiency made up of a lot of 3 pointers skews towards a lower field goal percentage. The efficiency of free throws are also disregarded in the measure.</p><p>True shooting percentage instead is the answer to all our worries. It is an advanced metric that was developed to adjust the field goal percentage to factor in its 2 big weaknesses. The formula for true shooting percentage is largely irrelevant as we can simply take it as a mostly accurate measure of efficiency.</p><ul><li><em>There may be other advantages to be had that contribute to winning gained by being not the most efficient but they are not directly related to skill as a scorer.</em></li></ul><h3>A Great Scorer</h3><p>Both ingredients are necessary for a great scorer or scoring season. It is no good (as a great scorer) if you score a lot of points but take up valuable possessions to do so, or if you score extremely efficiently but only a few points.</p><p>I posit (I would say reasonably) that a great scoring season must be excellent at both.</p><h3>A second swing at Step 1</h3><p>Now that we know what to look for, we can find the best scoring seasons of all time. We can simply find the top X (I used 250) seasons based on points per 100 possessions and also the top X (I used 250) seasons based on true shooting percentage.</p><p>There are 2 ways of making the list into one. The more comprehensive thing to do is to find the true shooting of all of the top scoring seasons and the points per 100 possessions of all of the most efficient seasons. We can then merge the lists (making sure to drop any duplicates).</p><p>The other way which I chose is to simply keep the entries that appear in both lists and drop the rest. This leaves us with a much smaller final list but more than likely full of the best amongst the greatest scoring seasons.</p><p>Doing all of that and plotting a graph of true shooting percentage against points per 100 gives us this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UfBibqBHCh6hsKAKKZePUA.png" /><figcaption>True Shooting vs Points per 100 possessions</figcaption></figure><p>From the graph we can see the clear cluster and the clear outlier (in red) towards the top and that player is you guessed it… Nikola Jokic.</p><p>Rather anti-climatic, and not quite the result you may have been expecting but although it shows Jokic had a brilliant season in 2023, we made a crucial oversight.</p><h3>Impactful</h3><p>The resolution to this is a question of what makes greatness. Are absolute numbers the best or is context of your peers important. In this case we made an oversight. When people say “you just had to be there”, they are making a claim about how it looked to them when they, in fact, were there. How it felt for Steph to be so good at the time he played.</p><p>The reality of impact is how good you are matters little compared to how good everyone else is. A secret reason why we used points per 100 possessions is that it adjusts for the era you played. Players are people of their time, so what was happening in their time should be considered. The number of possessions played on average per team changed at different periods in basketball, showing the way coaches and teams set up and thought. It shows little that you scored 40 points in a season if the philosophy of the era was to maximize scoring opportunities and points. Taking points per 100 possessions normalizes for this swing in philosophy by asking the pure question, “How many points could you get on the score sheet for every 100 times your team had the ball?&quot;”</p><p>The problem with true shooting percentage is that it doesn’t come installed with this bias adjusting mechanism. Playing philosophy and player skill has led to players steadily gaining efficiency in the past years, so looking at the true shooting will hardly explain how it felt to see in 2016. Ultimately, it is more mind bending to see a person score 3 of every 10 shots when the average player scored 1 than to see a player score 7 of every 10 shots when the average player scored 6. Although the latter be more efficient, the former will ultimately generate excess points compared to the opposition and win games. Our measure thus becomes not simply true shooting but the excess of true shooting over the average of the season or relative true shooting if you will.</p><p>Plotting the graph again with relative true shooting instead of true shooting gives</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_8_bpDW9-3a1beDJqdOvw.png" /><figcaption>Relative True Shooting vs Points per 100</figcaption></figure><p>With this, we can see that there is a general trend for higher volume scorers to be relatively less efficient, as expected since higher volume scoring dictate settling for worse and worse shots. Despite this, though, 3 (in red) seem to still be outliers being more efficient than you’d expect them to be for their volume. These are Charles Barkely in 1988, Kevin Durant in 2014, and Shai Gilgeous-Alexander in 2026 respectively. So where is Steph.</p><p>Well… I took him out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJ3hXG648h94mRBZTf8wHg.png" /><figcaption>Relative True Shooting vs Points per 100 (with Steph)</figcaption></figure><p>That, in purple, is 2016 Stephen Curry, an anomaly amongst anomalies. He is completely alone on the graph, a way higher volume scorer than similarly efficient scorers and a way more efficient scorer than similarly high volume scorers, truly one of one. It breaks my mind how ridiculous his combination of volume and efficiency were, I guess you really had to be there to get it.</p><p>As a last aside for those wondering, I did check for who had the most seasons on here and yes Kevin Durant is the most with 7 despite only 3 players having more than 3 appearances (the other 2 being Jokic and Steph) so… greatest scorer ever? :) You make that call.</p><h3>Conclusion</h3><p>This was by no means close to a replication of what it felt to witness the meteor that was 2016 Stephen Curry. It was just an effort to try to make the numbers confess the truth we know they hold.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b965bd00037c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we see sound]]></title>
            <link>https://medium.com/@monsieurblue00/how-we-see-sound-6e64c7aa1d59?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e64c7aa1d59</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 12:12:51 GMT</pubDate>
            <atom:updated>2026-06-04T17:05:39.908Z</atom:updated>
            <content:encoded><![CDATA[<p>It is the 1940s, and researchers are experimenting on this interesting new way of solving computer image recognition problems. The name Neural Network is coined as these structures are based heavily on the human brain. The thinking is that if we are to recreate intelligence in computers, using the quintessential example of an intelligent structure as a guide is probably a good idea*.</p><p>The early life of neural network research indeed found some guidance from neuro science, but as the field progressed and developed major breakthroughs*, it started to drift away from its “brain-like” roots. Any connections remaining between the fields being tenuous at best and pseudoscience at worst; the name Neural Network becoming something of a misnomer and entirely a relic of the past. Case in point, when the modern-day state of the art AI do what they do, there is nothing remotely resembling brain activity happening under the hood. Claude for example isn’t a giant brain at Anthropic HQ thinking through our requests as we may have imagined.</p><ul><li><em>Early research on neural networks was based on Hebbian theory. The theory summarized by “</em><strong><em>Neurons that fire together, wire together</em></strong><em>.” This proposed the connection between neurons that were often active at the same time, and served as a basis of understanding of neural network weights.</em></li><li><em>First from convolutional networks and now to transformers and beyond, the domain of deep learning has incorporated architectures that are difficult to argue looking anything like the human brain.</em></li></ul><h3>Myth or Music</h3><p>The idea that blind people are often better at hearing than sighted individuals is a common one that many of us are familiar with in some regard. Researchers have been able to identify, though, that specifically for people either born blind or that become blind early on in their life, this phenomenon is not only measurable but likely a result of <strong>crossmodal plasticity*.</strong></p><p>This, in this case, is the brain using sections normally for visual processing for audio input. Basically, the dormant sight infrastructure in the brain finds new purpose with hearing. This in of itself is a fascinating insight into the mind-bending capabilities of the human body and brain specifically, but here it suggests something else equally interesting to the AI enthusiast. It means that on some level, audio and visual inputs are similar enough that they can be processed by the same underlying “agent”. Let us keep that at the back of our minds for now*.</p><ul><li><em>“The combination of auditory psychophysical investigations and functional imaging studies has identified that specific, rather than general, auditory enhancements in the early blind can be linked to activation in extrastriate visual cortex, providing evidence of crossmodal plasticity. Furthermore, areas of visual cortex demonstrating increased activation during the performance of either spatial or feature acoustic tasks in the early blind align well with the trajectory of the dorsal and ventral visual processing streams, respectively” — (</em>Carina J. Sabourin, Yaser Merrikhi, Stephen G. Lomber<em>)</em></li><li><em>The mystery mouseketool - that is a surprise tool that will help us later </em>:)</li></ul><h3>An Unlikely Cross over</h3><p>As AI was continually progressed within the visual space in utility and performance, it wasn’t difficult to see the need for AI to help with audio problems as well. Object detection and image recognition was becoming useful in transportation for development of self-driving cars, security for surveillance systems and facial recognition, medical industry for detection of tumors, agriculture for early identification of pest and disease, and many other applications.</p><p>Audio uses like voice biometric, audio transcriptions, text to speech, isolation of sounds were all important and could use the help of a competent AI.</p><p>The problem was then to come up with a reliable AI, potentially a neural network (as those seemed to solve everything) approach that could open up the possibilities of audio. On the surface, It was a completely different hill to surmount requiring new research and experimentation, but reality is often more bizarre than fiction.</p><h4>Spectrogram</h4><p>Audio data can be represented as it’s waveform; those thingies you see when you record a voice note. It is simply a representation of the loudness of the sound over its duration, with peaks at loud sections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*NXtAFTFm1klnUHirpxFCTQ.avif" /><figcaption>A sample waveform</figcaption></figure><p>Sufficiently precise* waveforms are enough to represent the audio data recorded and are simple looking data but too simple to glean a sufficient amount of understanding of the underlying recording from. Waveforms are evidently not very good as visual representations of a recording.</p><p>A more informative description of audio data is the <strong>spectrogram</strong>.</p><p>Most sounds we hear are actually a combination of many different “pure” sounds of different pitches like various sounds in a trench coat. The spectrogram is a way of seeing what different pitches are contained in the recording at different times and how much of each.</p><p>Any vertical line represents the pitches that make up the sound, as this can change from moment to moment. Various shades represent the loudness of each</p><p>Although the spectrogram is more substantial than the waveform in its descriptive ability, it isn’t perfect either as information about the recording is lost when converting to a spectrogram from a waveform and it is therefore not possible to revert the transformation*.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*l5cI0ezNiS1ldPxgWpc9KA.png" /><figcaption>a sample spectrogram*</figcaption></figure><ul><li><em>A resulting waveform depends on the sampling rate or how often the amplitude (loudness) is measured per second to give the signal. A sufficiently large sampling rate is needed to give a correct sounding recording to the agent “listening”. For human beings, based on the range of frequencies we can detect, a sampling rate of about 8000 is high enough to give an accurate sounding recording.</em></li><li><em>Spectrograms have missing phase information. It knows what sounds make up the recording but not “when” the sounds were. At a conceptual level, it is like knowing a sound is made up of various rhythms but not knowing what section each different rhythm is at when they play together. It is, however, possible to estimate the missing phase information, especially with help from modern AI — we have come full circle.</em></li><li><em>The frequency of the constituent sounds are a measure of pitch.</em></li></ul><h4>Eureka</h4><p>It is often said that the first solution one thinks of to a problem is very often a terrible one, but then every rule has an exception.</p><p>If we are looking for a way to perform audio classification and we already know how to classify images pretty well, why not just treat the audio as an image and go from there. More specifically, we can adapt AI models already trained to be really good at recognizing images of objects to images of spectrograms*. In machine learning parlance, we fine-tune* the models.</p><p>Although a clever thought, there is no obvious reason this should work at all since spectrograms are not objects. There is no reason something that has been trained to recognize how a dog looks should be able to recognize how a bark “looks” as well. This is why it is all the more bizarre that it not only works but works really really well. The Audio Spectrogram Transformer (AST) is a state of the art model that uses this approach, adapting Vision Transformer (ViT) to spectrograms.</p><p>This showcases the phenomenon observed in cross-modal plasticity that architecture suited for vision can be used for audio because in some unobvious way, they are similar.</p><ul><li><em>AI actually uses mel spectrograms. These are variants of classical spectrograms that are more focused of the pitches detectable by the human ear. The idea is that it is probably more useful to focus on what humans actually hear to be able to build something that perform well on problems humans attempt.</em></li><li><em>Fine-tuning involves retraining an AI that has been “pre-trained” to be competent in a general domain on a smaller specific use case. The advantage is that it much easily transfers its skills to the more specific case and thus achieves better results with smaller data. Chat bots are a familiar example of AI that leverage fine-tuning.</em></li></ul><h3>Conclusion</h3><p>Although I don’t believe researchers in either field were aware of each others work while getting these results, I think it serves as a convergence of these once related fields that have become distant cousins. Showing that as they drift ever apart, they will occasionally collide every now and then, echoing their past and their shared heritage of exploring intelligence.</p><h3>References</h3><ul><li>Do blind people hear better? — Carina J. Sabourin, Yaser Merrikhi, and Stephen G. Lomber</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e64c7aa1d59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Exploitation of Obstacles]]></title>
            <link>https://medium.com/@monsieurblue00/the-exploitation-of-obstacles-a0882632b096?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0882632b096</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Fri, 24 Oct 2025 22:16:49 GMT</pubDate>
            <atom:updated>2025-10-24T22:16:49.411Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*8E0ohSqn1iJS9qrpXMzMTw.gif" /></figure><p>Recently, Openai’s newest version of their video generation model Sora has appeared to take the internet by “storm”. Depending on who you are and your general interests, the algorithmic nature of the web will dictate the sort of storm this is, ranging from a light drizzle to a hurricane and many may yet remain unaware of what it is I am referring to.</p><p>For those that are aware of it’s existence and are not completely indifferent to what it is, opinions will generally be divided on whether it is an impressive piece of technology or just an ethical mess and nothing more. The latter view is definitely an important perspective worth examining… in the future but for today I take the (one could say cowardly) stance of simply indulging holders of the first stance just a bit.</p><p>Impressive as it may be that it may be that AI has become able to generate these (occassionally) realistically looking videos, and although Sora is probably the most impressive AI of its kind at doing its job, it is by no means a singularity and a quantum leap from what had already existed before it. It is quite simple to fall into the trap of over weighting the achievements of what lies in front of us and forget the incremental but real progress that technology has taken in prior years of this frankly strange era.</p><p>AI has long been able to generate* (for better or for worse) concerningly good images and videos in specific scenarios and has traditional achieved this through not the <strong>Diffusion</strong> architecture prominent today but using a more elegant and really clever piece of Maths and Programming called <strong>Generative Adverserial Networks </strong>(GANs)</p><ul><li><em>Some may hold the opinion that “generate” is simply Big Tech lingo for steal.</em></li></ul><h3>PreHistoric Times</h3><p>Prior to GANs, the prominent methods in the field of image generation were sophisticated algorithms like Autoencoders, Boltzmann machines and Hidden Markov Models.</p><p>Interestingly, it took a not just different but in many ways much simpler approach to make significant progress in the field.</p><h3>An Adversary</h3><p>As you may have surmised, the concept of an adversary of some sort may be important to an “ … Adverserial Network”, but what exactly is that. It’s quite simple actually and can first be seen as a strategy of learning in general before a Machine Learning or Artificial Intelligence architecture in particular.</p><p>Consider an art forger who has decided to take up a career in forging paintings by Monet and selling his counterfeits as the real deal. One obstacle stands in his way though, an art investigator that has taken on the opposite job of finding Monet forgeries and is somehow very fixated on any and all “art” our dear forger tries to sell. I use the term forger and investigator very liberally here because initially they are both very incompetent at their jobs.</p><p>One is only able to fool the other by sheer luck, as they both have no real skill but importantly before every rendevous with the forger the investigator takes a look at real authentic paintings by Monet and is eventually able to somewhat reliably tell what makes the fakes … fake. The brush strokes are too heavy, the pigment is the wrong type and so on. Being the darling that he is, he informs the forger of why his forgeries could not possibly be the real thing and he gets back into the lab, improving on his skills and correcting his mistakes until he his once again able to fool the investigator. The better the forger gets, the better the investigator has to become to pick up on the ever more imperceptible differences between the actual paintings of Monet and the fakes.</p><p>This dance continues as each helps the other better hone their skills until the forger is (in principle) able to perfectly replicate Monet’s paintings and the investigator is forced to admit that it is entirely a guess to try and discern if the paintings are real or fake. Essentially the flip of a coin.</p><p>Now let’s reframe the scenario a little. Instead of the forger and investigator being rivals trying to outwit and outperform each other, we imagine the forger works for someone who hired the investigator specifically for the purpose of getting the forger to the point of creating fakes that are indistinguishable from originals. The end goal is getting the forger to become as good as possible but that process requires dual improvement of both forger and investigator. In this our scenario, the investigator is exactly what we refer to as an<strong> Adversary</strong>. He exists to make the learner (the forger in this case) improve by constantly being an ever improving obstacle he has to overcome.</p><h3>GANs</h3><p>Now it is time for us to understand how Generative Adversial Networks actually work. A GAN contains 2 AI models, a Generator and a Discriminator. In general, the models can be a wide range of different architectures and GANs can be used to solve a variety of problems but in keeping with the theme we consider a GAN used for image generation containing a Generator and a Discriminator which are both Neural Networks.</p><p>Both Models in this case are convolutional Neural Networks, architectures especially suited for image recognition problems. The problem really is finding an effective way of guiding said model to a configuration that can not just recognise but “generate”.</p><p>The Generator starts off with a grid of random noisy pixels as an input with the goal of generating an image of a … something as an output. Initially it unsurprisingly can’t do a particularly good job of generating a passible image and its concoction is sent to the the Discriminator which has to give a number from 0 to 1 showing its confidence that the image is indeed real. Initially the Discriminator is also terrible at its job but it has 2 things going for it. First the images it is shown alternates between the attrocities generated by the Generator and actual legit images and second, it can use the magic of backpropagation and gradient descent to adjust it parameters to make it slightly better at its job (of returning 0 when shown a fake and 1 when shown an original). What makes a GAN truly adverserial is the fact that both networks want opposite things for the result of the Discriminator as regards to fake images.</p><p>The Discriminator naturally wants to identify fake images and thus wants to return a 0 while the Generator wants to generate images so good they fool the Discriminator and wants it to return a 1. The kicker is that both models are trained (by gradient descent and back propagation) to optimise their diametrically opposite goals simultaneously. This essentially walks both models through configurations where they improve simulatenously.</p><p>The training session has made the Generator better at generating images but the Discriminator has also gotten better. Neither can relent as they are in essence back to where they were relative to their adversary and the Sisyphean dance repeats.</p><p>Eventually both models become sufficiently good and when needed for inferrence, the Discriminator can basically be discarded as only the Generator is needed, now able to turn in random noise as an input and generate a picture of whatever it was trained to forge.</p><h3>Conclusion</h3><p>The state of image and video generation AI is fairly volatile for good reason with major breakthrough being often difficult to place as a good thing but we can always remember that at the very least, under the hood often lies really elegant and cleverly solutions people have devised to particularly tricky problems.</p><h4>References</h4><p><strong>Generative Adversarial Nets —</strong> Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0882632b096" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neural Networks Demystified: Chapter 5 … Learning II]]></title>
            <link>https://medium.com/@monsieurblue00/neural-networks-demystified-chapter-5-learning-ii-3322d75c8e65?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/3322d75c8e65</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Wed, 13 Aug 2025 21:59:49 GMT</pubDate>
            <atom:updated>2025-08-13T21:59:49.785Z</atom:updated>
            <content:encoded><![CDATA[<h3>Neural Networks Demystified: Chapter 5 … Learning II</h3><p>We have investigated the essense of Neural Networks, understanding their architecture and the process by which machines learn by Gradient Descent. As we discovered last time, our understanding of the method by which Neural Networks in particular adopt gradient descent is incomplete without a method of obtaining the relevant partial derivatives, the powerful algorithm that achieves is called <strong>Backpropagation</strong>.</p><p>Although supremely important and worth understanding, thorough investigation of the backpropagation algorithm involves grappling with a significant amount of technical details. The vast majority of inquisitors can make do with the knowledge that such an algorithm exists without bothering much with how exactly it works. They can essential treat it as a black box that does… it simply works, and still get a sufficient understanding of the ideas of Neural Networks. The process of understanding the algorithm is not useless though for those willing to contend with a bit of technical detail. I have written a supplementary paper on <a href="https://www.researchgate.net/publication/394471027_Backpropagation">backpropagation</a> for anyone interested in checking it out.</p><h4>Stochastic Gradient Descent</h4><p>After obtaining our required derivatives using backpropagation, we are ready to adjust our weights but we run into a consideration regarding efficiency. In actuality, we would need to obtain the derivatives for all data points in our training data and use the average of these values to obtain our “true” adjustment to our parameters. This is because our actual cost function is an average of the cost of all data point. Applying the cost function to any particular data point only describes how good the network is as solving that specific problem but averaging over all the problems signifies how good the network is at solving a class of problems.</p><p>This introduces a problem of efficiency though since if we have millions and millions of data points — a good thing for training, we would have to compute the derivatives for all, average them before being able to use that for one gradient descent step. After that, we restart the entire process for potentially thousands or tens of thousands of steps. There is thankfully a work around which involves splitting the entire training data into smaller batches whose averages as used for each gradient descent step so multiple steps can be carried out during a single passby of the training data called an <strong>Epoch</strong>. This process of splitting the training data in smaller batches and applying gradient descent to each batch is called <strong>Stochastic Gradient Descent (SGD)</strong>, highlighting the that it is a less accurate and noisy version of true gradient descent.</p><p>Although technically not perfect, SGD’s increase in speed more than makes up for the loss in accuracy which has been experimentally shown to not be that big of an issue anyways.</p><h4>Training</h4><p>Putting all these together our training becomes:</p><ol><li>Divide the training data into batches and pick the first batch.</li><li>Use backpropagation on the batch and SGD to update the weights and biases of the network.</li><li>Move on to the next batch and keep applying step 2 until there are no longer any batches in the training data.</li><li>Return to step 1 and keep returning to step 1 until the network is sufficiently or for a specified number of epochs.</li></ol><p>We can now modify our Neural Network code to add the functionality of training.</p><pre>def _positive_sigmoid(x):<br>    return 1 / (1 + np.exp(-x))<br><br><br>def _negative_sigmoid(x):<br>    exp = np.exp(x)<br>    return exp / (exp + 1)<br><br><br>def sigmoid(x):<br>    positive = x &gt;= 0<br>    negative = ~positive<br><br>    result = np.empty_like(x, dtype=float)<br>    result[positive] = _positive_sigmoid(x[positive])<br>    result[negative] = _negative_sigmoid(x[negative])<br><br>    return result<br>    <br>def sigmoid_prime(z):<br>        return sigmoid(z) * (1 - sigmoid(z))<br><br>def quadratic_cost(a, y):<br>    return np.square(a - y)<br><br>def quadratic_cost_derivative(a, y):<br>    return 2 * (a - y)<br>                <br>class Network:<br>    <br>    def __init__(self, size):  # size should be a list of the length of each layer e.g [4, 5, 5, 3] <br>        self.size = size<br>        self.weights = [np.random.normal(size=(size[i + 1], size[i])) for i in range(len(size)-1)] # list of all weight matrices<br>        self.biases = [np.random.normal(size=(size[i], 1)) for i in range(1, len(size))] # list of all bias vectors<br>        <br>    def feedforward(self, x): # method for finding the output of the network, x must be a numpy vector<br>        a = x<br>        for w, b in zip(self.weights, self.biases): # performs the same computations for each layer<br>            z = np.matmul(w, a) + b<br>            a = sigmoid(z)<br>        return a<br><br><br>    def train(self, learning_rate, batch_size, epochs, training_data, test_data):<br>        training_costs = []<br>        training_accuracies = []<br><br>        test_costs = []<br>        test_accuracies = []<br>        <br>        for i in range(epochs):<br>            permutation = np.random.permutation(training_data[0].shape[1])<br>            current_training_data = [training_data[0][:, permutation], training_data[1][:, permutation]]<br>    <br>            batches = [[current_training_data[0][ : , k : k + batch_size], current_training_data[1][ : , k : k + batch_size]] for k in range(0, training_data[0].shape[1], batch_size)]<br>            for batch in batches:<br>                self.update_parameters(batch, learning_rate)<br>                <br>            print(f&quot;Epoch {i}&quot;)<br>            <br>            training_cost = self.compute_cost(training_data[0], training_data[1])<br>            training_accuracy = self.compute_accuracy(training_data[0], training_data[1])<br>            training_costs.append(training_cost)<br>            training_accuracies.append(training_accuracy)<br>                                                      <br>            <br>            print(f&quot;Training Cost: {training_cost}&quot;)<br>            print(f&quot;Training Accuracy : {training_accuracy}&quot;)<br><br>            test_cost = self.compute_cost(test_data[0], test_data[1])<br>            test_accuracy = self.compute_accuracy(test_data[0], test_data[1])<br>            test_costs.append(test_cost)<br>            test_accuracies.append(test_accuracy)<br><br>            <br>            print(f&quot;Test Cost: {test_cost}&quot;)<br>            print(f&quot;Test Accuracy : {test_accuracy}&quot;)<br><br>        return training_costs, training_accuracies, test_costs, test_accuracies<br><br>    def update_parameters(self, batch, learning_rate):<br>        delta_weights, delta_biases = self.backprop(batch)<br><br>        self.weights = [w - (learning_rate * dw) for (w, dw) in zip(self.weights, delta_weights)]<br>        self.biases = [b - (learning_rate * db) for (b, db) in zip(self.biases, delta_biases)]<br><br>    def backprop(self, batch):<br>        <br>        z_s = []<br>        a = batch[0]<br>        a_s = [a]<br>        <br>        for w, b in zip(self.weights, self.biases):<br>            z = np.matmul(w, a) + b<br>            z_s.append(z)<br>            a = sigmoid(z)<br>            a_s.append(a)<br><br>        deltas = [np.zeros((b.shape[0], batch[0].shape[1])) for b in self.biases]<br><br>        delta_weights = [np.zeros_like(w) for w in self.weights]<br>        delta_biases = [np.zeros_like(b) for b in self.biases]<br><br>        deltas[-1] = quadratic_cost_derivative(a_s[-1], batch[1]) * sigmoid_prime(z_s[-1])<br>        <br>        delta_biases[-1] = ((1/batch[0].shape[1]) * np.sum(deltas[-1], axis=-1)).reshape(-1, 1)<br>        delta_weights[-1] = (1/batch[0].shape[1]) * np.matmul(deltas[-1], np.transpose(a_s[-2]))<br><br><br>        for l in range(-2, -1 * len(self.size), -1):<br>            deltas[l] = np.matmul(np.transpose(self.weights[l + 1]), deltas[l+1]) * sigmoid_prime(z_s[l])<br><br>            delta_biases[l] = ((1/batch[0].shape[1]) * np.sum(deltas[l], axis=-1)).reshape(-1, 1)<br>            delta_weights[l] = (1/batch[0].shape[1]) * np.matmul(deltas[l], np.transpose(a_s[l-1]))<br><br>        return (delta_weights, delta_biases)<br><br>    def compute_cost(self, x, y):<br>        cost = 0<br>        for i in range(0, x.shape[1], 100):<br>            a = self.feedforward(x[ :, i : i + 100])<br>            cost += np.sum(quadratic_cost(a, y[ :, i : i + 100]))<br>        return cost/x.shape[1]<br><br><br>    def compute_accuracy(self, x, y):<br>        total = 0<br>        for i in range(0, x.shape[1]):<br>            a = self.feedforward(x[:, i : i + 1])<br>            if np.argmax(a) == np.argmax(y[:, i : i + 1]):<br>                total += 1<br>        return total / x.shape[1]</pre><p>The updated code is basically the Neural Network we have discussed thus far with all of its functionality and in all of its glory. It retains the ability to convert inputs to outputs while gaining functionalities we have discussed like training using gradient descent and an implementation of backpropagation as well as utility functions like computing the accuracy of the network on a data set. I also changed the implementation of the sigmoid to deal with instability*.</p><p>The new code is fairly technical but is just an implementation of the ideas we have already discussed. We have managed to create a neural network that could solve problems in principle but how would we be convinced without putting it to the test.</p><ul><li><em>The original sigmoid implementation was prone to overflow if the input was too large since very high (essentially infinite) values would be involved in computation. The new implementation only fixes that issue and is otherwise identical to the original.</em></li></ul><h4>MNIST</h4><p>The MNIST dataset is a classic example in the field of neural networks and will be the adversary for our network. It is a large dataset of 70000 labelled images (images alongside what they should represent) of handwritten digits split into 2 groups of 60000 training images and 10000 test images for evaluating how good the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*71m3eOsB-R9iO3Dvdb4FMg.png" /><figcaption>First Image in the MNIST dataset</figcaption></figure><p>The MNIST dataset is a particularly appropriate first step because of its blend of simplicity, difficultly and relevance. It is simple in the sense that state of the art models are extremely good at the problem*, and the fact that it isn’t the most difficult problem AI has tackled. It is difficult because attempting to solve the problem without Neural Networks or other advanced machine learning models is surprsingly tricky*, and it is relevant because computer vision and image recognition is a very cutting edge and important domain in machine learning.</p><p>As the dataset is already divided for us into 2 neat groups, we will try to improve the model as much as possible on the training dataset and regularly test its performance using the test dataset, seeing how many of the ten thousand images it classified correctly. The hope is that it will be able to generalise to new never before seen images from what it has indeed learnt from.</p><ul><li><em>State of the art is nearly 99.9% accuracy, misclassifying only about a dozen or so of the 10000 test images, far better than even human performance. Our model won’t quite reach those heights but will be impressive nonetheless.</em></li><li><em>This fact is at the core of neural networks in general. The problem of digit recognition is a showcase of how people are good certain things just because and will struggle to teach or explain exactly why they are good at what they do. Try explaining the conditions for recognising different digits and you will run into endless number of exceptions. The problem of teaching a machine to be able to do it is even more difficult.</em></li></ul><h4>Results</h4><p>The first steps were to obtain a copy of the MNIST dataset and perform a little bit of preprocessing; basically converting it into the form the network would expect including normalising.</p><pre>(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()<br><br>x_train = x_train.transpose((1, 2, 0)) / 255<br>x_test = x_test.transpose((1, 2, 0)) / 255<br><br>x_train = x_train.reshape(784, -1)<br>x_test = x_test.reshape(784, -1)<br><br>y_train = np.eye(10)[y_train]<br>y_test = np.eye(10)[y_test]<br><br>y_train = y_train.transpose((1, 0))<br>y_test = y_test.transpose((1, 0))</pre><p>The Network of choice is of the dimensions (784, 30, 10). 784 for the input layer because the image is a flattened 28 x 28 greyscale image. 10 for the output layer so one Neuron for each predicted digit from 0 to 9*. The hidden layer is chosen as 30 neurons for no particular, one hidden layer is also chosen for no particular reason*.</p><p>Initialising and training the model then …</p><pre>nn = Network((784, 30, 10))<br>history = nn.train(1.5, 64, 30, [x_train, y_train], [x_test, y_test])<br></pre><p>The model is trained for 30 epochs (it seemed to be enough), with a batch size of 64 (not super important) and learning rate of 1.5 which is determined more or less by trial and error… too little and it will train slowly but too much and it won’t train.</p><p>After training the network achieved an accuracy of about 94.5% so about 1 error in 20 which is respectable for such a simple (relatively speaking) network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*i7fq5Vu6A70FBLGmlC4R6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*obUHWAl9uS6j-iScmLxeAQ.png" /></figure><p>Above shows the costs and accuracies of the network over its training. The accuracy seemed to improve alongside a reduction in cost with each passing epoch as hoped for.</p><p>Interestingly, the accuracy and cost on the test dataset which are the actually important metrics seemed to separate more and more from the training dataset metrics with passing epoch. This is an example of <strong>Overfitting </strong>where the model sees the training data so many times it learns to essentially memorise the answer. Overfitting is correlated with worse performance on unseen data so it is generally to be avoided. Our model is simply not robust or complex enough to avoid overfitting so it was important to avoid training it for too long.</p><ul><li><em>Since the dataset consists of different single digits, the network has to answer 1 of 10 options for each datapoint. The “answer” of the network can simply be chosen as whichever output neuron is closest to 1.</em></li><li><em>Various combinations of hidden layers could be tried and many would definitely give a better result than our choice but this is chosen as a proof of concept more than anything.</em></li></ul><h4>Conclusion</h4><p>We have now examined the concepts which neural networks stand on and successfully implemented a network for solving an image recognition task. There are ofcourse many improvements we can make to our model both little and large that will have a drastic improvement on its performance and maybe we will be return to this problem armed with these improvements but regardless, the model not only already showcases the success that neural networks can achieve but still acts as the foundation for more complex and powerful architectures.</p><p>We have gone through the journey of weighted sums, biases, activation and cost to arrive at a functional neural networks. Let us return building on what we have seen to investigate even more ways that machines can attempt to copy the human brain.</p><h4>References</h4><ul><li>Neural Networks and Deep Learning — Michael Nielsen</li><li>Backpropagation — Oluwasemilore Adelaja</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3322d75c8e65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When computers learn by trying]]></title>
            <link>https://medium.com/@monsieurblue00/when-computers-learn-by-trying-82321783b72b?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/82321783b72b</guid>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Thu, 24 Jul 2025 08:51:45 GMT</pubDate>
            <atom:updated>2025-07-24T08:51:45.828Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHHrcBJ1_pngZWSbaGN81w.png" /></figure><p>Entering into a new environment for the first time, the scenery feels alien, and the layout is incomprehensible. Directions are random strings of words “left, left, right, left…” with no meaning to them whatsoever, how various locations connect to each other is an enigma, impossible to parse, and the whole picture of which they are a part of cannot quite fit into the mind. New locations simply appear, and slight deviations from strictly memorised paths are enough to disorient, all distances are enormous as there is no way to know how close or far you are to your destination until you arrive.</p><p>The very fact that this could change is inevitable but difficult to understand. Then days pass by, with repeated visits, days become weeks and weeks become months. Eventually the terrain is second nature and you feel you could traverse it blindfolded as your sight is overkill for this haven you know by name, for a second it is easy to forget the helplessness and unfamiliarity once felt and downplay how much of a near magical feat the transformation from first encounter to seasoned adventurer truly is. This is the miracle that occurs every time we <strong>learn.</strong></p><p>Machine learning is no different a task as it is the endeavour of bestowing this miracle to computer programs, allowing them to start off lost and unaware and systematically become better suited at solving a class of problems without explicit instructions or commands.</p><h3>Pillars of Learning</h3><p>The field of AI training and machine learning is largely a contest of a few different ideologies and approaches to learning, each with a different purpose and different use than the other but largely serving the same purpose.</p><h4>Supervised Learning</h4><p>This is the most widespread style of programs learned and the one most people are familiar with. When big tech scrapes the internet looking for all the data they can get their hands on to train and improve their Large Language Models, supervised learning is ultimately to blame. Simply put, it involves training models on “labelled” data in an attempt to have them be able to recreate the results of the data set and generalise beyond it. Labelled in this context refers to data being a collection of inputs and expected outputs. The model is told what questions should give what answer. A large language model can be trained on human conversations and text with the goal of giving responses sufficiently close to what exists in its training data and the more ambitious but more important goal of generalising towards similar problems that it has on the whole never encountered.</p><p>Supervised learning can be seen as a “learning with a teacher” approach. The model is tested based on the questions possessed by the “teacher”, and helped by the teacher to improve in order to be better suited at solving said questions, then the model is tested again and the process repeats. Theis that acquired skills will apply to related but distinct problems it could encounter in the real world. The method by which the teacher “helps the model improve” is the crux of supervised learning approaches. It often involves the adjusting of the models parameters by gradient descent to minimise a certain cost function*. Neural Networks like Large Language Models and Image Recognition and Generation models are trained this way using labelled data of texts and images respectively to learn*.</p><ul><li><em>If all that sounds like gibberish, do not be alarmed. The key takeaway is that the teacher can use the results of a model on a given test to know exactly how to adjust the model’s “brain” to help it improve.</em></li><li><em>LLMs generally also have reinforcement learning (more on what that is later) stage after the supervised learning, but it is not wrong to call the supervised learning the core of the training.</em></li></ul><h4>Unsupervised Learning</h4><p>This is the approach that balances out the cosmic scales tipped by supervised learning, the yin to its yang if you will. Just like with supervised learning, models learn from data but use unlabelled data instead of labelled data. In a way, the model is not told what to look for and is just told to do its thing. Although it sounds like a pointless endeavour, unsupervised learning is extremely useful and serves a distinct purpose. It is often used to probe the structure inherent to data that the trainer often doesn’t know herself.</p><p>An unsupervised model could be fed data from various patients representing the symptoms they’ve shown from a disease that is as yet not well understood, hoping for the model to reveal yet unknown structure or classifications of the disease. An unsupervised model can then sort the symptoms into groups, showing that some patients’ symptoms seem to be more closely related to each other than other sets of symptoms. This could act as a lead to help classify the symptoms as different strains of a disease, drastically helping with the development time for cures or vaccines.</p><p>A similar example can involve a detective that arrives at the site of a gunfight, the site has been cleared of shells and casings of the bullets used with only the impacts from the bullets being left on the scene. An unsupervised model can be fed the dimensions of the impacts on various surfaces and allowed to do its thing. The model then shows 3 distinct groups of impact craters suggesting 3 different types of guns/bullets were used in the fight, acting as a starting point for our dear detective to search further.</p><p>Unlike supervised learning, unsupervised models do not take the standard or typical approach to learning to solve a determined problem but learn they do all the same.</p><h4>A Third</h4><p>To many, these two exhaustively describe the known paradigms of machine learning. After all, we have explored learning under and without supervision. What could be left? We have however made a subtle assumption in believing that data is needed to learn at all, just as one could be given directions on the nearest restaurant and thus come to hold that knowledge it is equally viable to walk around without a clear plan, you stumble a little, walk into dead ends, get a little lost, retrace your steps and finally happen upon your destination, not by instruction or example but by <strong>experience</strong>.</p><h4>Reinforcement Learning</h4><p>The third approach of making computer programs learn and potentially the most unique among the three is <strong>reinforcement learning</strong>.</p><p>Reinforcement learning is a different approach from both supervised and unsupervised learning where instead of being given results already observed on the problem, the “agent” is given access to an “environment”. Said agent interacts with the environment by perception and action. Basically, it can “see” the state of its environment, act to change its state, then rinse and repeat. Keeping in mind that its goal is dependent on the actions it takes, the agent learns what to do by trial and error. Every time an action is made, there is a corresponding reward associated with it communicated by the environment, and the agent acting in the pursuit of rewards achieves its goal.</p><p>Unlike supervised learning’s “learning with a teacher” approach, there is no teacher or map of what to do and not do, given by those who have done it before. Only a quantification of how good each action on their merit of achieving the goal. While a supervised learning approach will have the agent attempt to study the solution to hundreds of mazes with the hope that the skills and tricks gained will carry over to this specific maze, a reinforcement learning approach instead skips the prior knowledge of mazes and has a system inform us if any of the moves we have (forward/ backwards/ turn left/ turn right) gets us “closer”* to the exit. As you know, this information is not perfect as closer could end up leading us to a dead end, forcing us to back up and try another path or could lead us down a winding path that actually eventually takes us farther from the exit instead of closer… it is a maze after all. The only way to solve the maze will be then to stumble around a bunch and gather experience and information.</p><ul><li><em>Close in this sense refers to the physical distance between the entrance and that location, what you’d get if you used a tape to measure between them, ignoring all obstacles between them.</em></li></ul><h4><strong>Agent and Environment</strong></h4><p>The terms agent and environment in reinforcement learning jargon refer to what they sound like at first glance. An agent simply put, s the decision-making entity that learns by interacting with the environment, while the environment represents the terrain in which the agent acts. More generally, the environment is the space of all features that the agent interacts with to make a decision so an agent which is a lost traveller looking for his way back home would have the road and paths as his environment but also his mood and anxiety, while the environment in our maze problem includes the physical maze and the system that relays the closeness to the agent.</p><h4>Reward and Value</h4><p>These are the key important concepts that form the foundation of the reinforcement learning system. Reward, in this sense, refers to the specific signals the agent receives from the environment after every step. They represent the temporal and immediate gain the agent receives for the merit of the decisions made.</p><p>Value, on the other hand, takes into account the fact that the goal is not a single decision but a sequence of different decisions, all with associated rewards. Each one depends on the specific sequence of decisions taken before it. Value attempts to quantify the worth of all future rewards with a single number highlighting the worth of the goal as a whole instead of fixating on the short-term rewards. As such, maximising value is the goal of the agent regardless of the specifics of short-term profits. A decision with a high reward but low value is often passed in favour of a decision with a low reward but high value, essentially accepting short-term pain for long-term gains.</p><p>With the maze example, the rewards can be represented by how much “closer” each action takes the agent to the end of the maze, while the value is more like the expected number of steps it will take to complete the maze depending on the action taken*. In this case, it is irrelevant if a step takes the agent “closer” to the end of the maze if it will require extra steps to undo the mistake. Optimizing value takes precedence over rewards.</p><p>As you may have guessed, the value itself is not a signal from the environment as the reward is and needs to be estimated by the system. This relates to the need for experience, which is the method by which a reliable value estimation mechanism is obtained from long-term use of the reward mechanism. Value is not independent of reward since it is an estimate of cummulative rewards and thus must be learnt from reward.</p><p>Through experience, the agent realises truths and principles about the maze. Directions that lead to dead ends acquire terrible values, and continuous interactions with them only make their values worse as the terrible-ness of them as actions is <strong>reinforced </strong>upon continuous visits*.</p><p>The problem cannot be considered completely solved though as there is a cost to experience. If the goal of the agent is to complete the maze in as few steps as possible, then time spent gathering information required to build familiarity with the maze is time not being spent going directly for (your best guess of) the exit and completing the maze. Although the understanding of the maze learnt will undoubtedly help when it is time to clear the maze, it is still a cost that could potentially (but probably not) be avoided by abandoning the gathering of information and going for the long shot gamble. There is a trade-off between focus and experience, better known as a problem of exploration vs. exploitation.</p><ul><li><em>This is slightly different from the idea of value since we would like to maximize value. The value can thus be the negative of this quantity, so we retain the maximizing convention.</em></li><li><em>This is quite similar to how human beings train other non-program entities, especially those that we can not verbally communicate with. A dog trainer uses treats and punishments to encourage and cultivate specific actions from the canine by associating wanted behaviours with tasty treats, </em><strong><em>reinforcing</em></strong><em> good behaviour.</em></li></ul><h4>A Game of Chance</h4><p>What we have seen thus far may not have convinced you of the importance of reinforcement learning. Yes, we can learn a maze by experience, but there is nothing wrong in just teaching our agent what a maze is from past data, right? Who was it again that spoke about standing on the shoulders on giants?</p><p>This may make reinforcement learning seem like a gimmick without significant advantages over supervised learning, but that is absolutely not the case. When the data for the problem does not exist, is difficult to obtain, or is very heavily biased, supervised learning approaches could offer dubious if any value at all. In these cases, reinforcement learning often offers an indispensible and elegant solution to the problem at hand.</p><p>It is worth considering an example to better understand what is going on exactly. Consider six 6-sided dies that are each potentially weighted with a unique non-even probability of landing on any given number*. We (or more accurately a program) are given a simple goal; we are allowed to roll any one of the 6 dies at any one time (and change to a different die the next time if we please) and take note of the number it lands on. We repeat the process until we have successfully rolled dies 1000 times. Our goal is to maximise the sum of numbers each roll lands on. If we knew the exact way each of the dies are unfair, we could simply choose the best die* and roll that 1000 times but as is reinforcement learning tradition, we are thrown in blind without knowledge of how any of the dies are weighted…what then should be our strategy?</p><p>This problem is completely impervious to supervised learning or any similar approach as there is no existing data on any of the dies to leech off of; we cannot be taught what die to roll as the game has not been played before us, we are well and truly on our own to figure this situation out. This is an example of a <strong>multi-armed bandit problem*.</strong></p><p>A strategy to try for our die problem could be to start off by giving them each a value of 0 as we do not yet know their values*. Since all dies initially have equal value estimates, and maximizing value is our goal, there is no better decision than choosing randomly among the 6 dies. The number it lands on is then used to adjust our value estimate as it gives us more information on the die, by systematically increasing our value estimate if the number rolled is higher than our current estimate and reducing it if it is lower. The process is then repeated with the die and the maximum value chosen again (with a random die chosen in case of a tie).</p><p>Although the initial value estimations are rough and wrong, over time, the constant review of the values should result in more accurate estimates, leading us to be sure we are indeed rolling the optimal dice. There is a problem with this current implementation of the strategy, though. We will always only roll the first die we land on. After the first roll, we have value &gt; 0 and will continue to have a positive value for the remainder of the game. This will trick our strategy to believe it has found the maximum value because it relied on terrible estimates for the values of 5 dies.</p><p>This (and the multi-armed bandit family of problems in general) showcase a foundational question of reinforcement learning, the question of exploitation vs. exploration<strong>. </strong>Exploitation is the affinity to pursue the decisions that maximise value as that is the ultimately the goal but strict exploitation is counterproductive as options with seemingly terrible values may only appear so since they have a bad value estimate from underexploration. This means there may be a better value option that is never found due to over exploitation. Some amount of exploration then is the answer to the problem as a proportion of decisions have to be dedicated to not going after the seemingly best decision but instead further probing “inferior” options to increase confidence that they are in fact as terrible as they seem. This is the exploitation-exploration balance that reinforcement learning approaches are fated to attempt to strike for eternity.</p><p>Questions about what our intial value assumption should be (0 or not), how exactly we update our estimate of value, and how we strike the balance between exploration and exploitation are the thesis behind many reinforcement learning strategies.</p><ul><li><em>Essentially, each of the 6 dies is not fair and does not have the same likelihood of landing on each face. Think over the top weighted dies used in casinos in gambling movies that almost always land on 6 or something along those lines.</em></li><li><em>Best die in the sense of which die will give the highest average number upon rolling. If we rolled all 6 dies an arbitrarily large amount of times, the average roll will be different for all (3.5 for a fair die). If we knew exactly how all 6 of the dies were weighted, we could simply choose the die with the highest “expected value” and be confident it will give us the best result over 1000 rolls. Mathematicians call it the law of large numbers, I call it common sense.</em></li><li><em>The multi-armed bandit (or n-armed bandit) problem is a class of problems of n different possible options each with a distribution of possible rewards hidden from the agent with the agent trying to maximise the total rewards gained by choosing from the n options up to N amount of times (where N is a large number). The distribution of rewards in the classic form is stationery, so it doesn’t change over time. It is supposed to mirror an n-lever slot machine with a player trying to choose the best arm to pull. Our 6 dies example is an example of a 6-armed bandit problem.</em></li><li><em>Value is the long-term gain of a decision and, in this case, refers to the long-term average roll on a given die, while reward refers to any given specific roll on a given turn. As usual, chasing rewards is futile as value should be maximised.</em></li></ul><h3><strong>Conclusion</strong></h3><p>We have seen the miracle of learning and its pillars in the realm of programs, the strength of each pillar, but their limitations and thus the need for others. We attempted to explore the elegance and power of reinforcement learning, but being the servants of time that we all are, we remain unable to complete this journey.</p><p>Questions remain about the strategies and ideas that will come forth to solve these problems, and answers to the problems will come in due time.</p><p>Next time we meet, we shall explore these questions and more and see the exploits their solutions have brought to our modern world.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82321783b72b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Art of Secrecy III : A Modern Look]]></title>
            <link>https://medium.com/@monsieurblue00/the-art-of-secrecy-iii-a-modern-look-8b516ebb91c5?source=rss-b80b602722cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b516ebb91c5</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <dc:creator><![CDATA[Oluwasemilore Adelaja]]></dc:creator>
            <pubDate>Tue, 15 Jul 2025 11:57:05 GMT</pubDate>
            <atom:updated>2025-07-15T11:57:05.011Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Art of Secrecy III : A Modern Look</h3><p>We have seen the importance of encryption and the evolution of ciphers from simple algorithms like the Caesar cipher to complex mechanical devices like the Enigma, all with the singular role of protecting messages. The ciphers we have seen thus far have been less than perfect, having subtle (or not so subtle) flaws that could be exploited to break them. Cracks that made the total number of possible configurations an illusion for the true security of the encryption. A truly secure encryption will have to produce ciphertext as close to random noise without containing any semblance of information as to what the original message or the key is.</p><h3>The Modern Era</h3><p>Towards the end of the 20th century, it was already becoming clear that a new age was arriving that would be characterised by computers and their ability to connect people around the world. The problem though, was that this connectivity worked both ways, and malicious actors also had a level of power never before seen. To solve this old problem in a new skin, 2 algorithms were developed in the 1970s that to this day remain the staple of our modern world’s connectivity and security.</p><h4>One Way Functions</h4><p>For all the ciphers we have considered thus far, they had a unique property where reversing the algorithm for encryption was the way to decrypt. As long as you knew the key used for encryption, you need only invert your process to decrypt with similar computational cost. This approach was intuitive and natural, as a matter of fact it was not obvious that there was another approach of doing things but as we would soon see, leaving behind this convention unlocked new ways for encryption.</p><p>One way functions are just as the name sounds, functions that are fairly easy to carry out one way but incomparably more difficult and often impractical to invert. A classic example is multiplying 2 large numbers ; which isn’t too difficult to perform versus factorising the result into its 2 factors. The second is much more difficult as there isn’t a much better approach than just guessing and checking every number until a match is found. In essence, for large enough numbers, multiplication becomes a one-way function.</p><h4>Diffie-Hellman Key Exchange</h4><p>A perenial problem with ciphers has been the sending of keys through potentially unsecure channels as the leaking of a key to an attacker would be devasting and compromise any future message sent. Imperfect hacks have been used in the past, but all of those approaches were bound to fail in the new age of computers. Communication needed to be fast and across vast distances, any traditional approach to “securely” send a key was never going to work and it was absolutely not acceptable to send a key over the airways when anyone could be listening.</p><p>The solution to this problem was given by Whitfield Diffie and Martin Hellman in 1976 and is now referred to as the Diffie-Hellman key exchange. The core of the idea is fairly simple and can be understood apart from the mathematical computations that are leveraged to implement it in practice.</p><p>Consider 2 people Alice and Bob want to communicate a special colour* to each other that they would later use to encrypt and decrypt messages in the future (proxy for the key), neither of them can simply send a suggestion for this colour to the other as Eve (an attacker) is listening to their every communication and will find out the colour. Instead, Alice first sends Bob an intermediate colour, say blue. Naturally, Eve finds out about this, but this does not matter as this intermediate colour was designed to be public anyway. Once Bob receives this colour, both Alice and Bob come up with private colours say (red for Alice and yellow and Bob). They don’t send these colours to each other but instead mix the colour with the publicly known blue and send the result to the other. Alice receives a mixture of yellow and blue (green) from Bob, and Bob receives a mixture of red and blue (purple) from Alice. They can now both add the received colour to their own private colour and each get the mixture of all three colours (brown). They have been able to both end up with a copy of a secret key without sending it directly to each other. To make sure this works, we must check in with Eve, who now has blue, which she initially listened for, and green and purple. She does not have the colour brown though which is the key and if we assume that unmixing the colours green and purple is impractical (if we take mixing of colours to be a one way function) then Eve has no way of arriving at brown. Alice and Bob have been able to agree on a key without a perfect snooper Eve being able to figure out what the key is.</p><p>As seen, the resulting key is known by either participant before the communication but emerges as a result of the key exchange. This doesn’t matter as any key should work for encryption as long as it is sufficiently random and secret.</p><ul><li><em>I use the word “colour” specifically to refer to pigment in this section so the colours add like mixing paint.</em></li></ul><h4>RSA</h4><p>The second algorithm is a way of actually encrypting messages (which the Diffie-Hellman key exchange does not give us). The RSA encryption, named after the last names of its creators Ron Rivest, Adi Shamir, and Leonard Adleman, is the first asymmetric encryption algorithm we encounter. It is asymmetric in the sense that different keys are required to encrypt and decrypt. This seems peculiar if not impossible as it is unclear how to construct such an algorithm.</p><p>James Ellis, the mathematician who first conceived the idea of asymmetric encryption, envisioned it like a lock that the sender opens and sends but keeps the key for. Any receiever can use the lock on a message before sending it back, knowing that only the sender who has the key can open the lock.</p><p>This approach was an attempt to solve a big problem with traditional encryption approaches that remained unsolved by encryptions that relied on the Diffie-Hellman key exchange. Although the key exchange was able to generate keys for every pair of sender / recipient, every new pair required the generation of a new key. This meant that computers had to generate and store hundreds or thousands of keys depending on how many people it needed to communicate with securely. This was a bulky and inefficient approach that the RSA encryption fixed, with the bonus of being an especially difficult to crack encryption algorithm. In order to avoid getting lost in the mathematics, we just like before, aim to understand the core of the idea separate from the mathematical computations it is implemented by in practice (at first).</p><p>Alice, Bob, and Eve have access to a powerful colour* generating machine. The machine is able to generate random colours in complementary pairs, such that they add together to give white. That is all this machine can do, and it is unable to give the complement of a colour it is given or anything of sort. There are also essentially an infinite amount of colour pairs it can produce and is thus incredibly unlikely to produce the same colour pair twice ever. Alice uses this machine to generate a colour pair, keeps one as her private colour, and announces the second to the world to have. When Bob tries to send her a colour (a message), he first adds it to her publicly known colour and sends her (and Eve) the resulting colour. Alice easily recovers the original colour Bob meant to send by adding her private colour to the resulting message. Since her private colour is a complement of her public colour, it “cancels” out her public colour from the cipher, leaving only the colour originally with Bob. Eve, having only the public colour and the colour sent out by Bob, is unable to retrieve the original as both finding the complement given the public colour and unmixing the colour sent by Bob are one way functions. Thus, despite listening in on the communication, Eve is unable to figure out the original colour.</p><p>It is worth understanding the principle behind how the RSA encryption is implemented in practice. Each person generates 2 large prime numbers p and q that are hundreds of digits long. How they generate these prime numbers, we will get to later. They multiply both prime numbers (a fairly computationally cheap process) and keep the result N. This product N alongside a small-ish number e chosen form the public key (N, e). p and q are also used to generate* another number d, which serves as the private key the user does not show to anyone. Any person who wants to send a message encrypts the message using the public key, but only the private key can be used to decrypt. Any malicious attacker attempting to break the cipher will need the private key. It is unclear how to get from N to d without first factorising N and generating d from there. The problem for the attacker is that multiplying N is a one way function and thus factorising N is a tedious and impractical process as there is no method much better than guessing numbers and checking if they can divide N — a fool’s errand since the factors are hundreds of digits long.</p><ul><li><em>I use the word “colour” in this section to refer to light, which allows for the idea of complementary colours that add to give white.</em></li><li><em>The method by which p and q generate the number d is a little involved, but the key takeaway is that it is a fairly computationally cheap method to arrive at both N and d from p and q.</em></li></ul><h4><strong>Prime Generation</strong></h4><p>The astute among us have noticed that the implementation of the RSA involves the generation of prime numbers hundreds of digits long. This clearly appears to be a very tedious process as prime numbers are famously difficult to predict and it generally require exhaustively showing that a number has no factors to be absolutely sure it is prime — impractical for numbers hundreds of digits long.</p><p>This would be a problem except for an interesting maths discovery. In 1640, mathematician Pierre de Fermat stated his “little theorem” which gave a test for how to check if a number was “likely” prime. As good as the test was, it had a tendency to give false positives known as Fermat pseudoprimes or <strong>Carmichael numbers</strong>. The test was improved upon by Gary L. Miller and Michael O. Rabin giving us the Miller–Rabin primality test in 1980. This was a probabilistic test that could be carried on a number to check if it was prime. A prime number would never fail the test, but a composite (non prime) had a small probability* of passing. The test could thus be carried on a number over and over as many times as needed to reach a high level of confidence that it was prime, since it was vanishingly unlikely that a composite number could pose as prime indefinitely.</p><p>The generation of a prime number was thus straightforward; generate a random large number, carry out the Miller-Rabin test a certain amount of times, if it passes everytime it is almost certainly prime and if it fails at any point you can discard it and generate another random number until one hits.</p><ul><li><em>The Miller-Rabin test actually gave a less than 25% chance for a composite number to pass the test. Since the test can be carried out essentially as many times with independent results every time, there was only a less than 1 in 1 million chance (1/4)¹⁰ a composite number could pass the test 10 times in a row and less than 1 in 1 quintillion chance a composite number could pass the test 30 times in a row.</em></li></ul><h4>Modular Arithmetic</h4><p>The computation behind these powerful algorithms and tests has been left unexplained so far, but for the sake of “completeness” we take a look behind the hood at the mathematical machinery that makes all of them possible.</p><p>Modular arithmetics is a branch of mathematics concerned with the remainder left over after performing basic arithmetic operations (like addition, multiplication, or exponentiation), then dividing by a number N called the modulus. It turns out it gives a simple framework for constructing one-way functions.</p><blockquote>x^a = y mod N</blockquote><p>Above is the classic exponentiation of a number mod another. This is essentially the workhorse of all the algorithms discussed thus far as it is simple to find the y given x (assuming the a and N are public) but often impractical to compute x given y. By specially choosing the a and N used and leveraging other known ideas from the number theorem, algorithms like Diffie-Hellman key exchange, RSA encryption, and Miller-Rabin primality test are derived.</p><h4>The Modern Bombe</h4><p>Just like with the Enigma machine of the past, the RSA encryption protocol is thought to be (and is generally) extremely difficult to crack. Statistical approaches are useless as the cipher is random by any metric. The only way to break an RSA encryption outside of the user leaking her private key it seems is to factorise the integer N, and that will take an ungodly impractical amount of time? Well, yes, using any known algorithm on a classical computer*, factorising a large number appears to be a fruitless endeavour… but what if you do not use a “classical” computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*uvGALPaoIoNrsBrfOsiM7A.webp" /><figcaption>IBM Q Sytem One Quantum Computer</figcaption></figure><p>Starting in the 20th century, scientists started coming up with theoretical frameworks for a machine that leveraged quantum phenomena to operate. This <strong>quantum computer </strong>running on <strong>qubits*</strong> instead of bits will operate using complex quantum effects and phenomenon to solve problems in ways that regular classical computers never could, and it was possible to come up with algorithms for these devices long before they could even be physically built.</p><p>The quantum computer differed fundamentally from classical computers because of something called a superposition. In essence unlike a classical computer that gives a single result for a single input (say 26*2 = 676), a quantum computer instead took in a superposition as an input and a superposition as an output. It essentially got a combination of all possible inputs that could be represented by the amount of qubits and gave a combination of all possible solutions as an output. Instead of computing 26² it computed all numbers (expressible by the available qubits so (2^n)-1 where n is the number of qubits) raised to the second power all at once and gave a combination of all results. This sounds like extremely powerful, impossibly powerful even, but there was a catch. When the result was measured, a random output of the combination was shown, and the superposition was destroyed. So, even if you could compute the result for all possible inputs, you’d only get a random useless output.</p><p>This made quantum computers much more useless in practice than classical computers despite their almost magical abilities, but humans are not anything if not stubborn and were able to find quantum algorithms that solved very specific problems. Because of the innately “parallel” approach quantum computers used, quantum algorithms to problems were often far faster than classical computers for problems they could solve. One of those problems just happened to be fairly familiar.</p><p>In 1994, Peter Shor came up with a quantum algorithm now known as <strong>Shor’s algorithm</strong> that could quickly factorise large numbers, of the kind used in RSA and effectively render the algorithm useless. It brought the amount of time needed to factorise the large number from about billions of years using current techniques to maybe a few hours on a quantum computer.</p><p>The writing was on the wall. Even if fully functioning quantum computers were in the distant future (as they still are), obtaining one in an RSA world would effectively kill security as we know it.</p><ul><li><em>A classical computer is essentially any computer you are familiar with using, that uses bits as it smallest unit for operation. So your phone, laptop, desktop, smart tv, smart fridge, all classical computers.</em></li><li><em>Qubits are the quantum analog of classical bits, able to hold a 0 or 1 but as a superposition of both. Qubits can also become “entangled” with other qubits and effectively hold a combination (or superposition) of any of the possible values they can hold together. For example 8 bits can store any number from 0 to 127 so 8 qubits together are in a combination of 0, 1, 2, up till 127 and will give a random result from this when “measured”.</em></li></ul><h4>The Present and Future</h4><p>The world we live in today is unable to function without encryption as every mundane internet activities like sending emails or online payments done over public networks need be encrypted, with a lot of it done using RSA encryption and the ones that do not probably use a Deffie-Hellman key exchange as part of their protocol.</p><p>Although only RSA was spoken on indept, other algorithms exist in use today like ECDSA, AES, and SHA with varying resistance to the quantum threat.</p><p>For the sake of the future of security, new encryption of the future have been developed that are designed to be resistant to quantum computers and have gradually been implemented into modern cryptography hopefully to have become the new standard before the quantum computing revolution is fully upon us.</p><p>We have gone through the evolution of ciphers and encryption from ancient times to the present day and seen a glimpse of how like times before, encryption methods became obselete and gave way for the ciphers of the future.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b516ebb91c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>