Last updated: August 5, 2026, 8:49 PM
Un-tit-led

Elements of AI Course

Part of learning is making mistakes and learning from them:

Chapter 1.

How should we define AI

AI in self-driving cars: Humans will move to supervisory role.
AI in Content Recommendation: Filter bubbles, echo chambers, troll factories, fake news and new forms of propaganda.
AI in Media Processing: Seeing on a display is no longer believing.

What is and isn't AI:

AI - Autonomy and Adaptivity:
Autonomy:- Perform tasks in complex environment without constant guidance by a user.
Adaptivity:- Improve performance by learning from experience.

Suitcase words: - term that carry a whole bunch of different meanings that come along even if we intend only one of them. Using suitcase words increases the risk of misinterpretations like saying a computer system understand image because it is able to segment an image into distinct objects like cars, pedestrians, buildings, roads and so on but if the person is wearing a photo of a road printed on it, it's not okay to drive over that person.

Different AI systems cannot be compared to a single axis or dimension in terms of their intelligence. AI intelligence is narrow. Being able to solve one problem tells us nothing about the ability to solve another, different problem.

AI is a scientific discipline like mathematics or biology. AI is a collection of concepts, problems, and methods for solving them. "AI" is not a countable noun.

It's better to talk about AIness instead of whether something is AI or not. Say an AI method instead of an AI.

II

Related fields

CS>AI>Machine Learning>Deep Learning
Machine learning: Systems that improve their performance in a given task with more and more experience or data.
"Depth" of Deep learning refers to the complexity of a mathematical model, and that the increased computing power of modern computers has allowed researchers to increase their complexity to reach levels that are quantitatively and qualitatively different.

Science often involves a number of progressively more special subfields, subfields of subfields, and so on. This enables researchers to zoom into particular topic to follow up with the increasing amount of knowledge, produce new and correct old knowledge.

Data Science: Covers several sub-disciplines that include machine learning and statistics, certain aspects of computer science including algorithms, data storage, and web application development. It also requires understanding of the domain in which it is applied in, basic assumptions and constraints.

Robotics: Building and Programming Robots so they can operate in complex, real-world scenarios. Robotics is the ultimate challenge of AI.
Many of the robotics-related AI problems are best approached by machine learning which makes machine learning a central branch of AI for robots.

Robot: Machine comprising of sensors and actuators (act on the environment) that can be programmed to perform a sequence of actions.

Any kind of vehicle with some level of autonomy and sensors and actuators are counted as robotics. However, software-based solutions such as customer service chatbot even if they are called "software robots" aren't counted as (real) robotics.

Taxonomy is a scheme for classifying many things that may be special cases with one another(think of concentric circles).

III

philosophy of AI

Turing Test: A human can't distinguish between an AI and a real human.

A few chatbots have already passed this test to some extent. One criticism is that the computer doesn't actually have to be intelligent but just behaves like a human or "appears" intelligent.

Chinese Room problem by John Searle: A non-chinese speaking person is locked in a room with a manual on what to respond to chinese phrases and does so.
The person inside(algorithm) doesn't actually know chinese even if the person outside the room gets the impression it is so.

Even if a machine behaves in an intelligent manner(conscious), by passing the turing test, it doesn't follow that it has a mind in the way that a human has.

A self-driving car is an example of an element of intelligence(driving a car). Chinese Room Argument suggests it isn't really intelligent thinking but it just looks like one.
This automated car doesn't see or understand the environments, and it doesn't know how to drive safely, in the way a human being does.

According to Searle this means that the intelligent behavior of the system is fundamentally different from actually being intelligent.

Strong vs. Weak AI: Being intelligent and acting intelligently. Strong AI is a mind that is genuinely intelligent and self-conscious. Weak AI is what we actually have, namely systems that exhibit intelligent behaviors despite being "mere" computers.

Just like no one gives two shits about science philosophy in science research, AI philosophies won't matter.

AGI(artificial General Intelligence) a machine that can handle any intellectual task, whereas a narrow AI is that handles just one task.

AGI has been abandoned by the AI researchers.

Chapter 2.

AI problem Solving

Search algorithms don't feel cool but they can be used to solve tasks that require intelligence like navigation and playing chess.

I. Search and problem solving

  • State Space: Set of possible solutions.
  • Transitions: Possible Moves between one state and another.
    Note: Sequence of multiple transitions is a path.
  • Costs: Prefer cheaper transitions, and not always in terms of money.

