Automatically created RL Environment Editors
Project description
Overview
Editax is a framework for creating automated ACCEL (Evolving Curricula with Regret-Based Environment Design) editors for Unsupervised Environment Design. It automatically generates small probabilistic programs to modify POMDPs, removing the domain knowledge required to hand-design editors.
Key Features
- 🔄 Automated Editor Generation: Creates and validates environment modifications automatically
- 🎯 Minimal Perturbation: Ensures changes are meaningful yet minimal
- 🤖 Consistency Sampling: Applies universal self-consistency to minimize differences across LLM invocations
- 🔬 Framework Integration: Seamlessly integrates with minimax and jaxued for end-to-end training
Motivation
Implementing ACCEL requires significant domain knowledge for each UPOMDP. Editax streamlines this process by:
- Automating Editor Creation: Generates ACCEL-based modifications automatically
Installation
Prerequisites
- Python 3.12+
- pip
Installing from PyPI
If you prefer not to clone the repository, you can install the main package from PyPI:
# Install the main package
pip install editax
# For full functionality, install the git dependency separately:
pip install git+https://github.com/DramaCow/jaxued.git@main
Development Installation
For development work (including dev dependencies such as jaxued), clone the repository and install using Poetry with dev extras:
git clone https://github.com/RobbenRibery/editax.git
cd editax
python -m venv .venv
source .venv/bin/activate
poetry install --with dev
Environment Setup
Configure your language model API keys:
export OPENAI_API_KEY="your-key-here"
# Or alternatively:
export ANTHROPIC_API_KEY="your-key-here"
export DEEPSEEK_API_KEY="your-key-here"
Quick Start
Generate environment editors (i.e. for kinetix):
python -m experiments.gen_editors_kinetix
This will:
- Load your target environment
- Generate editor functions
- Validate with a sampled environment and refine the modifications
- Output ready-to-use environment editors
Contributing
We welcome contributions! To get started:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Please read our Contributing Guidelines for more details.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
References
[1] Parker-Holder, J., et al. (2022). Evolving Curricula with Regret-Based Environment Design
[2] Matthews, M., et al. (2024). Kinetix: Investigating the Training of General Agents through Open-Ended Physics-Based Control Tasks
[3] Coward, S., et al. (2024). JaxUED: A simple and useable UED library in Jax
[4] Matthews, M., et al. (2024). Craftax: A Lightning-Fast Benchmark for Open-Ended Reinforcement Learning
[5] Jiang, M., et al. (2023). Minimax Regret Environment Design for Open-Ended Learning
[6] Chen, X., et al. (2023). Universal Self-Consistency for Large Language Model Generation
Citation
If you use this software in your research, please cite it as:
@software{editax2024,
title = {Editax: A Framework for Automated ACCEL-type Editors},
author = {
Liu, Rundong and
Sudhakaran, Shyam and
Beck, Jacob and
Zhang, Richard and
Anisimov, Maksim
},
year = {2024},
url = {https://github.com/RobbenRibery/editax},
email = {
rundong.liu{\@}proton.me and
shyamsnair{\@}protonmail.com and
jakeabeck{\@}gmail.com and
zrich107{\@}gmail.com and
m.anisimov23{\@}imperial.ac.uk`
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file editax-0.2.1.tar.gz.
File metadata
- Download URL: editax-0.2.1.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.12.9 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20ddb0ec50555c17c57812d58ad4041107ee345c7b235c4e344f6955ab33e519
|
|
| MD5 |
27039f81ec1c5148ba199a571a1bbaba
|
|
| BLAKE2b-256 |
7c195eeff1ecdc7b41c7805eb8c3151ef299864675903012efbb31822556f6e2
|
File details
Details for the file editax-0.2.1-py3-none-any.whl.
File metadata
- Download URL: editax-0.2.1-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.12.9 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7e4afe89f9a430827a3c6f86bd5c7a5bcb854f3941e0db09e9f6dbcaa83530f
|
|
| MD5 |
235a0df3bc288c378a88c84e0b25468d
|
|
| BLAKE2b-256 |
51eca37ca07f2794271495beeb6b06047ff977c07fed3e75440818ff1315324b
|