#NEWLINE# def processAnswer( self , resource , index_left = 0 , index_right = 0 , index_painted = 0 , index_winner = 0 ) : #NEWLINE# #INDENT# alt_index = index_left #NEWLINE# if ( index_left == index_painted ) : #NEWLINE# #INDENT# alt_index = index_right #NEWLINE# #UNINDENT# reward = 0.0 #NEWLINE# if ( index_painted == index_winner ) : #NEWLINE# #INDENT# reward = 1.0 #NEWLINE# #UNINDENT# resource . increment_many ( { #NEWLINE# #INDENT# ( 'Xsum_' + str ( index_painted ) ) : reward , #NEWLINE# ( 'T_' + str ( resource ) ) : 1 , #NEWLINE# 'total_pulls' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# return True