[[toc]]

Formating with Latex

THE MAIN GOAL OF THIS CONSPECT

Mainly Recap. I don’t think this is a good conspect to get first insight in this topic, because I rely heavily on Notation and the defined model to easily orient in this problem space.

There are a lot of ways to find a policy under a particular problem. What are the appropriate methods depends on what are the variables that we are looking for, what type of information is available to us and many other things. Overall, however these algorithms are actually very similiar in nature and its at least interesting to see a big picture over those different methods.

IMPORTANT NOTATION AND VARIABLES

MDD PROBLEM MODEL

  • A set of states
  • A set of action
  • A transition function If this is 1 then just a Search problem.
    • This actually is the probability, if I take action a from state s, Ill end up in s’
  • A reward function
  • A start state
  • A terminal state.

MOST IMPORTANT VARIABLES

  • , expected utility starting in state s and acting optimally
  • Expected utility starting in state s, taking action a and acting optimally after that.
  • , where is a policy. - This is the expected utility of a state acting according to
  • action taken in state s according to policy . is the action according to optimal policy.

OFFLINE ALGORITHMS

PREFACE

Everything Im going to cover is based on BELLMAN EQUATION
D here stands for Discount and we assume this is always known previously. User chosen variable.

FINDING

Value Iteration

Input:
Returns:
Complexity This takes for each iteration

Method

  • Set
  • Recursively perform updates until convergence

Policy Iteration

Input:
Returns:
Complexity for step 2

Method

  1. Initialize a random policy
  2. Perform Policy Evaluation Using the Iterative method until it converges.
  3. Update policy
  4. Repeat from 2. step until Convergence

POLICY EXTRACTION

Based on Q-values

Input:
Output: Complexity: Method

Based on

Input:
Output:
Complexity:

Method


  • (1-Step Expectimax)

POLICY EVALUATION

Iterative method

Input:
Output:
Complexity:

Method

  • Set
  • Recursively perform updates until convergence

Linear Equation based

Input:
Output:
Complexity: Depends on the method to solve

Method

For all s we have an equation:
We are looking for for all s. Thus have a a linear equation of count(s) variables and equations

ONLINE ALGORITHMS AKA REINFORCEMENT LEARNING

In my unverstanding, the only difference with online learning is that we dont know R(s,a,s’) and T(s,a,s’) anymore and we have to go through the problem space first.

PASSIVE

Existence of Some Policy is ASSUMED and this policy is going to be executed. Just execute the policy and learn from experience

Model Based

Algorithm Sample a policy to get T and R

We try to model R & T first and then get to the evaluation of states

Input:
Output:
Complexity:

Method

2 Steps

  1. Extraction of T(s,a,s’) and R(s,a,s’)
    a. Randomly Initialize policy
    b. Execute this policy and for every pair (s,a) <-(you can consider that as a key in hash table) collect samples results T(s,a,s’) and R(s,a,s’)
    c. Normalize and give estimates
  2. Extraction of State values
    Can be based on Value Iteration or Policy iteration

Model Free

Direct Evaluation of states

Input:
Output:
Complexity:

  1. Everyt time you visit state s writed down, what the the sum of discounted rewards turned out to be.
  2. Average those samples for each state.

Problems

  • Everyt state has to be collected separately
  • We can’t actually extract the policy and perform policy evaluation from this, because we need T and R for such calculations.
  • On slides it claims that state connections are not considered. I am giving a value to every state separately. However some states are closer to each other than others. Neighbouring states might have an effect to each other, but in this scenario we wont consider it.
  • Mostly because every state has to be learned separately, this takes a long time to learn.

Sampling of transitions to evaluate states - V-value learning Temporal Difference learning

Input:
Output:
Complexity:

  1. Every time you perform a transformation, collect a sample based on .
  2. Update
  • We cant still extract policy.

Difference between last 2 Methods

In the first method we perform state evaluation separately for every state and only consider the final results. In the second method however, we run the policy and on every step update states involved. We also consider state connections, because Neighbouring states values are also involved in sampling.

ACTIVE

Sampling of transitions to evaluate Q-values: Q-value learning

Input:
Output:
Complexity:

  1. Every time you perform transition get a sample .
  2. Instead of updating , we now update s

    Exploration and Learning parameters

  • must decrease eventually
  • Optimal exploration with Random exploration with some probability , so other states would be collected. This parameter must also decrease, because in the end with knowledge we want to gain information about optimal state.

Q-value Approximation & Updated Q-learning- Kinda hard part

Problem
We have to generalize accross states. To keep Q(s,a) for all state and for all actions in very very memory consuming in any kind of realistic environment.

Solution
Thus we generalize states so experience could be used for new unexplored situations. To do this we have to
approximate states - Describe a state using a vector of features.

  • features - functions froms state to real numbers (often binary) that capture IMPORTANT properties of state Example
    • Distance to closest ghost
    • Distance to closest don
    • Number of ghost
    • Is pacman in a tunnel (binary feature)

If we do this, we can now use learned information for new states based on feature vector similiarity.

Now if every state and action can be represented as a feature vector (s,a) = \begin{bmatrix} f_{1}(s,a) \ f_{2}(s,a) \ … \ f_{n}(s,a) \end{bmatrix}

.We can transfer the then continue on with updating Q(s,a) like this

Updated Method

transition:
difference:

- Exact Q-value
<- Difference static over all

Intuition

  • If difference is very low (negative) <- Bad Q result and is high, then then becomes significantly smaller. Tha for the end learning result would mean that high would result in lower
  • If difference is very large and is very low. then the result would not change much, because as a multiplier is also very low.
  • If difference is very large and is very low. then the result would not change much, because as a multiplier is also very low. Hmm, that does not make much sense.

Reinforcement vs Linear Regression, Logistic Regression, Gradient Descent

Similarities

  • Both methods perform learning from external data.

Differences

  • Regression, Gradient descent is based on a Cost function which it tries to minimize on the data. (Macimum Likelihood estimation). Reinforcement learning averages experience and gives scores to actions.
  • Regression predicts a certain label

Some Reference

Difference Neurla Network Reinforcement TSP and reinforcement