An MDP (Markov Decision Process) models sequential decisions as a 5-tuple
(S,A,P,R,γ):
S states,
A actions,
P(s′∣s,a) transition probabilities,
R(s,a) immediate rewards, and
γ∈[0,1) discount factor. The Bellman optimality equation captures self-consistency (optimal substructure) of the optimal value function:
V∗(s)=maxa[r(s,a)+γ∑s′P(s′∣s,a)V∗(s′)], where
r(s,a) is the immediate reward,
maxa takes the best action,
∑s′P(s′∣s,a)V∗(s′) is the transition-weighted expectation over successor states, and
γ discounts future rewards. The Q-version is
Q∗(s,a)=r(s,a)+γ∑s′P(s′∣s,a)maxa′Q∗(s′,a′) with
maxa′Q∗(s′,a′) the optimal expected value at the next state; the two are linked by
V∗(s)=maxaQ∗(s,a).