#NEWLINE# def learn( self , state1 , action1 , reward , state2 ) : #NEWLINE# #INDENT# maxqnew = max ( [ self . get_Qvalue ( state2 , a ) for a in self . actions ] ) #NEWLINE# self . learnQ ( state1 , action1 , reward , ( reward + ( self . gamma * maxqnew ) ) )