AI and Machine Learning with Real Life Examples

Robert Keith Rippetoe
7 min readApr 30, 2024

--

“Machine intelligence is the last invention that humanity will ever need to make.” ~Nick Bostrom

Artificial Intelligence and Machine Learning are some of the most popular fields of discussion thanks to popular new innovations like ChatGPT being able to write an essay on your behalf and Boston Dynamics creating reinforcement-learning robotic canines. Creating discrepancies between them is thus increasingly more important to differentiate between the wildly different projects that still technically fall inside of the massive umbrella that is Artificial Intelligence. With some real life examples, we can demonstrate many different nuances and details that explain higher level AI concepts.

Machine Learning

Machine learning is probably what most people think of when the words “Artificial intelligence” are mentioned. Machine learning is divided between three main categories, but all share the commonality that they to some extent program themselves without explicit external input. By feeding data into a machine learning model, we allow the computers themselves to write their own algorithms that will make the best predictions to future inputs. Most models will follow a distinct training stage before being deployed, using large amounts of training data that mimics the types of inputs it is expected to handle after deployment.

Supervised Learning Example: Ad Recommendation Engine

The key distinction of supervised learning is that it incorporates labeled training data from an external source to classify inputs and/or outputs to the training model. Because the training data is labeled, the model created tends to be more accurate since it can compare its own determinations to the labeled data. The closer the observations made by the model come to the labels given, the more accurate the model. To describe the distance between the model’s predictions and theoretical correct observations, a cost function is defined that describes how far the model is from hypothetical perfection. Supervised learning is by far the most profitable division of machine learning, as it can be used to calculate and predict user or consumer actions and improve ad recommendations.

A real life example of this type of machine learning is in any modern online advertisement system, such as Meta (Facebook) Ads, Google Adsense, or Amazon item recommendations. These models are trained by their respective corporations using their extensive collections of consumer data to make recommendations for products that are custom suited to the history of the consumer using their software. If you are browsing the internet and receive ads that might seem too accurate, you might be on the receiving end of the output of a supervised learning model!

Unsupervised Learning Example: Cybersecurity Threat Detection

Unsupervised learning uses a very similar model to supervised learning, except that the data used has no labeling to assist the training of the machine learning model. This has both benefits and detriments, allowing for models that can handle more complex or obtuse inputs without extensive labeling but also creating less predictable results.

You might be surprised to learn that some cybersecurity threat detection systems use unsupervised learning to identify and react to anomalies in user behavior that can be difficult to classify and explain manually. There also exists the model of semi-supervised learning, that uses a hybrid of both labeled and unlabeled data, balancing the strengths of both systems to address use cases that fall between the two extremes.

Reinforcement Learning Example: Stock Trading

While both supervised and unsupervised learning have clearly defined training periods before being deployed, reinforcement learning mainly sets itself apart by also actively training itself during deployment. The model assigns itself scores that determine whether an action was detrimental or beneficial to its performance, and will use trial and error to determine how it should act to reap the greatest rewards while enduring the most minimal risk. This adds complexity to the model, but also allows it to take in feedback and make long term decisions in highly chaotic environments.

A stock market trading algorithm could use reinforcement learning to utilize small “test run” observations to test the stock market before making larger bets with greater expected returns. Acting in real time would be a huge advantage in such a situation, as the most effective approach may only be determined using recent real time inputs.

All Machine Learning is AI, All AI is not Machine Learning

Artificial intelligence is an incredibly broad field, and includes much more than just machine learning inside of its definition. AI is so broadly defined that it includes any machine which exhibits intelligence, with “intelligence” usually being portrayed as a type of coherent thought structure that a human or animal would be capable of. Because of this rather generous definition, it becomes no wonder that it seems like so many modern projects can claim to be powered by AI.

AI but not ML Example 1: Deep Blue — Evaluation Function

Machine Learning puts an emphasis on training models and continual improvements using input data, but some of the most iconic projects in the field were very complex yet untrained programs. Deep Blue, the chess computer that defeated Kasparov in its historic 1997 rematch, did not use any machine learning algorithms and yet is a symbol of the historic shift towards increasingly intelligent machines. Deep Blue itself can best be categorized as an evaluation function, taking in a large set of parameters as an input and then calculating the best outcome to return as an output. Using this evaluation function repeatedly, Deep Blue demonstrated that it could best any human on the planet in terms of intellect (as long as it was a very narrowly defined and deterministic ruleset). While we now have problems far more complex and less defined being tackled by computers rather than a chess game, it is important to remember that even over 25 years ago computers demonstrated capabilities in some way superior to humanity.

AI but not ML Example 2: Boston Dynamics Atlas — Robotics / Control Systems

Robotics is the poster child of artificial intelligence, with the iconic images of the Terminator and C3PO dominating popular culture. Yet even these machines, which very well may introduce machine learning to some extent, do not necessarily have to use these algorithms to perform their human-like tasks of grabbing objects or maneuvering through obstacles. Instead, control systems dictate an ideal state that actuators and motors incrementally move towards until an ideal state is realized. A robot dancing to “Do You Love Me” in this case is actually a programmed series of predetermined positions that the robot moves to match, with the positions in between created by the movement necessary to realize each new state. Could a humanoid robot like Atlas take in data through a series of images, and use this as a training set to teach itself to dance? Yes, but it would be a wildly more difficult task. As previously mentioned, some of the most advanced robots created by Boston Dynamics use reinforcement learning, but this can be considered more complimentary than required.

AI but not ML Example 3: Axelrod’s Prisoner Dilemma — Game Theory

Robert Axelrod in 1980 hosted a novel type of tournament at the University of Michigan where competitors could enter different algorithms to compete in the famous Prisoner’s Dilemma game against other algorithms. The most effective algorithm, “Tit-for-Tat” opened with cooperation before mimicking exactly the move committed by its opponent in the previous round. Some of these algorithms were so simple that every round they would execute the exact same action of either cooperating or defecting against their opponent every round they played. Even these programs which may be only a single line of code can be considered, in a sense, artificial intelligence. They mimic the actions and strategies in the same way a human does, even if the action performed itself is trivial. “It’s part of the history of the field of artificial intelligence that every time somebody figured out how to make a computer do something — play good checkers, solve simple but relatively informal problems — there was a chorus of critics to say, ‘that’s not thinking’.” — Pamela McCorduck

Hopefully this has brought clarity to the distinctions and boundaries between the many different types of AI projects that exist in the modern landscape. By defining how these terms and models exist, we allow ourselves to move beyond buzzwords and make our own determinations about the intelligence we see in an increasing amount of our daily lives. If you have questions or concerns about this article, please feel free to contact me at https://www.linkedin.com/in/robertkeithrippetoe/!

--

--

Robert Keith Rippetoe
Robert Keith Rippetoe

Written by Robert Keith Rippetoe

Software Engineer with an emphasis on cloud infrastructure, devops, and site reliability.

No responses yet