II. Solving problems with AI

  • "Anything that can be computed(=calculated using either numbers or symbols) can be automated."
    - Alan Turing Insight
  • Any intelligence can be broken down into small steps so that each step is so "mechanical" that it can be written down as a computer program.
    - John McCarthy - Father of AI.
    That' statement is still a conjecture, which means we can't really prove it to be true.
  • McCarthy wanted to bypass Searle's Chinese Room: intelligence is intelligence even if the system that implements it is just a computer that mechanically follows a program.
  • Games provided a convenient restricted domain that could be formalized easily. That's why games and search became central in AI research.

    III. Search and games
  • Different state of a game are represented by nodes in a game tree.
  • if the next level is going to be a single outcome we can pull that outcome a level up. Sounds pretty logical.
  • Also if all the outcomes of the deeper level is going to be the same we can give that level the same outcome as the deeper levels as long as they are all the same.
  • Careful about who turn it is, Min or Max. That determines the actual value assigned. It's not always 50-50 as min wants to minimize and max wants to maximize.
  • One of the assumption is that both players choose what is best for them and that what is best for one is the worst for the other(so called "zero-sum game")
  • The Minimax algorithm:
    A minimax algorithm[5] is a recursive algorithm for choosing the next move in an n-player game, usually a two-player game. A value is associated with each position or state of the game. This value is computed by means of a position evaluation function and it indicates how good it would be for a player to reach that position. The player then makes the move that maximizes the minimum value of the position resulting from the opponent's possible following moves. If it is A's turn to move, A gives a value to each of their legal moves.
  • If we can afford to only explore a small part of a game tree, we need a way to stop the minimax algorithm before reaching an end-nod. This is achieved by heuristic(useful although not optimal) evaluation function.
  • The limitations of plain search:
    • The number of states even in moderately complex real-world grows out of hand and we can't find a solution by exhaustive search("brute force") or even by using clever heuristics.
    • Transitions are not always deterministic. There are factors outside our control that are often unknown to us.

Chapter 3.

Real world AI

The reason why modern AI methods actually work in the real world now is the ability to deal with uncertainty.

    I. Odds and probability
  • Noise: Inherent errors in sensor data.
  • Fuzzy logic was for a while the best approach to handle uncertain and imprecise information and used. However, probability turned out to be the best approach for reasoning under uncertainty.
    Currently almost all AI applications are based to some degree on probabilities.
  • Probability: Ability to think of uncertainty as a thing that can be quantified at least in principle.
  • It is usually not possible to draw conclusions about whether a particular number was right or wrong based on a single observation.
  • Uncertainty is not beyond the scope of rational thinking and discussion, and probability provides a systematics way of doing just that.
  • In gambling terms, the odds are given from the bookmakers point of view so 3:1 is your chances of winning are 1:3, or three odds to one in gambling terms.
  • It has been found that people make more mistakes with percentages than natural frequencies or odds.
  • Odds 1:5 mean you'd have to play the game 1+5=6 times to get one win on the average.
    The probability 20% means that you'd have to play the game five times to get one win on average.
    II. The Bayes rule
  • posterior odds = likelihood ratio x prior odds
  • Purpose of the formula is to update the odds when new information becomes available, to obtain the posterior("post") odds.
  • Likelihood Ratio: Probability of the observation in case the even of interest, divided by the one of no event.
  • Base Rate Fallacy: Our intuition is not well geared towards weighing different pieces of evidence. This is true especially when the pieces of evidence conflict with each other.
    Our brain tends to choose one of these pieces of evidence and ignore the other. It is typically the low base rate that is ignored.
    Knowing the Bayes rule is the best cure against it.
    III. Naive Bayes classification
  • The Bayes classifier is a machine learning technique to classify objects into two or more classes.
    The classifier is trained by analyzing a set of training data, for which the correct classes are given.
    The naive Bayes classifier can be used to determine the probabilities of the classes given a number of different observations.
  • spam(or "junk email") vs. ham("legitimate message")
  • naive: Using spam as example: The dependency of words and the order of the words have no significance. That is each word can be processed independently.
  • "All models are wrong, but some are useful"
    - George E.P. Box
  • One problem with estimating probabilities directly from counts is getting 0/0. Instead use a small lower bound like 1/1000000

Chapter 4.

Machine Learning

