DEV Community

Jayaprasanna Roddam
Jayaprasanna Roddam

Posted on

Introduction to Artificial Intelligence

Artificial Intelligence is best understood as a progression:

Intelligence
    ↓
Computation
    ↓
Artificial Intelligence
    ↓
Different ways of building AI
    ↓
Different kinds of AI
    ↓
Applications and limitations
Enter fullscreen mode Exit fullscreen mode

1.1 What is Intelligence?

Intelligence is the ability of a system to perceive information, understand or represent it, learn from experience, reason about it, and use that knowledge to achieve a goal.

A simple way to think about intelligence is:

Perceive → Understand → Reason → Decide → Act → Learn
Enter fullscreen mode Exit fullscreen mode

For example, when a person sees dark clouds:

Perception:      "The sky is dark."
Understanding:   "It may rain."
Reasoning:       "If I go outside, I may get wet."
Decision:        "I should take an umbrella."
Action:          Take the umbrella.
Learning:        Remember that dark clouds often indicate rain.
Enter fullscreen mode Exit fullscreen mode

Intelligence is therefore not simply "knowing things". It is the ability to use information appropriately.

Different forms of intelligence may involve:

  • perception
  • learning
  • memory
  • reasoning
  • planning
  • problem solving
  • language
  • decision making
  • adaptation

Importantly, intelligence does not necessarily require consciousness. A system can perform an intelligent task without being conscious of what it is doing.

This distinction becomes important when we study AI.

1.2 What is Computation?

Computation is the process of transforming input information into output information according to some procedure.

At its simplest:

Input → Computation → Output
Enter fullscreen mode Exit fullscreen mode

For example:

Input:  10, 20
Operation: addition
Output: 30
Enter fullscreen mode Exit fullscreen mode

A computer performs computation using algorithms, data, memory, and processing mechanisms.

An algorithm is a precise procedure for solving a problem.

For example, sorting numbers is a computational problem:

Input:  [5, 2, 8, 1]
Algorithm: sorting algorithm
Output: [1, 2, 5, 8]
Enter fullscreen mode Exit fullscreen mode

Traditional computation is therefore about systematically transforming information.

Mathematically, many computational problems can be represented as a function:

y = f(x)
Enter fullscreen mode Exit fullscreen mode

where:

x = input
f = computation
y = output
Enter fullscreen mode Exit fullscreen mode

For example:

f(x) = x²
Enter fullscreen mode Exit fullscreen mode

If:

x = 5
Enter fullscreen mode Exit fullscreen mode

then:

y = 25
Enter fullscreen mode Exit fullscreen mode

This simple idea becomes very important for AI.

In traditional programming, humans explicitly design much of the function f.

In machine learning, we instead give the system examples and allow it to learn an approximation of f from data.

1.3 What is Artificial Intelligence (AI)?

Artificial Intelligence is the field of computing concerned with building systems that can perform tasks that normally require some form of human intelligence.

Examples include:

  • recognising objects in images
  • understanding language
  • translating languages
  • recommending products
  • predicting demand
  • playing games
  • planning routes
  • generating text or images
  • making decisions from data

The important idea is not that the computer "becomes human".

Instead:

Human intelligence
      ↓
Identify an intelligent capability
      ↓
Represent it computationally
      ↓
Build a system that performs it
Enter fullscreen mode Exit fullscreen mode

For example, humans can recognise a cat from an image.

AI attempts to build a computational system that can also perform:

image → "cat"
Enter fullscreen mode Exit fullscreen mode

Similarly:

speech → text
text → meaning
customer data → predicted behaviour
prompt → generated response
Enter fullscreen mode Exit fullscreen mode

AI is therefore a broad field, not a single algorithm.

Machine Learning, Deep Learning, Reinforcement Learning, Generative AI, Computer Vision, and Natural Language Processing are different areas or approaches within the larger AI landscape.

1.4 Traditional Programming vs AI

The most important difference is where the intelligence is specified.

In traditional programming:

Rules + Data
     ↓
  Program
     ↓
  Output
Enter fullscreen mode Exit fullscreen mode

The programmer explicitly writes the rules.

For example:

