How do I use Q-Learning to update values? I am having trouble using the Q-learning algorithm to solve the problem in the link below.
https://math.stackexchange.com/questions/357397/how-do-i-use-q-learning-to-update-values 
Any help would be appreciated (couldn't post image as I don't have enough badge points)
 A: Let's look at the Q-value update:
$Q(s,a) \leftarrow (1-\alpha)Q(s,a) + \alpha[R_{s'} + {\gamma}max_{a'}Q(s',a')]$
where $s$ is the current state, $a$ is taken in the state $s$, $s'$ is the next state, $a'$ is the action taken in $s'$, $\gamma$ is the discount factor, and $\alpha$ is the learning rate.
This tells us that the Q-value for a given state-action pair $(s,a)$ is a combination of some portion of it's value before the update [$(1-\alpha)Q(s,a)$] and the sum of the reward for the next state [$R_{s'}$] with the discounted value of the next optimal action [${\gamma}max_{a'}Q(s',a')$] modulated by the learning rate $\alpha$.
Applying the update simply amounts to plugging in the given values. In your link the path begins from the "start" state and takes action "L". We know this because the transition model is said to be deterministic. As such we have:
$Q(start, L) \leftarrow (1-\alpha)Q(start, L) + \alpha[1 + 0.8max_{a'}Q(a,a')]$
The sticking point for most people is the statement $max_{a'}Q(a,a')$ because they generally want to apply the update rule again which itself has a max in it leading to a potentially long recursion. However we don't do that. Instead we simply look at the values of $Q(a,a')$ for each action $a'$ and take the largest. Given that $Q(s,a) = 3$ for all state-action pairs to begin with the equation above becomes
$Q(start, L) \leftarrow (1-\alpha)Q(start, L) + \alpha[1 + 0.8*3]$
Since a learning rate $\alpha$ is not provided we cannot actually boil this down to a number nor proceed further with the example but you likely get the idea at this point.
