Cover photo

Reinforcement Learning

Reinforcement Learning (RL) is a type of machine learning where an agent learns to make sequential decisions by interacting with an environment. The agent takes actions, receives rewards (or penalties), and adjusts its strategy to maximize cumulative rewards over time.

It's inspired by how humans and animals learn through trial and error.

Imagine earning $1 for every right decision and losing $1 for a wrong one, with survival depending on maximizing rewards. This is Reinforcement Learning, where challenges shape learning through rewards for success.
Imagine earning $1 for every right decision and losing $1 for a wrong one, with survival depending on maximizing rewards. This is Reinforcement Learning, where challenges shape learning through rewards for success.

Key Components of RL (Reinforcement Learning):

  1. Agent – The learner or decision-maker.

  2. Environment – The world in which the agent operates.

  3. State (S) – A representation of the current situation.

  4. Action (A) – The choice an agent makes at a given state.

  5. Reward (R) – Feedback from the environment based on an action.

  6. Policy (π) – A strategy that defines the agent’s behavior.

  7. Value Function (V) – A measure of how good a state is.

  8. Q-value (Q) – A measure of how good an action is at a given state.

post image

Each time when the agent takes a action**(A)** and pass a Environment**(E)** successfully, The Environment chances with a new State**(S)** with Reward**(R)** assigned to the Agent for that correct action. But what are these Policy, Value Function and Q-Value ?

**Policy (**π)

A policy (π) in Reinforcement Learning defines how an agent selects actions in a given state to maximize long-term rewards.

Policy are set of rules which needs to be followed in a Environment by the Agents to receive the Reward for a correct action.
Policy are set of rules which needs to be followed in a Environment by the Agents to receive the Reward for a correct action.

Types of Policies:

Deterministic Policy (π(s)) – Always selects the same action for a given state.

post image

Stochastic Policy (π(a|s)) – Assigns probabilities to different actions for a given state.

post image

How it Works:

  • A good policy helps an agent navigate the environment efficiently.

  • Reinforcement Learning algorithms improve policies over time to maximize rewards.

Value Function (V)

The Value Function (V) represents the expected long-term reward an agent can get from a given state while following a policy π\piπ.

post image

( V^π(s) ) = Expected total reward from state s, following policy ( π ).

( \gamma ) = Discount factor (0 to 1) that prioritizes immediate vs. future rewards.

( R_t ) = Reward at time step t.

Q-Value (Q)

Q in RL stands for the Q-value (or Action-Value Function), which represents the expected cumulative reward the agent can get by taking a specific action A in a given state S and then following an optimal policy.

Rewards are calculated each time the Agent is in a new Scenario.
Rewards are calculated each time the Agent is in a new Scenario.
Reward distribution for each Situation.
Reward distribution for each Situation.

Conclusion

Reinforcement Learning (RL) is a powerful framework where an agent learns through trial and error, optimizing its actions to maximize rewards. With Quantum computers, it will make the decision making Instant for Smart Application built on them.