Answers.Body: <p>I thought about my input-layer. I had the 500 states one hot encoded. So 499 of every input node would be 0. And 0 is very bad in an neural network. I tried the same code with the "CardPole-v0" and it worked. </p>
  
  <p>So think about your input guys </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-16T11:02:36.260Z
Answers.LastActivityDate: 2020-01-16T11:02:36.260Z
Answers.UserDisplayName: Voß
Body: <p>I'm trying to implement deep q learning in the OpenAI's gym "Taxi-v3" environment. But my agent only learns to do one action in every state. What am I doing wrong? Here is the <a href="https://github.com/OleVoss/DeepTaxi" rel="nofollow noreferrer">Github repository with the code</a>.</p>
  
Tags: <deep-learning><reinforcement-learning><open-ai><pytorch><gym>
Title: Why is this deep Q agent constantly learning just one action?
UserDisplayName: Voß
ThreadText: # Why is this deep Q agent constantly learning just one action?
  
  (Asked by: username_0 on 2020-01-16)
  
  I'm trying to implement deep q learning in the OpenAI's gym "Taxi-v3" environment. But my agent only learns to do one action in every state. What am I doing wrong? Here is the [Github repository with the code](https://github.com/OleVoss/DeepTaxi).
  
  **Tags:** deep-learning, reinforcement-learning, open-ai, pytorch, gym
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-01-16. Score: 1 | Accepted answer
  
  I thought about my input-layer. I had the 500 states one hot encoded. So 499 of every input node would be 0. And 0 is very bad in an neural network. I tried the same code with the "CardPole-v0" and it worked.
  
  So think about your input guys
  
  
  ---
  
  