https://github.com/adaptive-intelligent-robotics/qdax
Accelerated Quality-Diversity
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org, ieee.org, acm.org -
✓Committers with academic emails
6 of 18 committers (33.3%) from academic institutions -
✓Institutional organization owner
Organization adaptive-intelligent-robotics has institutional domain (www.imperial.ac.uk) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.0%) to scientific vocabulary
Keywords
Repository
Accelerated Quality-Diversity
Basic Info
- Host: GitHub
- Owner: adaptive-intelligent-robotics
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://qdax.readthedocs.io/en/latest/
- Size: 9.31 MB
Statistics
- Stars: 313
- Watchers: 6
- Forks: 55
- Open Issues: 30
- Releases: 9
Topics
Metadata Files
README.md
QDax: Accelerated Quality-Diversity
QDax is a tool to accelerate Quality-Diversity (QD) and neuroevolution algorithms through hardware accelerators and massive parallelization. QD algorithms usually take days/weeks to run on large CPU clusters. With QDax, QD algorithms can now be run in minutes! ⏩ ⏩ 🕛
QDax has been developed as a research framework: it is flexible and easy to extend and build on and can be used for any problem setting. Get started with simple example and run a QD algorithm in minutes here!
- QDax paper
- QDax documentation
Installation
QDax is available on PyPI and can be installed with:
bash
pip install qdax
To install QDax with CUDA 12 support, use:
bash
pip install qdax[cuda12]
Alternatively, the latest commit of QDax can be installed directly from source with:
bash
pip install git+https://github.com/adaptive-intelligent-robotics/QDax.git@main
Installing QDax via pip installs a CPU-only version of JAX by default. To use QDax with NVidia GPUs, you must first install CUDA, CuDNN, and JAX with GPU support.
However, we also provide and recommend using either Docker or conda environments to use the repository which by default provides GPU support. Detailed steps to do so are available in the documentation.
Basic API Usage
For a full and interactive example to see how QDax works, we recommend starting with the tutorial-style Colab notebook. It is an example of the MAP-Elites algorithm used to evolve a population of controllers on a chosen Brax environment (Walker by default).
However, a summary of the main API usage is provided below: ```python import jax import functools from qdax.core.mapelites import MAPElites from qdax.core.containers.mapelitesrepertoire import computeeuclideancentroids from qdax.tasks.arm import armscoringfunction from qdax.core.emitters.mutationoperators import isolinevariation from qdax.core.emitters.standardemitters import MixingEmitter from qdax.utils.metrics import defaultqd_metrics
seed = 42 numparamdimensions = 100 # num DoF arm initbatchsize = 100 batchsize = 1024 numiterations = 50 gridshape = (100, 100) minparam = 0.0 maxparam = 1.0 mindescriptor = 0.0 max_descriptor = 1.0
Init a random key
key = jax.random.key(seed)
Init population of controllers
key, subkey = jax.random.split(key) initvariables = jax.random.uniform( subkey, shape=(initbatchsize, numparamdimensions), minval=minparam, maxval=max_param, )
Define emitter
variationfn = functools.partial( isolinevariation, isosigma=0.05, linesigma=0.1, minval=minparam, maxval=maxparam, ) mixingemitter = MixingEmitter( mutationfn=lambda x, y: (x, y), variationfn=variationfn, variationpercentage=1.0, batchsize=batch_size, )
Define a metrics function
metricsfn = functools.partial( defaultqdmetrics, qdoffset=0.0, )
Instantiate MAP-Elites
mapelites = MAPElites( scoringfunction=armscoringfunction, emitter=mixingemitter, metricsfunction=metrics_fn, )
Compute the centroids
centroids = computeeuclideancentroids( gridshape=gridshape, minval=mindescriptor, maxval=maxdescriptor, )
Initializes repertoire and emitter state
key, subkey = jax.random.split(key) repertoire, emitterstate, metrics = mapelites.init(init_variables, centroids, subkey)
Jit the update function for faster iterations
updatefn = jax.jit(mapelites.update)
Run MAP-Elites loop
for i in range(numiterations): key, subkey = jax.random.split(key) (repertoire, emitterstate, metrics,) = updatefn( repertoire, emitterstate, subkey, )
Get contents of repertoire
repertoire.genotypes, repertoire.fitnesses, repertoire.descriptors ```
QDax core algorithms
QDax currently supports the following algorithms:
| Algorithm | Example |
|-------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| MAP-Elites | |
| AURORA |
|
| CVT MAP-Elites |
|
| Policy Gradient Assisted MAP-Elites (PGA-ME) |
|
| DCRL-ME |
|
| QDPG |
|
| CMA-ME |
|
| OMG-MEGA |
|
| CMA-MEGA |
|
| Multi-Objective MAP-Elites (MOME) |
|
| MAP-Elites Evolution Strategies (MEES) |
|
| MAP-Elites PBT (ME-PBT) |
|
| MAP-Elites Low-Spread (ME-LS) |
|
QDax baseline algorithms
The QDax library also provides implementations for some useful baseline algorithms:
| Algorithm | Example |
| --- | --- |
| DIAYN | |
| DADS |
|
| SMERL |
|
| NSGA2 |
|
| SPEA2 |
|
| Population Based Training (PBT) |
|
QDax Tasks
The QDax library also provides numerous implementations for several standard Quality-Diversity tasks.
All those implementations, and their descriptions are provided in the tasks directory.
Contributing
Issues and contributions are welcome. Please refer to the contribution guide in the documentation for more details.
Related Projects
- EvoJAX: Hardware-Accelerated Neuroevolution. EvoJAX is a scalable, general purpose, hardware-accelerated neuroevolution toolkit. Paper
- evosax: JAX-Based Evolution Strategies
Citing QDax
If you use QDax in your research and want to cite it in your work, please use:
@article{chalumeau2024qdax,
title={Qdax: A library for quality-diversity and population-based algorithms with hardware acceleration},
author={Chalumeau, Felix and Lim, Bryan and Boige, Raphael and Allard, Maxime and Grillotti, Luca and Flageat, Manon and Mac{\'e}, Valentin and Richard, Guillaume and Flajolet, Arthur and Pierrot, Thomas and others},
journal={Journal of Machine Learning Research},
volume={25},
number={108},
pages={1--16},
year={2024}
}
Contributors
QDax was developed and is maintained by the Adaptive & Intelligent Robotics Lab (AIRL) and InstaDeep.
Owner
- Name: Adaptive and Intelligent Robotics Lab
- Login: adaptive-intelligent-robotics
- Kind: organization
- Location: Imperial College, London
- Website: http://www.imperial.ac.uk/adaptive-intelligent-robotics
- Repositories: 24
- Profile: https://github.com/adaptive-intelligent-robotics
GitHub Events
Total
- Create event: 10
- Release event: 2
- Issues event: 28
- Watch event: 53
- Delete event: 13
- Issue comment event: 18
- Push event: 50
- Pull request review comment event: 25
- Pull request review event: 32
- Pull request event: 35
- Fork event: 10
Last Year
- Create event: 10
- Release event: 2
- Issues event: 28
- Watch event: 53
- Delete event: 13
- Issue comment event: 18
- Push event: 50
- Pull request review comment event: 25
- Pull request review event: 32
- Pull request event: 35
- Fork event: 10
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Felix Chalumeau | f****u@i****m | 53 |
| Luca Grillotti | l****i@g****m | 14 |
| Luca Grillotti | l****6@i****k | 13 |
| Bryan Lim | 4****n | 9 |
| Luca Grillotti | l****5@i****k | 9 |
| Manon Flageat | 6****s | 8 |
| bryan | b****6@i****k | 5 |
| maxiallard | m****d@y****e | 3 |
| Maxime Allard | m****0@i****k | 3 |
| Manon Flageat | m****8@i****k | 2 |
| Maxime Allard | m****0@i****k | 2 |
| Bryon Tjanaka | 3****a | 2 |
| Antoine Cully | a****y@h****m | 1 |
| Maxence Faldor | m****r@g****m | 1 |
| Thomas Pierrot | 3****m | 1 |
| Raphaël Boige | 4****b | 1 |
| David Braun | 2****n | 1 |
| limbryan | l****9@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 78
- Total pull requests: 93
- Average time to close issues: 3 months
- Average time to close pull requests: about 1 month
- Total issue authors: 21
- Total pull request authors: 18
- Average comments per issue: 0.58
- Average comments per pull request: 0.88
- Merged pull requests: 69
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 15
- Pull requests: 18
- Average time to close issues: 3 months
- Average time to close pull requests: 26 days
- Issue authors: 6
- Pull request authors: 6
- Average comments per issue: 0.0
- Average comments per pull request: 0.33
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- felixchalumeau (33)
- Lookatator (19)
- MartinMao2023 (5)
- manon-but-yes (4)
- blacksph3re (3)
- DBraun (2)
- Aneoshun (2)
- hannah-jan (2)
- limbryan (2)
- mplemay (1)
- oilyraisin (1)
- kayuksel (1)
- miltonllera (1)
- tcfuji (1)
- btjanaka (1)
Pull Request Authors
- Lookatator (33)
- felixchalumeau (28)
- manon-but-yes (10)
- LisaCoiffard (6)
- limbryan (5)
- maxencefaldor (5)
- hannah-jan (5)
- TemplierPaul (5)
- BioGeek (2)
- btjanaka (2)
- MartinMao2023 (2)
- miltonllera (2)
- mplemay (1)
- DBraun (1)
- eltociear (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 2,461 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 32
- Total maintainers: 3
proxy.golang.org: github.com/adaptive-intelligent-robotics/QDax
- Documentation: https://pkg.go.dev/github.com/adaptive-intelligent-robotics/QDax#section-documentation
- License: mit
-
Latest release: v0.5.0
published 9 months ago
Rankings
proxy.golang.org: github.com/adaptive-intelligent-robotics/qdax
- Documentation: https://pkg.go.dev/github.com/adaptive-intelligent-robotics/qdax#section-documentation
- License: mit
-
Latest release: v0.5.0
published 9 months ago
Rankings
pypi.org: qdax
A Python Library for Quality-Diversity and NeuroEvolution
- Homepage: https://github.com/adaptive-intelligent-robotics/QDax
- Documentation: https://qdax.readthedocs.io/
- License: MIT
-
Latest release: 0.5.0
published 9 months ago
Rankings
Maintainers (3)
Dependencies
- absl-py ==1.0.0
- brax ==0.0.12
- chex ==0.1.3
- dm-haiku ==0.0.5
- flax ==0.4.1
- gym ==0.23.1
- ipython *
- jax ==0.3.10
- jupyter *
- numpy ==1.22.3
- protobuf ==3.19.4
- scikit-learn ==1.0.2
- scipy ==1.8.0
- seaborn ==0.11.2
- sklearn ==0.0
- tensorflow-probability ==0.15.0
- typing-extensions ==3.10
- livereload ==2.6.3
- mkdocs ==1.2.3
- mkdocs-autorefs ==0.3.1
- mkdocs-git-revision-date-plugin ==0.3.1
- mkdocs-material ==8.2.3
- mkdocstrings ==0.18.1
- mknotebooks ==0.7.1
- coverage *
- pre-commit ==2.12.1
- pytest ==6.2.5
- pytest-assume ==2.4.3
- pre-commit ==2.12.1
- absl-py >=1.0.0
- brax >=0.0.12
- flax >=0.4.1
- gym >=0.23.1
- jax >=0.3.10
- jaxlib >=0.3.10
- numpy >=1.22.3
- scikit-learn >=1.0.2
- scipy >=1.8.0
- sklearn *
- FranzDiebold/github-env-vars-action v2 composite
- actions/checkout v2 composite
- codecov/codecov-action v2 composite
- docker/build-push-action v3 composite
- docker/login-action v2 composite
- docker/metadata-action v4 composite
- docker/setup-buildx-action v2 composite

















