<s> __author__ = '<STR_LIT>' <EOL> from pybrain . rl . learners . learner import ExploringLearner , DataSetLearner , EpisodicLearner <EOL> from pybrain . rl . explorers . discrete . egreedy import EpsilonGreedyExplorer <EOL> class ValueBasedLearner ( ExploringLearner , DataSetLearner , EpisodicLearner ) : <EOL> """<STR_LIT>""" <EOL> offPolicy = False <EOL> batchMode = True <EOL> _module = None <EOL> _explorer = None <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . explorer = EpsilonGreedyExplorer ( ) <EOL> def _setModule ( self , module ) : <EOL> """<STR_LIT>""" <EOL> if self . explorer : <EOL> self . explorer . module = module <EOL> self . _module = module <EOL> def _getModule ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _module <EOL> module = property ( _getModule , _setModule ) <EOL> def _setExplorer ( self , explorer ) : <EOL> """<STR_LIT>""" <EOL> self . _explorer = explorer <EOL> if self . module : <EOL> self . _explorer . module = self . module <EOL> def _getExplorer ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _explorer <EOL> explorer = property ( _getExplorer , _setExplorer ) </s>
