Understanding states actions and rewards