title: What are the Discrete and Box datatypes used by OpenAi's Gym?
body: <p>They both seem like matrix/arrays.</p>
  
  <p>I'm not much of a python guy, are these generic datatypes used within python or specific to the gym?</p>
  
  <p>I'm reading through API and still confused on what these actually are.</p>
  
  <hr>
  
  <p>For example (from the docs)</p>
  
  <pre><code>print(env.action_space)
  #&gt; Discrete(2)
  print(env.observation_space)
  #&gt; Box(4,)
  </code></pre>
  
  <p>Why does the box have a trailing comma? Does this represent something.</p>
  
  <p>What's the difference between the <code>Discrete</code> data type and <code>Box</code> type?</p>
  
  <p>From what I've gathered the numbers inside are the dimensions.</p>
  
  <p>Is <code>Discrete</code> analogous to an array and <code>Box</code> analogous to a matrix?</p>