Skip to main content

Package qdpy implements recent Quality-Diversity algorithms: Map-Elites, CVT-Map-Elites, NSLC, SAIL, etc. QD algorithms can be accessed directly, but qdpy also includes building blocks that can be easily assembled together to build your own QD algorithms. It can be used with parallelism mechanisms and in distributed environments.

This package requires Python 3.6+.

qdpy includes the following features:
  • Generic support for diverse Containers: Grids, Novelty-Archives, Populations, etc

  • Optimisation algorithms for QD: random search methods, quasi-random methods, evolutionary algorithms

  • Support for multi-objective optimisation methods

  • Possible to use optimisation methods not designed for QD, such as [CMA-ES](https://arxiv.org/pdf/1604.00772.pdf)

  • Parallelisation of evaluations, using parallelism libraries, such as multiprocessing, concurrent.futures or [SCOOP](https://github.com/soravux/scoop)

  • Easy integration with the popular [DEAP](https://github.com/DEAP/deap) evolutionary computation framework

Install

qdpy requires Python 3.6+. It can be installed with:

pip3 install qdpy

qdpy includes optional features that need extra packages to be installed:
  • cma for CMA-ES support

  • deap to integrate with the DEAP library

  • tables to output results files in the HDF5 format

  • tqdm to display a progress bar showing optimisation progress

  • colorama to add colours to pretty-printed outputs

You can install qdpy and all of these optional dependencies with:

pip3 install qdpy[all]

The latest version can be installed from the GitLab repository:

pip3 install git+https://gitlab.com/leo.cazenille/qdpy.git@master

Example

From a python shell:

from qdpy import algorithms, containers, benchmarks, plots

# Create container and algorithm. Here we use MAP-Elites, by illuminating a Grid container by evolution.
grid = containers.Grid(shape=(64,64), max_items_per_bin=1, fitness_domain=((0., 1.),), features_domain=((0., 1.), (0., 1.)))
algo = algorithms.RandomSearchMutPolyBounded(grid, budget=60000, batch_size=500,
        dimension=3, optimisation_task="maximisation")

# Create a logger to pretty-print everything and generate output data files
logger = algorithms.AlgorithmLogger(algo)

# Define evaluation function
eval_fn = algorithms.partial(benchmarks.illumination_rastrigin_normalised,
        nb_features = len(grid.shape))

# Run illumination process !
best = algo.optimise(eval_fn)

# Print results info
print(algo.summary())

# Plot the results
plots.default_plots_grid(logger)

print("All results are available in the '%s' pickle file." % logger.final_filename)

Usage, Documentation

Please to go the GitLab repository main page (https://gitlab.com/leo.cazenille/qdpy) and the documentation main page (https://leo.cazenille.gitlab.io/qdpy/).

Author:

Leo Cazenille, 2018-*

License:

LGPLv3, see LICENSE file.

Metadata

Release files for qdpy 0.1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qdpy 0.1.2.2
File Size Uploaded Provenance Actions
qdpy-0.1.2.2.tar.gz 937.5 kB Without provenance Details for qdpy-0.1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qdpy 0.1.2.2
File Interpreter ABI Platform Actions
qdpy-0.1.2.2-py3-none-any.whl Python 3 none any Details for qdpy-0.1.2.2-py3-none-any.whl

Total release size: 1.8 MB

Release files / qdpy-0.1.2.2.tar.gz

Download URL qdpy-0.1.2.2.tar.gz
Size 937.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f9a8ee566f5b695123bc157be1179488bd311b1ac734a786796d0430f363c32f
BLAKE2b-256 checksum
How to use checksums
75c956c6ba7e0678e26af27956e50e07085ea91bf2250646204c62b87408f154
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / qdpy-0.1.2.2-py3-none-any.whl

Download URL qdpy-0.1.2.2-py3-none-any.whl
Size 848.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce406636253a37c4e16889b5e01b5eb004a138d69b0f82b735216abcc34847bf
BLAKE2b-256 checksum
How to use checksums
bf74b2428cf484151c636c52e7ff857347fffa1807dffe079e0f2cc5ba28b82d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for qdpy 0.1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page