if temperature > 30:
    return "Hot"
else:
    return "Not Hot"
Enter fullscreen mode Exit fullscreen mode

The programmer has already decided the logic.

In machine learning:

Data + Desired Outputs
         ↓
      Learning
         ↓
    Learned Model
         ↓
  New Input → Prediction
Enter fullscreen mode Exit fullscreen mode

The programmer does not explicitly write every rule.

Instead, the system learns patterns from examples.

Suppose we want to detect spam emails.

Traditional programming might contain rules such as:

if email contains "WIN MONEY":
    spam

if email contains "FREE PRIZE":
    spam
Enter fullscreen mode Exit fullscreen mode

But real spam is much more complicated. People can write:

"Congratulations! You have been selected..."
Enter fullscreen mode Exit fullscreen mode

without using any exact phrase that we anticipated.

A machine-learning system can instead learn patterns from thousands or millions of examples:

Email → Spam
Email → Not Spam
Enter fullscreen mode Exit fullscreen mode

and learn a function approximately like:

f(email) → probability of spam
Enter fullscreen mode Exit fullscreen mode

For example:

f(email) = 0.97
Enter fullscreen mode Exit fullscreen mode

can mean that the model estimates a 97% probability that the email is spam.

Therefore:

Traditional programming:
    Human writes the rules.

Machine learning:
    Human provides data + learning procedure,
    and the system learns the rules/patterns.
Enter fullscreen mode Exit fullscreen mode

This is one of the fundamental transitions from conventional programming to AI.

1.5 Rule-Based Systems and Expert Systems

Before modern machine learning became dominant, an important approach to AI was the rule-based system.

A rule-based system represents knowledge explicitly using rules.

For example:

IF patient has fever
AND patient has cough
THEN possible respiratory infection.
Enter fullscreen mode Exit fullscreen mode

The system contains:

Knowledge Base
      +
Inference Engine
      ↓
    Result
Enter fullscreen mode Exit fullscreen mode

The knowledge base contains facts and rules.

The inference engine determines which rules apply.

An expert system is a rule-based AI system designed to reproduce the decision-making of a human expert in a particular domain.

For example, a medical expert system might contain hundreds or thousands of rules created with the help of doctors.

The advantage is explainability:

"The system reached this conclusion because
 Rule 17 and Rule 42 were satisfied."
Enter fullscreen mode Exit fullscreen mode

The major limitation is that humans must explicitly provide the knowledge.

Real-world knowledge is enormous, uncertain, and constantly changing.

It is extremely difficult to manually write rules for everything a human knows.

For example, writing rules for:

"What makes a photograph look beautiful?"
Enter fullscreen mode Exit fullscreen mode

is far harder than writing:

IF temperature > 30 THEN "hot".
Enter fullscreen mode Exit fullscreen mode

This limitation helped motivate data-driven machine learning.

1.6 Automation vs Machine Learning vs AI

These terms are related, but they are not synonyms.

Automation

Automation means making a process execute with little or no human intervention.

It does not necessarily require intelligence.

For example:

Every day at 9 AM
    ↓
Run database backup
    ↓
Store backup in S3
Enter fullscreen mode Exit fullscreen mode

This is automation.

There is no learning or reasoning required.

Machine Learning

Machine Learning is an approach where a system learns patterns or relationships from data rather than having every rule explicitly programmed.

For example:

Historical transactions
        ↓
    ML training
        ↓
Fraud detection model
        ↓
New transaction → fraud probability
Enter fullscreen mode Exit fullscreen mode

Machine learning is therefore one way of building intelligent systems.

Artificial Intelligence

AI is the broader field.

It includes systems based on:

  • rules
  • search
  • planning
  • optimisation
  • machine learning
  • deep learning
  • probabilistic reasoning
  • reinforcement learning
  • generative models

Therefore:

Automation
    = execution without manual intervention

Machine Learning
    = learning patterns from data

Artificial Intelligence
    = broader goal/field of creating systems
      capable of intelligent behaviour
Enter fullscreen mode Exit fullscreen mode

There is overlap.

For example:

Automated system
    ↓
ML model makes decision
    ↓
Automated action
Enter fullscreen mode Exit fullscreen mode

