AIbyExamples
Chapter 1

Introduction to Artificial Intelligence

What AI really is, a short history of the field, and where it shows up in the products you use every day.

8 min read

Artificial Intelligence (AI) is the branch of computer science focused on building systems that can perform tasks that normally require human intelligence — things like recognizing images, understanding language, making decisions, and learning from experience. Instead of following a fixed set of hand-written rules, modern AI systems learn patterns from data.

The one-sentence definition

AI is software that improves its behavior by learning from data and experience, rather than being explicitly programmed for every situation.

A very short history

The term artificial intelligence was coined at the Dartmouth Workshop in 1956. The field has moved through several waves of optimism and "AI winters" of reduced funding. A few milestones worth knowing:

  • 1950 — Alan Turing proposes the "Imitation Game" (the Turing Test) as a way to think about machine intelligence.
  • 1956 — The Dartmouth Workshop formally launches AI as a research field.
  • 1997 — IBM’s Deep Blue defeats world chess champion Garry Kasparov.
  • 2012 — A deep neural network (AlexNet) dramatically wins the ImageNet competition, kicking off the deep learning era.
  • 2022+ — Large language models (LLMs) like GPT bring conversational AI to hundreds of millions of people.

The main branches of AI

AI is an umbrella term. The pieces you will hear about most often are:

  • Machine Learning (ML) — algorithms that learn patterns from data. This is the engine behind almost all modern AI.
  • Deep Learning — a sub-field of ML using multi-layer neural networks; powers image and speech recognition.
  • Natural Language Processing (NLP) — helping computers understand and generate human language.
  • Computer Vision — extracting meaning from images and video.
  • Reinforcement Learning — agents that learn by trial and error through rewards.

AI in everyday life

You almost certainly used AI several times today. Some familiar examples:

  1. 1Spam filters that decide which emails reach your inbox.
  2. 2Recommendation systems on streaming and shopping sites.
  3. 3Voice assistants that transcribe and answer your questions.
  4. 4Navigation apps predicting traffic and travel times.
  5. 5Chat assistants that draft text, code, and summaries.

A tiny first example

Before we touch machine learning, here is the difference between rule-based code and a learning approach. A rule-based spam detector might look like this:

python
def is_spam(email_text):
    spam_words = ["free money", "winner", "click here"]
    text = email_text.lower()
    return any(word in text for word in spam_words)

print(is_spam("You are a WINNER, click here!"))  # True
Rule-based logic — brittle and hard to maintain.

This works until spammers change their wording. A machine learning approach instead learns what spam looks like from thousands of labeled examples — which is exactly what we explore in the next chapter.

How to read this ebook

Every chapter is short and example-driven. Skim the callouts first, then run the code snippets yourself. You learn AI fastest by breaking working examples.