Course contentsShow
← Computer Science
Lesson 2774 of 2,87262. Machine Learning FundamentalsFree lesson

What is Machine Learning?

Understanding ML as learning patterns from data without explicit programming, and how it differs from traditional algorithms.

What is Machine Learning?

You'll learn: How machine learning enables computers to learn patterns from data without being explicitly programmed for every scenario.

The Core Idea

Traditional algorithms follow explicit, hand-coded rules. If you want a program to identify spam emails, you'd write rules like "if the email contains 'FREE MONEY' and has more than 5 exclamation marks, it's spam." You anticipate every pattern and code every condition.

Machine Learning (ML) flips this approach. Instead of programming rules, you provide examples (data) and let the algorithm discover the patterns itself. You feed thousands of emails labeled "spam" or "not spam," and the ML system learns what characteristics make an email spam—patterns you might never have thought to code explicitly.

How It Differs from Traditional Algorithms

Think of traditional algorithms like following a recipe: every step is predetermined. You've written exact instructions for every possible input.

Machine learning is like teaching someone to cook by showing them many examples of good and bad dishes. They learn the underlying principles (salt enhances flavor, burnt means too hot) without you writing out every single scenario.

In the game-playing context you've studied (minimax, alpha-beta), a traditional approach evaluates positions using hand-crafted evaluation functions. An ML approach could learn what makes a position "good" by analyzing thousands of games, discovering patterns humans might miss.

Why It Matters

ML excels when:

  • Rules are too complex to code manually
  • Patterns exist but aren't obvious
  • The problem changes over time (spam evolves!)

Key Takeaway: Machine learning lets computers discover patterns from data automatically, learning relationships and rules that would be impractical or impossible to program explicitly.