<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _updatePropensities(self, lastState, lastAction, reward):
 """ Update the propensities for all actions. The propensity for last action chosen will be updated using the feedback value that resulted from performing the action. If j is the index of the last action chosen, r_j is the reward received for performing j, i is the current action being updated, q_i is the propensity for i, and phi is the recency parameter, then this update function can be expressed as:: q_i = (1-phi) * q_i + E(i, r_j) """

        phi = self.recency

        for action in range(self.module.numActions):
            carryOver = (1 - phi) * self.module.getValue(lastState, action)
            experience = self._experience(lastState, action, lastAction,reward)

            self.module.updateValue(lastState, action, carryOver + experience)