<s> """<STR_LIT>""" <EOL> from . agent import NeuralAgent <EOL> class ALEAgent ( NeuralAgent ) : <EOL> def _chooseAction ( self ) : <EOL> if self . _mode != - <NUM_LIT:1> : <EOL> if self . _randomState . rand ( ) < <NUM_LIT> : <EOL> action = self . _randomState . randint ( <NUM_LIT:0> , self . _environment . nActions ( ) ) <EOL> V = <NUM_LIT:0> <EOL> else : <EOL> action , V = self . bestAction ( ) <EOL> else : <EOL> if self . _dataSet . nElems ( ) > self . _replayMemoryStartSize : <EOL> if self . _randomState . rand ( ) < self . _epsilon : <EOL> action = self . _randomState . randint ( <NUM_LIT:0> , self . _environment . nActions ( ) ) <EOL> V = <NUM_LIT:0> <EOL> else : <EOL> action , V = self . bestAction ( ) <EOL> else : <EOL> action = self . _randomState . randint ( <NUM_LIT:0> , self . _environment . nActions ( ) ) <EOL> V = <NUM_LIT:0> <EOL> for c in self . _controllers : c . OnActionChosen ( self , action ) <EOL> return action , V <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> pass </s>
