original_docstring: 
          Decide wheter to perform an explorative or exploitative action, according to an epsilon-greedy policy
          
docstring: Decide wheter to perform an explorative or exploitative action, according to an epsilon-greedy policy
docstring_tokens: Decide wheter to perform an explorative or exploitative action according to an epsilon - greedy policy
code: def _choose_action(self, state, epsilon):
          """
          Decide wheter to perform an explorative or exploitative action, according to an epsilon-greedy policy
          """
          if random.random() < epsilon:
              return random.randint(0, self._num_actions - 1) # random action
          else:
              pred = np.array(requests.post('http://127.0.0.1:5000/predict', json={'state': state.tolist()}).json()['prediction'])
              return np.argmax(pred)
              #return np.argmax(self._Model.predict_one(state)) # the best action given the current state
code_tokens: def _choose_action ( self , state , epsilon ) : if random . random ( ) < epsilon : return random . randint ( 0 , self . _num_actions - 1 ) else : pred = np . array ( requests . post ( 'http://127.0.0.1:5000/predict' , json = { 'state' : state . tolist ( ) } ) . json ( ) [ 'prediction' ] ) return np . argmax ( pred )
short_docstring: Decide wheter to perform an explorative or exploitative action, according to an epsilon-greedy policy
short_docstring_tokens: Decide wheter to perform an explorative or exploitative action according to an epsilon - greedy policy
comment: """
          Decide wheter to perform an explorative or exploitative action, according to an epsilon-greedy policy
          """$SEP$# random action$SEP$#return np.argmax(self._Model.predict_one(state)) # the best action given the current state