#NEWLINE# def _updateEtraces( self , state , action , responsibility = 1.0 ) : #NEWLINE# #INDENT# self . _etraces *= ( ( self . rewardDiscount * self . _lambda ) * responsibility ) #NEWLINE# self . _etraces [ action ] = clip ( ( self . _etraces [ action ] + state ) , ( - np . inf ) , 1.0 ) #NEWLINE# action_bit = one_to_n ( action , self . num_actions ) #NEWLINE# for argstate in argwhere ( ( state == 1 ) ) : #NEWLINE# #INDENT# self . _etraces [ ( argwhere ( ( action_bit != 1 ) ) , argstate ) ] = 0.0