A python implementation of differentiable quality diversity.

Related tags

Miscellaneousdqd
Overview

Differentiable Quality Diversity

This repository is the official implementation of Differentiable Quality Diversity.

The project contains a modified version of pyribs a quality diversity optimization library. All MEGA variants are implemented in pyribs. The GradientEmitter implements both the OG-MAP-Elites and the OMG-MEGA algorithms. The GradientImprovementEmitter implements the CMA-MEGA algorithm.

See ribs/emitters/_gradient_emitter.py and ribs/emitters/_gradient_improvement_emitter.py.

Requirements

The project builds in Anaconda.

Here are the instructions to create the conda environment:

conda env create -f experiments/environment.yml

Next install the local copy of pyribs after activating conda:

conda activate dqdexps
pip3 install -e .[all]

Pretrained Models

You can download the StyleGAN pretrained models from the StyleGAN repo. Place the .pt file in the folder experiments/lsi_clip.

CLIP automatically installs with the conda environment.

Running Experiments

For each experiment you pick an identifier for the algorithm you want to run.

Quality Diversity Algorithm Identifier
MAP-Elites map_elites
MAP-Elites (line) map_elites_line
CMA-ME cma_me_imp
OG-MAP-Elites og_map_elites
OMG-MEGA omg_mega
CMA-MEGA cma_mega
CMA-MEGA (Adam) cma_mega_adam

Linear Projection (sphere)

To run an experiment with MAP-Elites:

conda activate dqdexps
cd experiments/lin_proj

python3 lin_proj.py map_elites --objective sphere

To run a different algorithm replace map_elites with another identifier from the above table.

For additional options see:

python3 lin_proj.py --help

Linear Projection (Rastrigin)

To run an experiment with MAP-Elites:

conda activate dqdexps
cd experiments/lin_proj

python3 lin_proj.py map_elites --objective Rastrigin

To run a different algorithm replace map_elites with another identifier from the above table.

For additional options see:

python3 lin_proj.py --help

Arm Repertoire

To run an experiment with MAP-Elites:

conda activate dqdexps
cd experiments/arm

python3 arm.py map_elites

To run a different algorithm replace map_elites with another identifier from the above table.

For additional options see:

python3 arm.py --help

Latent Space Illumination (LSI)

To run an experiment with MAP-Elites:

conda activate dqdexps
cd experiments/lsi_clip

python3 lsi.py map_elites 

To run a different algorithm replace map_elites with another identifier from the above table.

For additional options see:

python3 lsi.py --help

Results

The following tables contain the reported results from the DQD paper.

Linear Projection (sphere)

Quality Diversity Algorithms QD-score Coverage
MAP-Elites 1.04 1.17%
MAP-Elites (line) 12.21 14.32%
CMA-ME 1.08 1.21%
OG-MAP-Elites 1.52 1.67%
OMG-MEGA 71.58 92.09%
CMA-MEGA 75.29 100.00%
CMA-MEGA (Adam) 75.3 100.00%

Linear Projection (Rastrigin)

Quality Diversity Algorithms QD-score Coverage
MAP-Elites 1.18 1.72%
MAP-Elites (line) 8.12 11.79%
CMA-ME 1.21 1.76%
OG-MAP-Elites 0.83 1.26%
OMG-MEGA 55.90 77.00%
CMA-MEGA 62.54 100.00%
CMA-MEGA (Adam) 62.58 100.00%

Arm Repertoire

Quality Diversity Algorithms QD-score Coverage
MAP-Elites 1.97 8.06%
MAP-Elites (line) 33.51 35.79%
CMA-ME 55.98 56.95%
OG-MAP-Elites 57.17 58.08%
OMG-MEGA 44.12 44.13%
CMA-MEGA 74.18 74.18%
CMA-MEGA (Adam) 73.82 73.82%

Latent Space Illumination (LSI)

Quality Diversity Algorithms QD-score Coverage
MAP-Elites 13.88 23.15%
MAP-Elites (line) 16.54 25.73%
CMA-ME 18.96 26.18%
CMA-MEGA 5.36 8.61%
CMA-MEGA (Adam) 21.82 30.73%

See the paper and supplementary materials for full data and standard error bars.

License

pyribs and this project are both released under the MIT License.

pyribs MIT License

