Arpit Mishra

Author
Arpit Mishra

Blogs
From dorm rooms to boardrooms, Arpit has built a career connecting young talent to opportunity. Their writing brings fresh, student-centric views on tech hiring and early careers.
author’s Articles

Insights & Stories by Arpit Mishra

Arpit Mishra explores what today’s grads want from work—and how recruiters can meet them halfway. Expect a mix of optimism, strategy, and sharp tips.
Clear all
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Filter
Filter

Elo rating system: Common link between Facemash and chess!



Remember the scene from the Facebook movie, The Social Network where Mark Zuckerberg, while creating “Facemash” (the earlier version of Facebook), tells Eduardo Saverin, "I need the algorithm you used to rank chess players” who then writes an equation on the glass panel?

That equation is called the Elo rating or Elo rating system, named after its creator Arpad Elo. This rating system is used to rate the skills of the players in competitor-versus-competitor games like chess, football, baseball, and American football.

Elo believed in the following:

  1. Performance of each player in a game is a normal distribution of random variables
  2. The mean value of players irrespective of their performance in an individual game increases slowly.

Initially invented as a rating system for chess players, Elo is now used as a fundamental rating system in most video games, snooker, scrabble, etc.


Elo rating system explained -

This system is used to determine the output of a game by using a player’s Elo rating. It is all based on probability. Players with a higher Elo rating have a higher probability of winning a game than players with a lower Elo rating.

After the game, the winner takes points from the loser, thereby increasing his rating.

If a high-rated player wins, only a few points will be transferred from the lower rated player. However, if the lower rated player pulls off an upset win, then the number of points that are taken by the player with the lower rating is far greater. (Sounds unfair, doesn’t it?)


Elo rating system equation explanation -

Let's take a look at the Elo rating equation.

Elo rating equation

Elo rating equation

calc = (1.0 / (1.0 + pow(10, ((rating_2 - rating_1) / 400))));

In this equation, RA and RB stand for the current Elo ratings of a player.

In real-world competitive gaming, a player has a probability of winning, losing, and drawing a match. So when a player has a score of 0.64, the probability of winning, losing, and drawing is 64%, 26%, and 0%, respectively.

After the match, if a player’s match score exceeds his predicted score, then the player’s Elo rating is updated. Similarly, when a player’s match score falls short of the expected score, then the player’s rating is adjusted downward.

Assume that a player is required to score EA during a tournament but scores SA, then the player’s rating is updated by using the following formula:

Elo rating formula

calc = (rating + kfactor * (actual - expected));

K is known as "K factor". It is a measure of how strongly a match will influence a player rating. If K is of a lower value, then the rating is changed by a small fraction but if K is of a higher value, then the changes in the rating are significant. Different organizations use different K factors; there is no universal value defined for it.

Pseudo code for the Elo rating system

import math;

class elo_core:
    def getExpectation(rating_1, rating_2):
        calc = (1.0 / (1.0 + pow(10, ((rating_2 - rating_1) / 400))));
        return calc;

    def modifyRating(rating, expected, actual, kfactor):
        calc = (rating + kfactor * (actual - expected));
        return calc;
    

Elo rating system example -

Assume that Garry Kasparov has a rating of 2500 and Vishwanathan Anand has a rating of 2200.

Their expected scores are:

  • If Garry Kasparov (wins) = 1 / (1 + 10 ^ ((2200 - 2500)/400)) = 0.849
  • If Vishwanathan Anand (wins) = 1 / (1 + 10 ^ ((2500 - 2200)/400)) = 0.151

Now believe that the Federation has decided that the value of K is 24.

The new ratings of the players are as follows:

If Garry Kasparov wins
  • Garry Kasparov = 2500 + 24 * (1 - 0.849) = 2503
  • Vishwanathan Anand = 2200 + 24 * (0 - 0.151) = 2196
If Vishwanathan Anand wins
  • Garry Kasparov = 2500 + 24 * (0 - 0.849) = 2479
  • Vishwanathan Anand = 2200 + 24 * (1 - 0.151) = 2220

