A differentiable physics engine written in JAX.
Project description
BRAX
Brax is a differentiable physics engine that simulates environments made up of rigid bodies, joints, and actuators. Brax is written in JAX and is designed for use on acceleration hardware. It is both efficient for single-device simulation, and scalable to massively parallel simulation on multiple devices, without the need for pesky datacenters.
Some policies trained via Brax. Brax simulates these environments at millions of physics steps per second on TPU.
Brax also includes a suite of learning algorithms that train agents in seconds to minutes:
- Baseline learning algorithms such as PPO, SAC, and evolutionary strategies.
- Learning algorithms that leverage the differentiability of the simulator, such as analytic policy gradients.
Quickstart: Colab in the Cloud
Explore Brax easily and quickly through a series of colab notebooks:
- Brax Basics introduces the Brax API, and shows how to simulate basic physics primitives.
- Brax Training introduces Brax environments and training algorithms, and lets you train your own policies directly within the colab.
- Brax + PyTorch demonstrates how to operate Brax environments performantly from PyTorch.
Using Brax locally
To install Brax from pypi, install it with:
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install brax
Alternatively, to install Brax from source, clone this repo, cd
to it, and then:
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install -e .
To train a model:
learn
Training on NVidia GPU is supported, but you must first install CUDA, CuDNN, and JAX with GPU support.
Learn More
For a deep dive into Brax's design and performance characteristics, please see our paper, Brax -- A Differentiable Physics Engine for Large Scale Rigid Body Simulation , to appear in the Datasets and Benchmarks Track at NeurIPS 2021.
Citing Brax
If you would like to reference Brax in a publication, please use:
@software{brax2021github,
author = {C. Daniel Freeman and Erik Frey and Anton Raichuk and Sertan Girgin and Igor Mordatch and Olivier Bachem},
title = {Brax - A Differentiable Physics Engine for Large Scale Rigid Body Simulation},
url = {http://github.com/google/brax},
version = {0.0.5},
year = {2021},
}
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
File details
Details for the file brax-0.0.5.tar.gz
.
File metadata
- Download URL: brax-0.0.5.tar.gz
- Upload date:
- Size: 82.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f5591ac011c3e81e633b2f65da402604d3c35c1d74cca972c120100bc0574bf |
|
MD5 | 1c726141ec079daad205dd105aa37f75 |
|
BLAKE2b-256 | 3e9adfd18df6f192e0e2a8732d2afed30c7ade4a1554a2f0bda06d0ba2b3bb38 |
Provenance
File details
Details for the file brax-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: brax-0.0.5-py3-none-any.whl
- Upload date:
- Size: 127.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc8bbee0df4520838a466b5244ab67bfc7cd15d1a8fdab6be7d5b0912d935b84 |
|
MD5 | ec6efe120383cba1d0984a3f515c69f0 |
|
BLAKE2b-256 | 7ef684d1663e115bb3ea5ed715b334b605935eb7beaa7b5b615be24738823130 |