title: Game Of Life : How to keep track of active cells
body: <p>Now I have read the other stackoverflow Game of Life questions and also Googled voraciously.I know what to do for my Python implementation of the Game Of Life.I want to keep track of the active cells in the grid.The problem is I'm stuck at how should I code it.<br>
  Here's what I thought up but I was kinda at my wit's end beyond that:  </p>
  
  <ul>
  <li>Maintain a ActiveCell list consisting of cell co-ordinates tuples which are active<br>
  dead or alive.</li>
  <li>When computing next generation , just iterate over the ActiveCell list,compute cell
  state and check whether state changes or not.  </li>
  <li>If state changes , add all of the present cells neighbours to the list  </li>
  <li>If not , remove that cell from the list  </li>
  <li>Now the problem  is : (" . "--> other cell)<br>
         <code>B C D<br>
          . A .<br>
          . . .</code><br>
  If A satisfies 3)  then it adds B,C,D<br>
  then if B also returns true for 3) ,which means it will add A,C again
  (Duplication)  </li>
  </ul>
  
  <p>I considered using OrderedSet or something to take care of the order and avoid duplication.But still these I hit these issues.I just need a direction.</p>