Since Garry Kasparov (with a better rating) is the favorite, his win did not change the rating drastically. However, if the underdog, who in this case is Vishwanathan Anand wins, the ratings change drastically.

This is why in a cricket series between India and Zimbabwe, when Zimbabwe (with a lower rating) beats India, its rating changes quickly and it moves up the table. However, if India wins there is hardly any change in its ranking (Though ICC uses a modified

5 medical algorithms that are transforming the healthcare industry

This post focuses on the impact that medical algorithms have in the field of healthcare where you must be 100% right at all times. There is no room for errors because even the trivial errors can create a major impact. However, even the smartest and best-trained professionals are prone to errors. Tragedies due to human error are common in the medical industry.

Today, by using algorithms, doctors and care providers are able to determine exactly where to point the lasers for maximum impact with minimum collateral damage. Algorithms and genetic algorithms have made the way we treat patients more effective.

Here we list medical algorithms used in the healthcare industry:

  • Sampling
  • Fourier transform
  • Probabilistic data-matching
  • Proportional integral derivative
  • Predictive algorithm

Algorithms play a major role in the area of medical technology from large equipment to simple microcontrollers. Let’s look at the top algorithms that are used in the medical industry.

Sampling

The medical industry generates large amounts of data, which must be mined and sorted. Some facts include:

  • Every year, almost a million medical studies are published.
  • Additionally, 150,000 cancer-related studies are published annually.

The human brain is brilliant, but it has limits in processing. Computers help increase the number of lives saved by leveraging sampling algorithms in cognitive medical systems like IBM Watson Health.

IBM Watson Health uses AI and ML to infer treatment insights from patient data using sampling algorithms. Sampling involves selecting a few items from a large population for study. Techniques include:

Sampling methods
  • Simple random sampling: Randomly selects members, each having equal probability.
  • Systematic sampling: Selects members at a fixed interval from a random starting point.
  • Stratified sampling: Divides population into groups (strata) and samples from each.
  • Clustering sampling: Divides large groups into smaller natural groups and applies sampling.

Fourier Transform

Fourier Transform is used in numerous medical imaging techniques like MRIs and ultrasounds. It breaks signals into sinusoidal components for analysis and reconstruction.

It transforms signals from the time domain into the frequency domain and back. This helps isolate and interpret components of a signal for accurate image construction.

How MRI uses Fourier Transform:

MRI relies on water molecules in the body which respond to magnetic fields. The signals measured during scanning are a combination of sine waves. Fourier Transform decodes these into usable images.

Without Fourier Transform, modern imaging techniques would not be possible.

Probabilistic Data-Matching

This algorithm compares patient data against large databases to find the most likely matches, helping doctors make more informed diagnoses.

Probabilistic Data Matching

Probabilistic algorithms like Naive Bayes Classifier and PAIRS (Physician Assistant AI System) are commonly used to assist in accurate medical diagnosis.

Proportional Integral Derivative (PID)

PID is a feedback mechanism used in medical devices. For example, in Alabama Hospital, it helps manage blood pressure post-surgery by automatically adjusting medication levels.

PID Controller

PID works by reducing the difference between a desired outcome and the measured result using present, past, and predicted error values.

Predictive Algorithm

Predictive algorithms use historical and real-time data to forecast future medical events like cardiac arrests.

Predictive Algorithm Example

Examples include:

  • Time Series algorithm
  • Regression algorithm
  • Association algorithm
  • Clustering algorithm
  • Decision Tree algorithm

Predictive analytics helps doctors anticipate health conditions early and recommend preventive steps.

As algorithms grow in intelligence, they will play an even bigger role in healthcare. Doctors will consult with algorithms to provide precise, predictive care.

Want to learn more about algorithms?

Read how Mark Zuckerberg used the Elo Rating Algorithm in Facemash: Elo Algorithm: Common link between Facemash and Chess

What is an Algorithm and How It Shape Our World?

"For someone who doesn't watch many matches, Elihu Feustel makes a million dollars by winning bets simply by using algorithms"

Algorithms have revolutionized our world as we know it.

Today, a lot of things come to us a lot more easily than before. We have moved forward from the age of waiting to hear our favorite song on the FM radio and recording it on a cassette. Now, we visit YouTube to play your favorite song. It miraculously recommends all your favorite songs in the auto playlist.

When you visit IMDB’s website, it suggests the most relevant movies every time. When you Google something, you see the most relevant information on the first page. Have you ever wondered how each website knows exactly what to show you?

Algorithms.

We have advanced so much that we can create a painting that one cannot distinguish from the works of an artist who died in 1669!

We are talking about the new 3D-printed Rembrandt painting. Developers created an algorithm to collect data from portraits painted by Rembrandt. This data was then used to create a new 3D-printed painting, which took over 500 hours of rendering.

What is an algorithm?

“A process or set of rules followed in calculations or other problem-solving operations, especially by a computer”. At the simplest level, it is a procedure for accomplishing a task or solving the problem.

How algorithms shape our world every day

Algorithms are everywhere—sports, computer gaming, finance etc. Let us take a look at a few examples.

Healthcare: Algorithms help in areas where healthcare had no effective treatment. From matching appropriate organs to mining data for matching symptoms. They complement some of the most proficient doctors across the globe.

In 2013, 4500 former footballers filed lawsuits against the NFL for concussion-related injuries. This issue came into the limelight when Hall of Famer, nine-time Pro Bowler, Mike Webster and a few other players were diagnosed with Chronic Traumatic Encephalopathy (CTE). The effects of repeated blows to the head cause CTE. Head injuries in sports like American football

1.6 to 3.8 million sports-related concussions occur annually in the United States. To this day, there are no effective tests/scans to detect this disorder. Sanford Health studied common symptoms of the disorder and developed a concussion-evaluation algorithm, which detects the signs and symptoms of CTE. Now, because of timely treatment and precautions, the effects of concussions are prevented in more players. Until an effective test or scan is developed, algorithms are the answer to detecting CTE in time.

Sports: The sports industry today is the result of what has moved from intuition to statistics. It is a big game of algorithms from the Duckworth-Lewis method in cricket to the ranking players by using the Elo rating in the game of chess.

Algorithms also dominate the world of sports betting. So when you see weird numbers like 12/25 for ManU and 17/25 for Arsenal, you can rest assured that they are correct. The complex mathematical concept of the Poisson distribution equation is the foundation to the sports betting. This concept is used to generate numbers in sports betting.

Let’s take the example of Elihu Feustel, who makes almost a million dollars a day by betting on tennis. You would think that he would recognize Serena Williams if he passed by her on the street. However, this isn’t the case, he neither recognizes any of the famous tennis players nor does he know their playing styles etc. So, just how does he know who to bet on? He relies on a big data model that the live betting market uses. This algorithm collects data from existing (almost 260,000) matches. This data is then manipulated to allow users to determine which player/match they should bet on.

It seems like it’s all out of this world, right?

Gaming: It's amazing how videos and computer games have evolved over the last 2 decades. We started with DOS games, Super Mario, Pac-Man, and went on to highly-advanced games like Need for Speed, Counter-Strike, and DotA.

The games are now getting more realistic, with life-like surroundings, smarter and scarier anti-heroes. There is an increased advancement in Augmented Reality (AR) and Virtual Reality (VR) technologies. We are now developing techniques to bring in games that require player involvement at an epidemic rate. This has led to the development of algorithms that are highly complex in nature to create complex games.

Finance: The financial world has not remained untouched by algorithms. Like the Rothschild

'Algorithms' - A word used by programmers when they do not want to explain what they did.

pigeon story of 1815

Helped Rothschild build a financial empire that’s going strong even today, the prediction in the field of finance needs to be quick and accurate. Black Box trading uses advanced and complex mathematical models to figure trading strategies for the most ideal returns. In stock markets, you have to make quick decisions. By 2011, algorithms governed 70% of the US stock market.

There is no doubt that irrespective of the field that you choose, algorithms have a strong influence on our lives and they are changing our world.

Soon there is a possibility that algorithms will take over most of the tasks done by human beings. This could lead to the creation of mundane jobs, which algorithms cannot do, such as stocking bottles, collecting blood samples, and other work that requires physical effort.

Until then, put your algorithm skills to test with these programming challenges.