I don't understand the last equality.
Here is my derivation $r(s,a,s')=\sum_{r\in R} r p(r|s,a,s')=\sum_{r\in R} r \frac{p(s,a,s'|r)p(r)}{p(s,a,s')}$
Could you give me the correct steps to derive them?
Thank you
I don't understand the last equality.
Here is my derivation $r(s,a,s')=\sum_{r\in R} r p(r|s,a,s')=\sum_{r\in R} r \frac{p(s,a,s'|r)p(r)}{p(s,a,s')}$
Could you give me the correct steps to derive them?
Thank you
I found out that
$\sum_{r\in R} r p(r|s,a,s') = \sum_{r\in R} r \frac{p(s,a,s',r)}{p(s,a,s')} = \sum_{r\in R} r \frac{p(s',r|s,a)}{p(s'|s,a)} $ by cancelling $p(s,a)$.