is both automation and machine-learning-based AI.

1.7 Narrow AI, Artificial General Intelligence, and Superintelligence

These terms describe the breadth of intelligence.

Narrow AI

Narrow AI is an AI system designed to perform a specific task or a limited class of tasks.

Examples include:

  • spam detection
  • face recognition
  • recommendation systems
  • speech recognition
  • chess engines
  • image classification
  • language models

A chess system can be extraordinarily good at chess while having no ability to perform many ordinary human tasks.

So:

Very capable at one domain
         ≠
Generally intelligent
Enter fullscreen mode Exit fullscreen mode

Almost all practical AI systems today are considered forms of narrow AI, even when they can perform many different tasks.

Artificial General Intelligence (AGI)

AGI refers to a hypothetical AI system possessing general-purpose intellectual capabilities comparable to humans across a broad range of tasks.

Instead of:

AI → excellent at one particular task
Enter fullscreen mode Exit fullscreen mode

the idea is:

AGI → can learn, reason and solve
      many different kinds of problems
Enter fullscreen mode Exit fullscreen mode

For example, a genuinely general system might be able to:

learn mathematics
learn a new programming language
understand a scientific paper
plan a trip
learn a new physical task
reason about unfamiliar situations
Enter fullscreen mode Exit fullscreen mode

without requiring a separate specialised system for each capability.

There is no universally accepted mathematical test that definitively establishes whether a system is AGI. It is primarily a conceptual and research term.

Superintelligence

Superintelligence refers to a hypothetical intelligence that substantially exceeds human intellectual capability across essentially all important cognitive domains.

Conceptually:

Narrow AI
    ↓
Human-level general intelligence
    ↓
Superintelligence
Enter fullscreen mode Exit fullscreen mode

These are concepts describing capability, not simply processing speed.

A faster computer is not automatically more intelligent.

The important question is what kinds of problems the system can understand, learn, reason about, and solve.

1.8 Predictive AI vs Generative AI

A useful distinction in modern AI is whether the system primarily predicts something about existing data or generates new content.

Predictive AI

Predictive AI uses existing information to estimate an outcome.

Conceptually:

Input data
    ↓
Model
    ↓
Prediction
Enter fullscreen mode Exit fullscreen mode

Examples:

Customer information → probability of churn
Transaction → probability of fraud
Image → object class
House information → predicted price
Historical demand → future demand
Enter fullscreen mode Exit fullscreen mode

Mathematically, a predictive model might estimate:

P(Y | X)
Enter fullscreen mode Exit fullscreen mode

which means:

"The probability of outcome Y given input X."
Enter fullscreen mode Exit fullscreen mode

For example:

P(fraud | transaction) = 0.92
Enter fullscreen mode Exit fullscreen mode

The model predicts that the transaction has a high probability of being fraudulent.

Generative AI

Generative AI produces new content.

Examples include:

  • text
  • images
  • audio
  • video
  • code

A language model, for example, receives a sequence of tokens and predicts what token is likely to come next.

Conceptually:

Input:
"The capital of India is"

         ↓

    Language Model

         ↓

Next-token probabilities

         ↓

    "New Delhi"
Enter fullscreen mode Exit fullscreen mode

The model repeatedly performs this process:

context
   ↓
predict next token
   ↓
select token
   ↓
add token to context
   ↓
predict next token
   ↓
...
Enter fullscreen mode Exit fullscreen mode

This produces generated text.

So the fundamental distinction is:

Predictive AI:
    "What is likely to happen?"

Generative AI:
    "What can be generated given this context?"
Enter fullscreen mode Exit fullscreen mode

The distinction is useful, but not absolute. Generative models also perform prediction internally. A language model generates text precisely by making repeated predictions.

1.9 Applications and Limitations of AI

AI is useful wherever large amounts of information, patterns, decisions, or content need to be processed.

Major applications

Healthcare

Medical image analysis
Drug discovery
Patient-risk prediction
Clinical decision support
Enter fullscreen mode Exit fullscreen mode

Finance

Fraud detection
Credit-risk assessment
Algorithmic trading
Financial forecasting
Enter fullscreen mode Exit fullscreen mode