Learning is a key element of intelligence.

    I. The types of machine learning
  • MNIST Dataset: Modified National Institute of Standards and Technology.
  • The roots of machine learning are in statistics: Extracting knowledge from data.
    1. Three types of machine learning:
    2. Supervised learning: Predict correct output based on input data.
    3. Unsupervised learning: There are no correct output. Task is to discover the structure of the data.
    4. Reinforcement learning: Feedback about good or bad choice is available with some delay.
  • Supervised Learning.
  • Caveat: Careful with machine learning algorithm
    Avoid Big Mistakes by splitting your data set into two parts: training data & test data.
  • A model might be very good on training data but it is no proof that it can generalize any other data. Test data is used here.
  • Overfitting: Trying to be too smart or an ego problem where you fail to admit you might be wrong.
    Like trying to keep adding rules to fit the new set of data every time which might make it fine on this iteration but worse for the next.
  • Machine learning is prone to overfitting because they can try a huge number of different "rules" until one that first the training data perfectly. Especially, methods that are very flexible and can adopt to almost any pattern in the data can overfit unless the amount of data is enormous.
    This is also why neural networks can require massive amounts of data before they produce reliable prediction.
  • Learning to avoid overfitting and choose a model that is not too restricted, nor too flexible, is one of the most essential skills of a data scientist.
  • Unsupervised Learning
  • In unsupervised learning there is no correct answer which the model can try to fit to. And so performance evaluation is more complicated since we don't know if the model is doing well or not.
  • Unsupervised learning methods tries to learn some kind of "structure" underlying the data, e.g. visualization similar objects together and dissimilar away from each other. It can also mean clustering where we use the data to identify groups or clusters of items that are similar to each other but dissimilar from data in other clusters.
  • Generative modeling is an example of unsupervised learning. It has become prominent over the last few years as deep learning technique called GANs(Generative Adversarial Networks) has lead to great advances.
    Given some data, a generative model can generate more of the same, for example, real looking images of people's faces that don't exist from actual people pictures.
    II. The nearest neighbour classifier
  • "Most" similar classifier
  • It might not always be possible the input data as a geometric distance.
  • It is sort of used in music recommendations with something like collaborative filtering in which new songs are recommended to you based on similar people's preferences on the same song. This create filter bubbles.
  • Predictions can also be a self-fulfilling prophecies in the sense that you are more likely to buy a product if it is recommended to you by the system, which makes predictions tricky to evaluate.
  • In context of news and social media, the above creates filter bubbles.
    III. Regression
  • Linear regression produces a numerical prediction that is not constrained to be an integer.
  • Linear regression is best suited in situations where the output variable can be any number.
  • Regression: Add up the effects of each of the feature variables to produce the predicted value.
    The technical term for adding up process is linear combination.
  • Main advantage of linear regression is its easy interpretability: the learned weights is more interesting than the predictions of the outputs.
  • The technical term for a starting point is intercept.
  • When we are given input and ouputs for a number of items, we can find the weights such that the predicted output matches the actual output as well as possible. This is the task solved by machine learning.
  • In real world a lot of noise can enter into trying to find weights.
  • Finding weight that optimize the match between the predicted and the actual outputs in the training data is a classical statistical problem dating back to the 1800s, and it can be easily solved even for massive data sets. We are not going into that.
  • We can turn the linear regression method's outputs into predictions about labels. The technique for doing this is called logistic regression.
  • Instead of predicting one class or another, logistic regression can also give us a measure of uncertainty of the prediction.
  • Logitstic regression is used in a great variety of real-world AI applications such as predicting financial risks, in medical studies.
  • Machine learning is a very powerful tool for building AI applications. There are thousands of machine learning methods but they boil down to the same thing:
    trying to extract patterns and dependecies from data and using them either to gain understanding of a phenomenon or to predict future outcomes.
  • Even if we might be able to bet better predictions without machine learning, we might still prefer machine learning for its faster predictions and also it keeps churning out predicitons without getting tired.
  • Factors that affect how good a result we can achieve with machine learning:
    • Hardness of task both for a human and a machine like sloppy handwriting.
    • ML method. Some methods are better suited for some particular tasks.
    • Amount of training data.
    • Quality of data.
  • Err to the side of caution when predicting something.
  • Also, the degree of error hugely depends on the type of application.

Chapter 5.

