shapesinfinity.
Learn AI · Beginner · 3 min

Learning by Getting Rewards

Can a computer learn to win a game without being told the rules?

The Reward Loop
AI AgentTakes ActionSees ResultGets Reward or PenaltyLearns PatternRepeats Loop

The AI acts, checks results, gets feedback, and improves.

goes inthe AI workscomes out

In simple words

An AI tries actions and gets points for good ones. Over time, it learns which actions work best.

The real definition

Reinforcement learning (RL) trains a model by giving it rewards or penalties for actions. The AI learns which actions lead to the best outcomes.

Like… Learning to Cook

You try a recipe. If it tastes good, you remember it. If it burns, you change it next time. The AI learns the same way.

But: Cooking takes time. AI learns much faster through many tries.

You see it every day

on your phone

Game Playing

An AI plays chess 1,000 times, earning points for wins. The AI learns which moves work best.

out in the world

Robot Walking

A robot tries to walk. Each successful step gives reward. The robot learns smooth, balanced movement.

at work

Delivery Routes

A system tests delivery paths and rewards faster routes. Companies save time and money with this AI.

Step by step

  1. 1

    AI Takes Action

    The AI picks a move or decision in an environment.

  2. 2

    Observe Outcome

    The AI sees what happened after its action.

  3. 3

    Receive Reward

    Good results give reward. Bad results give penalty.

  4. 4

    Update Knowledge

    The AI learns: this action led to good or bad outcome.

  5. 5

    Repeat Many Times

    After hundreds or thousands of tries, patterns emerge.

Remember

Rewards guide learning, not human instructions.AI learns by trying many times and remembering.Penalties are as important as rewards.Works best for games, robots, and optimization.Slower than supervised learning, but very flexible.

Memory trick

Try → See → Reward → Learn → Better. The AI learns through action and feedback.

Words

Reinforcement learning ren-FOR-s-ment LER-ning
Training an AI by giving it rewards for good actions.
Reward ree-WORD
A positive signal telling the AI it did something good.
Penalty PEN-al-tee
A negative signal telling the AI it did something bad.
Agent AY-jent
The AI program that takes actions and learns.
Environment en-VY-run-ment
The world or system where the AI operates and learns.
Action AK-shun
A choice or move the AI makes.
Model MOD-ul
The trained AI program that makes decisions.
Optimization op-tim-ih-ZAY-shun
Making something as good or efficient as possible.

Check yourself

quick check

What does the AI learn from in reinforcement learning?

Hint

What signal tells the AI it did something good or bad?

quick check

A robot tries different arm movements to pick up a ball. When it succeeds, it gets reward. What will the robot do next?

Hint

What does learning mean in reinforcement learning?

think

Why is reinforcement learning good for teaching a robot to walk, but harder for teaching it from words alone?

Show a good answer

Walking requires finding the right movements through trial and error. Words cannot show the robot what balance feels like. Rewards teach directly.

Tell a friend

“Reinforcement learning teaches AI by rewarding good choices. It learns like you learn a game: try, fail, improve, repeat.”

People also ask

How is reinforcement learning different from other types of machine learning?

Reinforcement learning learns from reward signals, not labeled examples. The AI explores and discovers best actions through trial and feedback.

How long does it take for AI to learn through reinforcement?

It depends on the task. Simple games take hours. Complex tasks can need weeks or months of practice.

Can reinforcement learning be used in real-world work?

Yes. Companies use it for delivery routes, manufacturing, games, and optimization tasks. It works well when trial and error is safe.