Owner
ICAROS
Interactive and Collaborative Autonomous Robotic Systems
ICAROS
A log likelihood fit for extracting neutrino oscillation parameters

A-log-likelihood-fit-for-extracting-neutrino-oscillation-parameters Minimised the negative log-likelihood fit to extract neutrino oscillation paramete

Vid Homsak 1 Jan 23, 2022
The calculator on Python.

Calculator Contributors: Delitanast An official website. Information Hello! I am Damir. It`s my first Python project. I think you want see this. I imp

3 Mar 13, 2022
OpenSea NFT API App using Python and Streamlit

opensea-nft-api-tutorial OpenSea NFT API App using Python and Streamlit Tutorial Video Walkthrough https://www.youtube.com/watch?v=49SupvcFC1M Instruc

64 Oct 28, 2022
This is a repository built by the community for the community.

Nutshell Machine Learning Machines can see, hear and learn. Welcome to the future 🌍 The repository was built with a tree-like structure in mind, it c

Edem Gold 82 Nov 18, 2022
Python Classes Without Boilerplate

attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka d

The attrs Cabal 4.6k Jan 02, 2023
Percolation simulation using python

PythonPercolation Percolation simulation using python Exemple de percolation : Etude statistique sur le pourcentage de remplissage jusqu'à percolation

Tony Chouteau 1 Sep 08, 2022
Excel cell checker with python

excel-cell-checker Description This tool checks a given .xlsx file has the struc

Paul Aumann 1 Jan 04, 2022
Type Persian without confusing words for yourself and others, in Adobe Connect

About In the Adobe Connect chat section, to type in Persian or Arabic, the written words will be confused and will be written and sent illegibly (This

Matin Najafi 23 Nov 26, 2021
addons to the turtle package that help you drew stuff more quickly

TurtlePlus addons to the turtle package that help you drew stuff more quickly --------------

1 Nov 18, 2021
Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Grzegorz Śliwiński 4 Nov 20, 2022
Pre-1.0 door/chest sound injector for Minecraft

doorjector Pre-1.0 door/chest sound injector for Minecraft. While the game is running, doorjector hotswaps the new sounds for the old right before the

Sam 1 Nov 20, 2021
Streamlit Component, for a Chatbot UI

st-chat Streamlit Component, for a Chat-bot UI, example app authors - @yashppawar & @YashVardhan-AI Installation Install streamlit-chat with pip pip i

Yash AI 99 Jan 07, 2023
Arknights gacha simulation written in Python

Welcome to arknights-gacha repository This is my shameless attempt of simulating Arknights gacha. Current supported banner types (with potential bugs)

Swyrin 3 May 07, 2022
A blazing fast mass certificate generator script for the community ⚡

A simple mass certificate generator script for the community ⚡ Source Code · Docs · Raw Script Docs All you need Certificate Design a simple template

Tushar Nankani 24 Jan 03, 2023
This is a practice on Airflow, which is building virtual env, installing Airflow and constructing data pipeline (DAGs)

airflow-test This is a practice on Airflow, which is Builing virtualbox env and setting Airflow on that env Installing Airflow using python virtual en

Jaeyoung 1 Nov 01, 2021
Drop-down terminal for GNOME

Guake 3 README Introduction Guake is a python based dropdown terminal made for the GNOME desktop environment. Guake's style of window is based on an F

Guake 4.1k Dec 25, 2022
Skull shaped MOSFET cells for the Efabless's 130nm process

SkullFET Skull shaped MOSFET cells for the Efabless's 130nm process List of cells Inverter Copyright (C) 2021 Uri Shaked

Wokwi 3 Dec 14, 2022
The Zig programming language, packaged for PyPI

Zig PyPI distribution This repository contains the script used to repackage the releases of the Zig programming language as Python binary wheels. This

Zig Programming Language 100 Nov 04, 2022
Pylexa - Artificial Assistant made with Python

Pylexa - Artificial Assistant made with Python Alexa is a famous artificial assistant used massively across the world. It is a substitute of Alexa whi

\_PROTIK_/ 4 Nov 03, 2021
This is the repo for Uncertainty Quantification 360 Toolkit.

UQ360 The Uncertainty Quantification 360 (UQ360) toolkit is an open-source Python package that provides a diverse set of algorithms to quantify uncert

International Business Machines 207 Dec 30, 2022