Neural Networks

    I. Neural Networks basics
  • Neural Networks is intereseting because of two
    • Hope to understand our(humans) own mind.
    • Advances in ML achieved in the recent years by combining massive data sets and deep learning techniques.
  • Deep learning: certain kind of ML where several "layers" of simple processing units are connected in a network so that input is passed through each layers in turn.
    The depth allows us to learn complex structures without requiring unrealistically large amounts of data.
  • Neurons: A neural network consists of large number of simple units that receive and transmit signals to each other.
  • Dendrites: Wires that provide the input to the neurons.
    Axon: Wire that transmits the outgoing signal.
  • Each axon may be connected to one or more dendrites at intersections that are called synapses.
  • A single neuron is quite unimpressive bt when connected together, the system can be quite complex.
  • However, even while we seem to be almost as far from understanding the mind and consciousness, there are clear milestones that have been achieved in neuroscience. By better understanding of the structure and function of the brain, we are already reaping some concrete rewards. We can, for instance, identify abnormal functioning and try to help the brain avoid them and reinstate normal operation. This can lead to life-changing new medical treatments for people suffering from neurological disorders: epilepsy, Alzheimer’s disease, problems caused by developmental disorders or damage caused by injuries, and so on.
  • Currently, neural networks are again at the very top of the list as deep learning is used to achieve significant improvements in many areas such as natural language and image processing, which traditionally have been sore points of AI.
  • In artificial neural networks, the internal mechanism of the neurons is usually ignored and the artificial neurons are often much simpler than their natural counterparts.
  • Neural Networks key features:
    1. The system consists of large number of neurons, each of which can process information on its own and don't rely on a CPU which does so sequentially, neurons process vasts amount of information simultaneously.
    2. Neurons both store and process information so there is no need to retrieve data from the memory for processing.
  • Because of these two differences, neural networks and traditional computers are suited for different tasks.
    For a long time, the neural networks were simulated in traditional computers but with special hardware that can process many pieces of information at the same time (parallel processing), maximum capacity can be achieved.
    Note: GPUs have this capability and have a cost-effective solution for running massive deep learning methods.
    II. How neural networks are built
  • Sum of weights, times the inputs is called the linear combination of inputs.
  • Once a linear combination has been computed, the neuron does one more operation: It takes the linear combination and puts it through an activation function:
    • identity function: do nothing and just output the linear combination.
    • step function: if linear combination>0, send pulse ON otherwise do nothing(OFF)
    • sigmoid function: a "soft" version of the step function.

    • Note that with the first activation function, the identity function, the neuron is exactly the same as linear regression. That's why identity function isn't used in neural networks as it doesn't lead to new thing.
  • In real biological neurons communicate by sending sharp, electrical pulses called "spikes" either 1 or 0. In artificial it's however, sigmoid.
    Yes, digital in analog and analog in digital.
  • The output of a neuron, determined by the linear combination and activation function, can be used to extract prediction or a decision.
  • Learning or adaptation in the network occurs when the weights are adjusted so as to make the network produce the correct outputs, just like a linear or logistic regression.
    Since neural networks are large, this weight adjustment costs vast computing power.
  • Perceptron: the mother of all ANNs
  • Perceptron: Simple neuron model with the step activation function. It was the very first formal models of neural computation.

  • AI hyperbole

    After its discovery, the Perceptron algorithm received a lot of attention, not least because of optimistic statements made by its inventor, Frank Rosenblatt. A classic example of AI hyperbole is a New York Times article published on July 8th, 1958:
    “The Navy revealed the embryo of an electronic computer today that it expects will be able to walk, talk, see, reproduce itself and be conscious of its existence.”

    Please note that neural network enthusiasts are not at all the only ones inclined towards optimism. The rise and fall of the logic-based expert systems approach to AI had all the same hallmark features of an AI-hype and people claimed that the final breakthrough is just a short while away. The outcome both in the early 1960s and late 1980s was a collapse in the research funding called an AI Winter.
  • No-one really knows the future with certainty, but knowing the track record of earlier announcements of imminent breakthroughs, some critical thinking is advised.
  • The backpropagation algorithm led to a revival of neural networks in the late 1980s. It is still at the heart of many of the most advanced deep learning solutions.
  • Sometimes perfect classification just isn't possible because the classifier is too simple.
    III. Advanced neural network techniques

Chapter 6.

Implications

    I. About predicting the future
    II. The societal implications of AI
    III. Summary