title: Disabling alias for yaml file in python
body: <p>I have a problem that I wish to prevent aliases from occurring in my YAML file. Is there anyway I can disable the aliases in the YAML file generated, to achieve the intended output?</p>
  
  <p>The current YAML file I have is this below:</p>
  
  <pre><code>agents:
  -   start: [0, 0]
      goal: [2, 0]
      name: agent0
  -   start: [2, 0]
      goal: [0, 0]
      name: agent1
  map:
      dimensions: [3, 3]
      obstacles:
      - !!python/tuple [0, 1]
      - !!python/tuple [2, 1]
  </code></pre>
  
  <p>As I updating the YAML file for each of the agents whenever they reached their goal point with the value of the goal to the start, I will encounter this problem of alias being the value of the start and goal value instead of the value I want, i.e. <code>[0,0]</code> for start, <code>[0,0]</code> for goal.</p>
  
  <pre><code>agents:
  - start: &amp;id001 [2, 0]
    goal: *id001
    name: agent0
  - start: &amp;id002 [0, 0]
    goal: *id002
    name: agent1
  map:
    dimensions: [3, 3]
    obstacles:
    - !!python/tuple [0, 1]
    - !!python/tuple [2, 1]
  </code></pre>
  
  <p>Intended output:</p>
  
  <pre><code>agents:
  - start: [2, 0]
    goal: [2, 0]
    name: agent0
  - start: [0, 0]
    goal: [0, 0]
    name: agent1
  map:
    dimensions: [3, 3]
    obstacles:
    - !!python/tuple [0, 1]
    - !!python/tuple [2, 1]
  </code></pre>
  
  <p>I have following code that I run in Python to update the file:</p>
  
  <pre><code>def updateInput(self, agent):
          yaml = ruamel.yaml.YAML()
          with open('input.yaml') as f:
              doc = yaml.load(f)
              self.get_updated_dict(doc, agent)
  
          with open('input.yaml', 'w') as y:
              yaml.dump(doc, y)
  
          return {}
  </code></pre>
  
  <pre><code>    def get_updated_dict(self, doc, agent):
          obj = doc
          if obj["agents"][0]["name"] == agent:
              goal_state = obj["agents"][0]["goal"]
              obj["agents"][0]["start"] = goal_state   
          return doc
  </code></pre>