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
Building an Investment Portfolio for Day Trade with Python

Montando um Portfólio de Investimentos para Day Trade com Python Instruções: Para reproduzir o projeto no Google Colab, faça o download do repositório

Paula Campigotto 9 Oct 26, 2021
A Linux webcam plugin for BGMv2 as used in our demos.

The goal of this repository is to supplement the main Real-Time High Resolution Background Matting repo with a working demo of a videoconferencing plu

Andrey Ryabtsev 144 Dec 27, 2022
python based clash stars made by grade 7 and 5

clash_stars python based clash stars made by grade 7 and 5 How to play: PLAYER ONE (LEFT PLAYER) Move: W,A,S,D Shoot: SHIFT PLAYER TWO (RIGHT PLAYER)

5 Oct 22, 2021
take home quiz

guess the correlation data inspection a pretty normal distribution train/val/test split splitting amount .dataset: 150000 instances ├─8

HR Wu 1 Nov 04, 2021
Craxk is a SINGLE AND NON-REPLICABLE Hash that uses data from the hardware where it is executed to form a hash that can only be reproduced by a single machine.

What is Craxk ? Craxk is a UNIQUE AND NON-REPLICABLE Hash that uses data from the hardware where it is executed to form a hash that can only be reprod

5 Jun 19, 2021
The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.

Records what you do so that you can know how you've spent your time. All in a secure way where you control the data. Website — Forum — Documentation —

ActivityWatch 7.8k Jan 09, 2023
:snake: Complete C99 parser in pure Python

pycparser v2.20 Contents 1 Introduction 1.1 What is pycparser? 1.2 What is it good for? 1.3 Which version of C does pycparser support? 1.4 What gramma

Eli Bendersky 2.8k Dec 29, 2022
Powerful Assistant

Delta-Assistant Hi I'm Phoenix This project is a smart assistant This is the 1.0 version of this project I am currently working on the third version o

1 Nov 17, 2021
To effectively detect the faulty wafers

wafer_fault_detection Aim of the project: In electronics, a wafer (also called a slice or substrate) is a thin slice of semiconductor, such as crystal

Arun Singh Babal 1 Nov 06, 2021
Simple Python Gemini browser with nice formatting

gg I wasn't satisfied with any of the other available Gemini clients, so I wrote my own. Requires Python 3.9 (maybe older, I haven't checked) and opti

Sarah Taube 2 Nov 21, 2021
Streamlit — The fastest way to build data apps in Python

Welcome to Streamlit 👋 The fastest way to build and share data apps. Streamlit lets you turn data scripts into sharable web apps in minutes, not week

Streamlit 22k Jan 06, 2023
ColabFold / AlphaFold2_advanced on your local PC (or macOS)

LocalColabFold ColabFold / AlphaFold2_advanced on your local PC (or macOS) Installation For Linux Make sure curl and wget commands are already install

Yoshitaka Moriwaki 207 Dec 22, 2022
Store Simulation

Almacenes Para clonar el Repositorio: Vaya a la terminal de Linux o Mac, o a la cmd en Windows y ejecute:

Johan Posada 1 Nov 12, 2021
Stop python warnings, no matter what!

SHUTUP - Stop python warnings, no matter what! Sometimes you just can't mute python warnings. Use this library to solve this. Installation pip install

80 Jan 04, 2023
Python binding to rust zw-fast-quantile

zw_fast_quantile_py zw-fast-quantile python binding Installation pip install zw_fast_quantile_py Usage import zw_fast_quantile_py

Paul Meng 1 Dec 30, 2021
A Web app to Cross-Seed torrents in Deluge/qBittorrent/Transmission

SeedCross A Web app to Cross-Seed torrents in Deluge/qBittorrent/Transmission based on CrossSeedAutoDL Require Jackett Deluge/qBittorrent/Transmission

ccf2012 76 Dec 19, 2022
PREFS is a Python library to store and manage preferences and settings.

PREFS PREFS is a Python library to store and manage preferences and settings. PREFS stores a Python dictionary in a total human-readable file, the PRE

Pat 13 May 26, 2022
Age of Empires II recorded game parsing and summarization in Python 3.

mgz Age of Empires II recorded game parsing and summarization in Python 3. Supported Versions Age of Kings (.mgl) The Conquerors (.mgx) Userpatch 1.4

148 Dec 11, 2022
OLDBot (Online Lessons Discord Bot)

This program is designed to facilitate online lessons. With this you don't need to get up early. Just config and watch the program resolve itself. It automatically enters to the lesson at the specifi

Da4ndo 1 Nov 21, 2021
Este software fornece interface gráfica para o escputil e tem por finalidade testar e fazer limpeza no cabeçote de impressão....

PrinterTools O que é PrinterTools? PrinterTools é uma ferramenta gráfica que usa o escputil para testar e fazer limpeza de cabeçote de impressão em si

Elizeu Barbosa Abreu 1 Dec 21, 2021