Skip to main content

EasyGA is a python package designed to provide an easy-to-use Genetic Algorithm. The package is designed to work right out of the box, while also allowing the user to customize features as they see fit.

Project description

EasyGA - Genetic Algorithms made Easy

EasyGA is a python package designed to provide an easy-to-use Genetic Algorithm. The package is designed to work right out of the box, while also allowing the user to customize features as they see fit.

Check out our wiki for more information.

Installation:

Run the rolling to install:

pip3 install EasyGA

Getting started with EasyGA:

import EasyGA

# Create the Genetic algorithm
ga = EasyGA.GA()

# Evolve the whole genetic algorithm until termination has been reached
ga.evolve()

# Print out the current generation and the population
ga.print_generation()
ga.print_population()

Output:

Current Generation      : 15
Current population:
Chromosome - 0 [7][4][4][5][3][5][5][8][3][7] / Fitness = 3
Chromosome - 1 [7][4][4][5][3][5][5][8][3][7] / Fitness = 3
Chromosome - 2 [7][4][4][5][3][5][5][8][3][7] / Fitness = 3
Chromosome - 3 [7][4][4][5][3][5][5][8][3][7] / Fitness = 3
Chromosome - 4 [7][2][4][5][3][5][5][8][3][7] / Fitness = 3
Chromosome - 5 [7][2][4][5][3][5][5][8][3][7] / Fitness = 3
Chromosome - 6 [5][8][8][6][10][10][5][7][2][7] / Fitness = 2
Chromosome - 7 [5][8][8][6][10][10][5][7][2][7] / Fitness = 2
Chromosome - 8 [5][8][8][6][10][10][5][7][2][7] / Fitness = 2
Chromosome - 9 [7][2][8][10][3][5][5][8][1][7] / Fitness = 2

How Testing works

Getting started with testing

pip3 install pytest

Navigate to your EasyGA folder and run:

python3 -m pytest

Output

============================================= test session starts =========================
platform darwin -- Python 3.8.6rc1, pytest-6.0.2, py-1.9.0, pluggy-0.13.1
rootdir: /Users/github/EasyGA
collected 2 items                                                      

test_EasyGA.py ..                                                                    [100%]

============================================== 2 passed in 0.04s ==========================

This is only an example and we will create hundreds of tests so this list will become bigger and bigger.

Developing EasyGA:

If you know how to use Github and git ignore this section.

Getting started with development

To work together we plan on using github and the git framework. This is made easy with the Atom software.

Download Atom for whatever OS you have. https://atom.io/

Use the github tab to pull the github repository. Its self explanitory.

Use the run_testing.py file inside the src folder to run your code and test while we build the package.

Upload to PyPi

  1. Change version number to whatever plus 1
  2. Rename "src" folder to "EasyGA"
  3. Run these two commands
python setup.py bdist_wheel sdist // Build the package for publishing
twine upload dist/* // Upload package to PyPI

The second command requires a username and password.

Other options

Download the repository to some folder - If you never used git. Look up a youtube tutorial. It will all make sense.

git clone https://github.com/danielwilczak101/EasyGA.git

Or download as a zip file.

https://github.com/danielwilczak101/EasyGA/archive/master.zip

Use the run_testing.py file inside the src folder to run your code and test while we build the package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EasyGA-0.0.33.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

EasyGA-0.0.33-py2-none-any.whl (28.7 kB view details)

Uploaded Python 2

File details

Details for the file EasyGA-0.0.33.tar.gz.

File metadata

  • Download URL: EasyGA-0.0.33.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6rc1

File hashes

Hashes for EasyGA-0.0.33.tar.gz
Algorithm Hash digest
SHA256 ab5f7f86e7e300499ff887d3e262f570d8c708e97ee37788bb7f14c69dd99eaf
MD5 ac781d137a4eab9533591ef054c3334f
BLAKE2b-256 06a51ebddd5af00ef7a6cf394732fee033d98ee74f012124efec1e303486437c

See more details on using hashes here.

File details

Details for the file EasyGA-0.0.33-py2-none-any.whl.

File metadata

  • Download URL: EasyGA-0.0.33-py2-none-any.whl
  • Upload date:
  • Size: 28.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6rc1

File hashes

Hashes for EasyGA-0.0.33-py2-none-any.whl
Algorithm Hash digest
SHA256 8b2943a2568ba6af482f743a10eebd47ac376754c8f10187884487fad18341f0
MD5 5f7f56b63e26bdb84c2a52999fcf00b2
BLAKE2b-256 78543017d6af29766fe7921937231b0a277b89c6bae4a09e0b13ca57f93b68ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page