Skip to main content

DeapSleep is a DEAP-based evolutionary computation toolkit for testing dropout in genetic algorithms

Project description

DeapSleep

DeapSleep is a DEAP-based evolutionary computation toolkit for testing dropout in genetic algorithms (GAs). Random deactivation of individuals or decision variables might serve as diversity-induction mechanism, improving the algorithm’s ability to navigate rugged fitness landscapes with multiple peaks and valleys. The toolkit provides a GUI for easily optimize, plot and compare the results of optimization using a vanilla or dropout-based GA. DeapSleep is fully Dockerized, but using Docker is optional, as it can also be run directly from the command line.

DeapSleep includes the following features:

  • Genetic Algorithm using DEAP implementation
  • Single and multi-objective optimization (NSGA-II, NSGA-III)
  • Hall of Fame (Hof) of the best found individuals
  • Pymoo benchmark functions and corresponding internal .yaml configurations
  • An interactive GUI for:
    • optimizing benchmark functions or custom problems using
      • vanilla GAs
      • individual dropout (IDrop), i.e. decision variables deactivation
      • population dropout (PDrop), i.e. complete individuals deactivation
      • both (I&PDrop)
    • plotting converge-to-target results and HoF statistics over n runs
    • comparing vanilla GAs vs dropout versions

Disclaimer: at the moment, DeapSleep does not allow to use custom problems.

Installation

1. Docker installation (necessary for using the GUI)

Clone the repository

git clone https://github.com/dganci/deapsleep.git
cd deapsleep

Build the image

docker build -t deapsleep .

Run the container (and save the results in <YOUR_DIRECTORY>

docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v "<YOUR_DIRECTORY>:/app/results" deapsleep

2. Python installation

Clone the repository

git clone https://github.com/dganci/deapsleep.git
cd deapsleep

We recommend to use a virtual environment, e.g.

python -m venv venv
# Linux/macOS
source venv/bin/activate

Then

pip install -r requirements.txt

Examples of usage:

  • for optimization
python3 -m deapsleep.main.optimize --config single.ackley -i --version='baseline_example' --n_runs=10 --ngen=200
python3 -m deapsleep.main.optimize --config single.rastrigin -i --version='I&PDrop_example' --n_runs=30 --ngen=1000 --n_var=10 --popD_rate=0.7 --indD_rate=0.2
  • for plotting
python3 -m deapsleep.main.plot --problem griewank --version='baseline_example' --dirname="${PWD}/results"
  • for comparison
python3 -m deapsleep.main.compare --config multi.zdt1 -i --version1='baseline_example' --version2='IDrop_example'

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

deapsleep-1.0.0.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deapsleep-1.0.0-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file deapsleep-1.0.0.tar.gz.

File metadata

  • Download URL: deapsleep-1.0.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for deapsleep-1.0.0.tar.gz
Algorithm Hash digest
SHA256 00fbf4a2336c871c62b13971492c5a886993a56ced3ff918dc2625e53ef5f12e
MD5 479305d2a175fdacd9e55c310ba5eb8f
BLAKE2b-256 460b42997cb08c1d481e76c2f30fe9d4017d1a7c6338e6b2e2ac66ec792297a7

See more details on using hashes here.

File details

Details for the file deapsleep-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: deapsleep-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for deapsleep-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cd89515bf925ecd0980a37facb15901750d350595c1de3ce68752deb2608853
MD5 fc972d07670ceb519ca856e5a292a062
BLAKE2b-256 9fa397180da1b4542c92568d74df20a1bf76beafc8d7fe42ca16903d44c8f211

See more details on using hashes here.

Supported by

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