{ "info": { "author": "Julien Tayon", "author_email": "julien@tayon.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "complete doc: http://gof.readthedocs.org/en/latest/\nsource : https://github.com/jul/game_of_life\nticketing : https://github.com/jul/game_of_life/issues\n\n\ngame_of_life\n============\n\nhttp://en.wikipedia.org/wiki/Conway%27s_Game_of_Life\n\nMotivation\n==========\n\nhttp://beauty-of-imagination.blogspot.fr/2012/05/teachers-stop-misleading-your-students.html\n\njust for fun\n\nDirect in the fun\n=================\n\nQuick install\n*************\nFirst install the package either from github\n git clone git://github.com/jul/game_of_life.git\n\nAnd do what you have to do :)\n\nOr\n pip install gof\n\nI made a package to write less docs.\n\nTo dive directly in the core of the topic \n python -i -mgof.demo\n\nYou'll have a *pseudo* animation (could work on windows, but I am lazy), of a \ncellular automata. But this is not fun, you have to manipulate to really have \nfun.\n\nSince you use *python -i* at the end of the demo you are left with an\ninteractive session\n\n*New*: \n ipython -i mgof.demo2\n\nA console for seeing what happens if you change 5 bits of the turing machine \ndescribing a conway rule. \n\n\nQuick tour\n**********\n\nLet's use all the functions: \n\nFirst seeing is believing\n >>> print grid\n ' ' \n -..............\n ..............\n ..............\n ..............\n ..............\n -...X..........\n ...X..........\n ...X..........\n ..............\n XX...XXX.....X\n -..............\n ...X..........\n ...X..........\n ...X..........\n ..............\n -..............\n\nSo I may have overloaded __str__ so that you have a matrix. \nIf you want to know more about the grid object\n\n >>> help(grid)\n\nIt does not tells you : grid.size_x, grid._size_y are attributes where\nthe dimension of the matrix are stored.\n\nNow, you want to clean the matrix, to play\n\n >>> bleach(grid, 20,40)\n >>> print grid\n\nThis should show you a nice empty grid.\n\nBefore you play the game of life, you want to draw patterns on your grid. \n(The one I defined are not exhautive, you can draw your own.)\nLet's add a glider, an oscillator, and a fixed block\n\n >>> at(grid, 10,20, glider)\n >>> at(grid, 5,5, oscillator)\n >>> at(grid, 15,25, still)\n\nand see the result \n >>> print grid\n ' ' ' ' ' ' ' ' \n -........................................\n ........................................\n ........................................\n ........................................\n ........................................\n -.....XXX................................\n ........................................\n ........................................\n ........................................\n ........................................\n -....................X.X.................\n ......................X.................\n .....................XX.................\n ........................................\n ........................................\n -.........................XX.............\n .........................XX.............\n ........................................\n ........................................\n ........................................\nlet's see how it evolves \n >>> evolve(grid, 10, 5)\n\nnot stable yet? Let's play 10 more iterations, slower\n >>> evole(grid, 10, 2)\n\nBoring, want more surprises?\n >>> bleach(grid, 20,40, Bitmap(1<<20*40))\n >>> dirty(grid, 10)\nIt adds pattern randomly on the grid\n\nThen, just sit back and play 200 iterations at 5 times the slow speed\n >>> evolve(grid, 200,5)\n\nYou may have stable result around 100-200 iterations. \nWhat it the Bitmap by the way ? \n\nWell, then fun part is matrix is just a view on anything that looks like \na mutable sequence, and an int is a mutable sequence of bits, no ? \n\nWhen (and only when) using Bitmap you can make\n >>> print \"{0:b}\".format(grid.matrix._int)\n 100000000110000000000000000000000000011100000000000000000101100000100000000000011000001000000000001000000010000000000010000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000100000000000000000001010000001110000000000000000000000000111000000010000010001000000000100000100010100000001000001000100000000000001100001000000000001111000000000000000000000000000000000000000000000000000000001000000000000000000010000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000\n\nThe quickstart is other :) \n\nHave fun\n\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/gof/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://gof.readthedocs.org/", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "gof", "package_url": "https://pypi.org/project/gof/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gof/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://gof.readthedocs.org/" }, "release_url": "https://pypi.org/project/gof/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "a little fun with Conway's Game Of Life", "version": "0.1.2" }, "last_serial": 1246416, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "dce74586be4686aa43835ceaddfca57e", "sha256": "520da53619ec99db28161dfbec89bf074525080e12ef6ba79d00c4b0520d620c" }, "downloads": -1, "filename": "gof-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dce74586be4686aa43835ceaddfca57e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8246, "upload_time": "2012-06-13T15:05:08", "url": "https://files.pythonhosted.org/packages/7e/1d/4c94be700663185577af6f9ae7f3bb956cbb7f34d05a36aa38d338472fd6/gof-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7eb737001ee000308bb18f3fb8943b45", "sha256": "ba8261f63712cdfb0f2b686b0270c662ec64845c424cc81ad87fb94e16a07e6a" }, "downloads": -1, "filename": "gof-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7eb737001ee000308bb18f3fb8943b45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8730, "upload_time": "2014-10-02T19:47:00", "url": "https://files.pythonhosted.org/packages/23/fa/7a44250fe584f000a31c41283479070496618fa04fd089f694ffb43bbdbf/gof-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8445ac11d34829cd94f52625d8d99e90", "sha256": "eda9c1d13ac0bf88287118bcaaaf20da39a2809fe30ac03ce2bbb5878cd2ac50" }, "downloads": -1, "filename": "gof-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8445ac11d34829cd94f52625d8d99e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9065, "upload_time": "2014-10-03T00:42:54", "url": "https://files.pythonhosted.org/packages/9d/1a/27968c588aeecaaf104f0faad3913c5120224c15a7edf04875dced4e4bda/gof-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8445ac11d34829cd94f52625d8d99e90", "sha256": "eda9c1d13ac0bf88287118bcaaaf20da39a2809fe30ac03ce2bbb5878cd2ac50" }, "downloads": -1, "filename": "gof-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8445ac11d34829cd94f52625d8d99e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9065, "upload_time": "2014-10-03T00:42:54", "url": "https://files.pythonhosted.org/packages/9d/1a/27968c588aeecaaf104f0faad3913c5120224c15a7edf04875dced4e4bda/gof-0.1.2.tar.gz" } ] }