Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
oorrja
GitHub Repository: oorrja/learntosolveit
Path: blob/master/source/python/algorithm_cellauto.rst
1241 views
=================
Cellular Automata
=================

Question
--------

This generates a beautiful cellular automata pattern, following the rules of cellular automata evolution.


..image:: https://lh4.googleusercontent.com/_ny1HYbb2lDw/Tazon5TsgXI/AAAAAAAAKgU/ud6v_XhcHB0/s288/bs.png


Solution
--------

.. literalinclude:: ../../languages/python/algorithm_cellauto.py
   :language: python
   :tab-width: 4

.. runcode:: ../../languages/python/algorithm_cellauto.py
   :language: python
   :codesite: ideone

Explanation
===========





.. seealso::

   * :python-suggest-improve:`algorithm_cellauto.py`
   * :python-better-explain:`algorithm_cellauto.rst`