{ "info": { "author": "Ralf Schlatterbeck", "author_email": "rsc@runtux.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: C", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "\n.. |--| unicode:: U+2014 .. em dash\n\n:Author: Ralf Schlatterbeck \n\nPGAPy is a wrapper for pgapack, the parallel genetic algorithm library\n(see `pgapack Readme`_), a powerfull genetic algorithm library by\nD. Levine, Mathematics and Computer Science Division Argonne National\nLaboratory. The library is written in C. PGAPy wraps this library for\nuse with Python. The original pgapack library is already quite old but\nis one of the most complete and accurate (and fast, although this is not\nmy major concern when wrapping it to python) genetic algorithm\nimplementations out there with a lot of bells and whistles for\nexperimentation. It also has shown a remarkably small number of bugs\nover the years. It supports parallel execution via the message\npassing interface MPI_ in addition to a normal \"serial\" version. That's\nwhy I wanted to use it in Python, too.\n\nThere currently is not much documentation for PGAPy.\nYou really, absolutely need to read the documentation that comes\nwith pgapack |--| and of course you need the pgapack library.\n\nThe original pgapack library can still be downloaded from the pgapack_\nftp site, it is written in ANSI C and therefore *should* run on most\nplatforms. Note that this version is not very actively maintained. I've\nstarted a `pgapack fork on github`_ where I've ported the library to the\nlatest version of the MPI_ standard and have fixed some minor\ninconsistencies in the documentation.\n\nI have tested pgapy on Linux only and I'll currently not provide Windows\nversions. You also can find my `pgapack fork on github`_ this\nrepository has the three upstream releases as versions in git and\ncontains some updates concerning support of newer MPI_ versions and\ndocumentation updates. I've also included patches in the git repository\nof the Debian maintainer of the package, Dirk Eddelbuettel.\n\n.. _`pgapack Readme`: http://ftp.mcs.anl.gov/pub/pgapack/README\n.. _pgapack: http://ftp.mcs.anl.gov/pub/pgapack/\n.. _`pgapack fork on github`: https://github.com/schlatterbeck/pgapack\n.. _MPI: http://mpi-forum.org/\n\nFor the Debian Linux distribution, pgapack is included in oldstable\n(jessie), you can still install this in the current stable release\n(stretch). This version does not yet include the fixes for newer MPI_\nversions and documentation updates.\n\nFor debian the pre-built documentation is in\n``/usr/share/doc/pgapack/user_guide.ps.gz``\n\nTo get you started, I've included some very simple examples in\n``examples``, e.g., ``one-max.py`` implements the \"Maxbit\" example\nsimilar to one in the pgapack documentation. The examples were inspired\nby the book \"Genetic Algorithms in Python\" but are written from scratch\nand don't include any code from the book. The examples illustrates\nseveral points:\n\n - Your class implementing the genetic algorithm needs to inherit from\n pga.PGA (pga is the PGAPy wrapper module).\n - You need to define an evaluation function called ``evaluate`` that\n returns a number indicating the fitness of the gene given with the\n parameters ``p`` and ``pop`` that can be used to fetch allele values from\n the gene using the ``get_allele`` method, for more details refer to the\n pgapack documentation.\n - You *can* define additional functions overriding built-in functions\n of the pgapack library, illustrated by the example of\n ``print_string``. Note that we could call the original print_string\n method of our PGA superclass. In the same way you can implement,\n e.g., your own crossover method.\n - The constructor of the class needs to define the Gene type, in the\n examples we use int and bool built-in datatypes.\n - The length of the gene needs to be given in the constructor.\n - We often want to maximize the numbers returned by our evaluation\n function, set the parameter ``maximize`` to False if you want to\n minimize.\n - We can define an array of init values, each entry containing a sequence\n with lower and upper bound. The array has to have the length of the\n gene. Note that the upper bound is *included* in the range of\n possible values (unlike the python range operator but compatible with\n the pgapack definition).\n - In the constructor of the class we can add parameters of the genetic\n algorithm. Not all parameters of pgapack are wrapped yet, currently\n you would need to consult the sourcecode of PGAPy to find out which\n parameters are wrapped. In the example we define several print\n options.\n - Finally the genetic algorithm is started with the ``run`` method.\n\nNaming conventions in PGAPy\n---------------------------\n\nWhen you extend PGAPy |--| remember not all functions of pgapack are\nwrapped yet and you may need additional functions |--| you should stick to\nmy naming conventions when making changes.\nThe following naming conventions were used for the wrapper:\n\n - Constants of pgapack like ``PGA_REPORT_STRING`` are used as-is in\n uppercase. These constants can be directly imported from the wrapper\n module. Not all constants are wrapped so far, if you need more, add\n them to the constdef array in pgamodule.c and send_ me a patch.\n - For methods of the pga.PGA class I've removed the ``PGA`` prefix used\n throughout pgapack and converted the method to lowercase with\n underscores between uppercase words in the original function name, so\n ``PGARun`` becomes ``run``, ``PGACheckStoppingConditions`` becomes\n ``check_stopping_conditions``.\n - Where possible I've made a single class method where pgapack needs a\n separate function for each datatype, so ``PGAGetBinaryAllele``,\n ``PGAGetCharacterAllele``, ``PGAGetIntegerAllele``, ``PGAGetRealAllele`` all\n become ``get_allele``. Same holds true for ``set_allele``.\n - Internal method names in the wrapper program have a leading PGA\\_ |--| so\n the class method ``set_allele`` is implemented by the C-function\n ``PGA_set_allele`` in ``pgamodule.c``.\n\nMissing Features\n----------------\nAs already mentioned, not all functions and constants of pgapack are\nwrapped yet |--| still for many applications the given set should be\nenough. If you need additional functions, you may want to wrap these and\nsend_ me a patch.\n\nAnother feature of pgapack is currently not implemented in the wrapper,\nthe usage of custom datatypes. With pgapack you can define your own\ndatatypes complete with their custom implementations of the genetic\nalgorithm functionality like crossover, mutation, etc. I don't expect\nproblems implementing these, though.\n\nReporting Bugs\n--------------\nPlease use the `Sourceforge Bug Tracker`_ or the `Github Bug Tracker`_ and\n\n - give a short description of what you think is the correct behaviour\n - give a description of the observed behaviour\n - tell me exactly what you did.\n - if you can publish your source code this makes it a lot easier to\n debug for me\n\n.. _`Sourceforge Bug Tracker`:\n http://sourceforge.net/tracker/?group_id=152022&atid=782852\n.. _`Github Bug Tracker`:\n https://github.com/schlatterbeck/pgapy/issues\n.. _send: mailto:rsc@runtux.com\n\nResources\n---------\n\nProject information and download from `Sourceforge main page`_\n\n.. _`Sourceforge main page`: http://sourceforge.net/projects/pgapy/\n\nor checkout from Github_\n\n.. _`Github`: http://github.com/schlatterbeck/pgapy\n\nor directly install via pypi.\n\nChanges\n-------\n\nVersion 0.3: Feature enhancements, Bug fixes\n\nPort to Python3, Python2 is still supported, license change.\n\n - C-Code of wrapper updated to support both, Python2 and Python3\n - Update documentation\n - Fix some memory leaks that could result when errors occurred during\n some callback methods\n - License change: We now have the 2-clause BSD license (similar to the\n MPICH license of pgapack), this used to be LGPL.\n\nVersion 0.2: Feature enhancements, Bug fixes\n\n64 bit support, more pgapack functions and attributes wrapped,\nReadme-update: Sourceforge logo, Changes chapter.\n\n - Bug-fixes for 64 bit architectures\n - More functions and attributes of pgapack wrapped\n - Add a build-rule to setup.py to allow building for standard-install\n of pgapack |--| this currently needs editing of setup.py |--| should use\n autodetect here but this would require that I set up a machine with\n standard install of pgapack for testing.\n - Add Sourceforge logo as required\n - Add Changes chapter for automagic releases\n\nVersion 0.1: Initial freshmeat announcement\n\nPGAPy is a wrapper for pgapack, the parallel genetic algorithm library,\na powerful genetic algorithm library. PGAPy wraps this library for use\nwith Python. Pgapack is one of the most complete and accurate genetic\nalgorithm implementations out there with a lot of features for\nexperimentation.\n\n - Initial Release\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pgapy.sourceforge.net/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "PGAPy", "package_url": "https://pypi.org/project/PGAPy/", "platform": "", "project_url": "https://pypi.org/project/PGAPy/", "project_urls": { "Homepage": "http://pgapy.sourceforge.net/" }, "release_url": "https://pypi.org/project/PGAPy/0.3/", "requires_dist": null, "requires_python": "", "summary": "Python wrapper for pgapack, the parallel genetic algorithm library", "version": "0.3" }, "last_serial": 3146054, "releases": { "0.1": [], "0.3": [ { "comment_text": "", "digests": { "md5": "e108ad2e7f8a3739214ec6a6527b07ac", "sha256": "112c381b2ceffed222c96562f2eff672328d7617540be23c47d7cc8f1ab17188" }, "downloads": -1, "filename": "PGAPy-0.3.tar.gz", "has_sig": false, "md5_digest": "e108ad2e7f8a3739214ec6a6527b07ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20390, "upload_time": "2017-09-03T20:31:31", "url": "https://files.pythonhosted.org/packages/86/ea/3444ac8e770e2be45ed4b7c0b231237ca039cc08095ccfe97f26bff3e4f4/PGAPy-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e108ad2e7f8a3739214ec6a6527b07ac", "sha256": "112c381b2ceffed222c96562f2eff672328d7617540be23c47d7cc8f1ab17188" }, "downloads": -1, "filename": "PGAPy-0.3.tar.gz", "has_sig": false, "md5_digest": "e108ad2e7f8a3739214ec6a6527b07ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20390, "upload_time": "2017-09-03T20:31:31", "url": "https://files.pythonhosted.org/packages/86/ea/3444ac8e770e2be45ed4b7c0b231237ca039cc08095ccfe97f26bff3e4f4/PGAPy-0.3.tar.gz" } ] }