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
Simplest way to find Appointments in Bürgeramt Berlin, Not over engineered.

Simplest way to find Appointments in Bürgeramt Berlin, Not over engineered. Der einfachste Weg, Termine im Bürgeramt Berlin zu finden, ohne viel Schnickschnack.

Jannis 8 Nov 25, 2022
Programming in Bioinformatics, Block 3

Programming in Bioinformatics - Block 3 I. Setting up Environment and Running the Code Create the environment using the pibi_block3.yml file with the

2 Dec 10, 2021
Script that creates graphical representations of Julia an Mandelbrot sets.

Julia and Mandelbrot Picture Maker This simple functions create simple plots of the Julia and Mandelbrot sets. The Julia set require the important par

Juan Riera Gomez 1 Jan 10, 2022
TurtleBot Control App - TurtleBot Control App With Python

TURTLEBOT CONTROL APP INDEX: 1. Introduction 2. Environments 2.1. Simulated Envi

Rafanton 4 Aug 03, 2022
Sodium is a general purpose programming language which is instruction-oriented (a new programming concept that we are developing and devising) [Still developing...]

Sodium Programming Language Sodium is a general purpose programming language which is instruction-oriented (a new programming concept that we are deve

Instruction Oriented Programming 22 Jan 11, 2022
Double Pendulum implementation in Python, now with added pendulums and trails :D

Double Pendulum Using Curses in Python. A nice relaxing double pendulum simulation using ASCII, able to simulate multiple pendulums at once, and provi

Nekurone 62 Dec 14, 2022
Python library for generating CycloneDX SBOMs

Python Library for generating CycloneDX This CycloneDX module for Python can generate valid CycloneDX bill-of-material document containing an aggregat

CycloneDX SBOM Standard 31 Dec 16, 2022
Мой первый калькулятор!!!!!!

my_first_calculator Первый калькулятор созданный мною на питоне Версия калькулятора: 0.0.4 Как скачать? TERMUX Для скрипта нужен питон, скачиваем pkg

Lesha Russkiyov 2 Dec 29, 2021
Demo Python project using Conda and Poetry

Conda Poetry This is a demonstration of how Conda and Poetry can be used in a Python project for dev dependency management and production deployment.

Ryan Allen 2 Apr 26, 2022
Материалы для курса VK Углубленный Python, весна 2022

VK Углубленный Python, весна 2022 Материалы для курса VK Углубленный Python, весна 2022 Лекции и материалы (слайды, домашки, код с занятий) Введение,

10 Nov 02, 2022
Solutions for the Advent of Code 2021 event.

About 📋 This repository holds all of the solution code for the Advent of Code 2021 event. All solutions are done in Python 3.9.9 and done in non-real

robert yin 0 Mar 21, 2022
An open-source Python project series where beginners can contribute and practice coding.

Python Mini Projects A collection of easy Python small projects to help you improve your programming skills. Table Of Contents Aim Of The Project Cont

Leah Nguyen 491 Jan 04, 2023
1. 네이버 카페 댓글을 빨리 다는 기능

naver_autoprogram 기능 설명 네이버 카페 댓글을 빨리 다는 기능 네이버 카페 자동 출석 체크 기능 동작 방식 카페 댓글 기능 기본 동작은 주기적인 스케쥴 동작으로 해당 카페 ID 와 특정 API 주소로 대상이 새글을 작성했는지 체크. 해당 대상이 새글 등

1 Dec 22, 2021
Simple Crud Python vs MySQL

Simple Crud Python vs MySQL The idea came when I was studying MySQ... A desire to create a python program that can give access to a "localhost" databa

Lucas 1 Jan 21, 2022
A hackerank problems, solution repository

This is a repository for all hackerank challenges kindly note this is for learning purposes and if you wish to contribute, dont hesitate all submision

Tyler Mwalo Kenneth's 1 Dec 20, 2021
Extrator de dados do jupiterweb

Extrator de dados do jupiterweb O programa é composto de dois arquivos: Um constando apenas de classes complementares que representam as unidades e as

Bruno Aricó 2 Nov 28, 2022
Hasklig - a code font with monospaced ligatures

Hasklig – Ligatures for code Programming languages are limited to relatively few characters. As a result, combined character operators surfaced quite

Ian Tuomi 5.3k Jan 03, 2023
Structured Exceptions for Python

XC: Structured exceptions for Python XC encourages a structured, disciplined approach to use of exceptions: it reduces the overhead of declaring excep

Bob Gautier 2 May 28, 2021
Boot.img patcher for Tolino ebook readers to enable ADB and root.

I'm not responsible for any damage to your devices by running this tool. Please note that you may loose warranty when using this, although (This is no

Aaron Dewes 9 Nov 13, 2022
ArinjoyTheDev 1 Jul 17, 2022