E-commerce

Product recommendations
Search ranking
Demand forecasting
Personalisation
Enter fullscreen mode Exit fullscreen mode

Transportation

Route optimisation
Traffic prediction
Driver assistance
Autonomous systems
Enter fullscreen mode Exit fullscreen mode

Software Engineering

Code generation
Code review
Testing
Debugging
Documentation
Developer agents
Enter fullscreen mode Exit fullscreen mode

Language

Translation
Summarisation
Question answering
Search
Conversational systems
Enter fullscreen mode Exit fullscreen mode

Science

Protein structure prediction
Simulation
Scientific discovery
Pattern discovery in large datasets
Enter fullscreen mode Exit fullscreen mode

However, AI has important limitations.

1. Data dependence

Many AI systems require large quantities of useful data.

Poor-quality data can produce poor models.

Garbage data
     ↓
Poor learning
     ↓
Poor predictions
Enter fullscreen mode Exit fullscreen mode

2. Bias

If training data contains systematic biases, a model may learn and reproduce them.

Therefore:

Model behaviour ≈
patterns present in the training process
Enter fullscreen mode Exit fullscreen mode

Data quality and representation matter significantly.

3. Generalisation

A model can perform extremely well on familiar examples but poorly on situations that differ significantly from its training distribution.

For example:

Training:
    clear road images

Deployment:
    heavy rain + unusual road conditions
Enter fullscreen mode Exit fullscreen mode

Performance may degrade.

4. Hallucination and incorrect outputs

Generative AI can produce fluent but incorrect information.

Fluency does not imply truth.

Therefore:

Good language generation
    ≠
Guaranteed factual correctness
Enter fullscreen mode Exit fullscreen mode

5. Explainability

Some modern AI models contain billions of learned parameters, making it difficult to explain exactly why a particular prediction was produced.

A traditional rule may say:

IF A AND B → C
Enter fullscreen mode Exit fullscreen mode

A large neural network may instead encode the relevant behaviour across many distributed parameters.

6. Computational cost

Modern AI can require significant:

  • CPU/GPU computation
  • memory
  • storage
  • electricity
  • training time

Inference itself can also be expensive at large scale.

7. Security and reliability

AI systems can be attacked, manipulated, or given inputs they were not designed to handle.

For systems making important decisions, reliability becomes especially important.

8. Lack of guaranteed reasoning

An AI system may produce an answer that appears logically convincing without actually possessing the kind of reliable reasoning humans expect.

Therefore, an AI system should not automatically be treated as an unquestionable source of truth.

The Complete Picture

The concepts can now be connected as one continuous story:

Humans have intelligence
        ↓
Intelligence allows us to perceive,
learn, reason, decide and act
        ↓
Computers provide computation
        ↓
Computation allows us to represent
and manipulate information
        ↓
AI attempts to reproduce useful
intelligent behaviour computationally
        ↓
Early AI often used explicit rules
        ↓
Rule-based systems became difficult
to scale to complex real-world knowledge
        ↓
Machine Learning allowed systems
to learn patterns from data
        ↓
Deep Learning enabled increasingly
powerful learned representations
        ↓
Modern AI can perform prediction,
perception, reasoning-like tasks and generation
        ↓
Generative AI can create text, images,
audio, video and code
        ↓
But AI still has limitations:
data dependence, bias, errors,
hallucination, cost, reliability and generalisation
Enter fullscreen mode Exit fullscreen mode

The central idea is therefore:

Traditional programming:
    Humans specify the behaviour.

Machine learning:
    Humans provide data and a learning method;
    the system learns behaviour from the data.

Artificial Intelligence:
    The broader field of building systems
    capable of intelligent behaviour.
Enter fullscreen mode Exit fullscreen mode

And the most important conceptual distinction is:

COMPUTATION tells us:
    "How can information be processed?"

AI asks:
    "How can computation be used to produce
     intelligent behaviour?"
Enter fullscreen mode Exit fullscreen mode

That connection is the foundation for everything that follows:
Machine Learning → Neural Networks → Deep Learning → Transformers → LLMs → Generative AI → AI Agents.

Top comments (0)