#NEWLINE# def get_action_func( self ) : #NEWLINE# #INDENT# '\n        Returns a theano function that takes an action and returns a reward.\n        ' #NEWLINE# action = T . iscalar ( ) #NEWLINE# reward_mean = self . means [ action ] #NEWLINE# reward_std = self . stds [ action ] #NEWLINE# reward = self . theano_rng . normal ( avg = reward_mean , std = reward_std , dtype = config . floatX , size = reward_std . shape ) #NEWLINE# rval = function ( [ action ] , reward ) #NEWLINE# return rval