samples icon indicating copy to clipboard operation
samples copied to clipboard

Conway's game of life: algorithm for animation does not consider state

Open thomasw-mitutoyo-ctl opened this issue 4 years ago • 0 comments

Conway's game of life: algorithm for animation does not consider state

The algorithm mutates the state of the field while calculating the neighbors. This is incorrect. The previous state of the cells must be treated as immutable. As a result, the animation is wrong. For example, the 4x4 square should completely disappear after 4 cycles.

The animation needs to work on a second instance of the Animation object.


Issue metadata

  • Issue type: sample-update

thomasw-mitutoyo-ctl avatar Mar 31 '21 13:03 thomasw-mitutoyo-ctl