All Projects → yuanming-hu → Difftaichi

yuanming-hu / Difftaichi

10 differentiable physical simulators built with Taichi differentiable programming (DiffTaichi, ICLR 2020)

Projects that are alternatives of or similar to Difftaichi

Taichi
Parallel programming for everyone.
Stars: ✭ 17,625 (+770.8%)
Mutual labels:  gpu, taichi, differentiable-programming
Physics3d
A 3D physics engine
Stars: ✭ 101 (-95.01%)
Mutual labels:  graphics, simulation
Assistive Gym
Assistive Gym, a physics-based simulation framework for physical human-robot interaction and robotic assistance.
Stars: ✭ 150 (-92.59%)
Mutual labels:  robotics, simulation
Urdf Loaders
URDF Loaders for Unity and THREE.js with example ATHLETE URDF Files
Stars: ✭ 129 (-93.63%)
Mutual labels:  robotics, graphics
Awesome Emulators Simulators
A curated list of software emulators and simulators of PCs, home computers, mainframes, consoles, robots and much more...
Stars: ✭ 94 (-95.36%)
Mutual labels:  robotics, simulation
Nyuziprocessor
GPGPU microprocessor architecture
Stars: ✭ 1,351 (-33.25%)
Mutual labels:  graphics, gpu
Cellularforms
An implementation of Andy Lomas' Cellular Forms.
Stars: ✭ 124 (-93.87%)
Mutual labels:  graphics, simulation
Hand dapg
Repository to accompany RSS 2018 paper on dexterous hand manipulation
Stars: ✭ 88 (-95.65%)
Mutual labels:  robotics, simulation
Webgl Fluid Simulation
Play with fluids in your browser (works even on mobile)
Stars: ✭ 11,621 (+474.16%)
Mutual labels:  gpu, simulation
Autonomousdrivingcookbook
Scenarios, tutorials and demos for Autonomous Driving
Stars: ✭ 1,939 (-4.2%)
Mutual labels:  robotics, simulation
Hoomd Blue
Molecular dynamics and Monte Carlo soft matter simulation on GPUs.
Stars: ✭ 143 (-92.93%)
Mutual labels:  gpu, simulation
Webots
Webots Robot Simulator
Stars: ✭ 1,324 (-34.58%)
Mutual labels:  robotics, simulation
Scrimmage
Multi-Agent Robotics Simulator
Stars: ✭ 93 (-95.41%)
Mutual labels:  robotics, simulation
Gym Ignition
Framework for developing OpenAI Gym robotics environments simulated with Ignition Gazebo
Stars: ✭ 97 (-95.21%)
Mutual labels:  robotics, simulation
Citro2d
Library for drawing 2D graphics using the Nintendo 3DS's PICA200 GPU
Stars: ✭ 88 (-95.65%)
Mutual labels:  graphics, gpu
Gen.jl
A general-purpose probabilistic programming system with programmable inference
Stars: ✭ 1,595 (-21.2%)
Mutual labels:  robotics, differentiable-programming
Articulations Robot Demo
Stars: ✭ 145 (-92.84%)
Mutual labels:  robotics, simulation
Awesome Robotics Libraries
😎 A curated list of robotics libraries and software
Stars: ✭ 1,159 (-42.74%)
Mutual labels:  robotics, simulation
Ign Gazebo
Open source robotics simulator. Through Ignition Gazebo users have access to high fidelity physics, rendering, and sensor models. Additionally, users and developers have multiple points of entry to simulation including a graphical user interface, plugins, and asynchronous message passing and services. Ignition Gazebo is derived from Gazebo, and represents over 16 years of development and experience in robotics and simulation. This library is part of the Ignition Robotics project.
Stars: ✭ 81 (-96%)
Mutual labels:  robotics, simulation
Libmali
The Mali GPU library used in Rockchip Platform
Stars: ✭ 128 (-93.68%)
Mutual labels:  graphics, gpu

python3 diffmpm.py

DiffTaichi: Differentiable Programming for Physical Simulation (ICLR 2020)

Yuanming Hu, Luke Anderson, Tzu-Mao Li, Qi Sun, Nathan Carr, Jonathan Ragan-Kelley, Frédo Durand

[Paper] [Video] (with instructions to reproduce every demo)

Differentiable programming in Taichi allows you to optimize neural network controllers efficiently with brute-force gradient descent, instead of using reinforcement learning.

The DiffTaichi differentiable programming framework is now officially part of Taichi. This repo only contains examples.

DiffTaichi significantly boosts the performance and productivity of differentiable physical simulators. For example, the differentiable elastic object simulator (ChainQueen) in DiffTaichi is 188x faster than an implementation in TensorFlow. The DiffTaichi version also runs as fast as the CUDA implementation, with the code being 4.2x shorter.

Most of the 10 differentiable simulators can be implemented within 2-3 hours.

Questions regarding the simulators/autodiff compiler go to Yuanming Hu (yuanming at mit.edu) or Issues.

Note: Updates on October 27 2021

Examples are now compatible with Taichi v0.8.3. Please update Taichi if you are using an old version.

How to run

Step 1: Install Taichi with pip:

(Most examples do not need a GPU to run.)

python3 -m pip install taichi

Step 2: Run example scripts in the examples folder: (Please wait for all GIFs to load :-)

Differentiable Elastic Object Simulator [python3 diffmpm.py]

Gradient descent iteration 0 and gradient descent iteration 80:

Differentiable 3D Elastic Object Simulator [python3 diffmpm3d.py]

Gradient descent iteration 40:

Differentiable 3D Fluid Simulator [python3 liquid.py]

Gradient descent iteration 450:

Differentiable Height Field Water Simulator [python3 wave.py]

Gradient descent iteration 180:

Differentiable (Adversarial) Water Renderer [python3 water_renderer.py]

Differentiable water simulation + differentiable water rendering + (differentiable) CNN

Optimization goal: find an initial water height field, so that after simulation and shading, VGG16 thinks the squirrel image is a goldfish. Input image: VGG16=fox squirrel (42.21%)

Left: center activation . Right: An activation that fools VGG (VGG16=goldfish (99.91%))

Differentiable Rigid Body Simulator [python3 rigid_body.py [1/2] train]

2048 time steps. Gardient descent iteration 20:

Differentiable Mass-Spring Simulator [python3 mass_spring.py [1/2/3] train]

682 time steps. Gardient descent iteration 20:

Differentiable Billiard Simulator [python3 billiards.py]

Gardient descent iteration 0 and gradient descent iteration 100:

See the video for the remaining two simulators.

Bibtex

@article{hu2019difftaichi,
  title={DiffTaichi: Differentiable Programming for Physical Simulation},
  author={Hu, Yuanming and Anderson, Luke and Li, Tzu-Mao and Sun, Qi and Carr, Nathan and Ragan-Kelley, Jonathan and Durand, Fr{\'e}do},
  journal={ICLR},
  year={2020}
}
@article{hu2019taichi,
  title={Taichi: a language for high-performance computation on spatially sparse data structures},
  author={Hu, Yuanming and Li, Tzu-Mao and Anderson, Luke and Ragan-Kelley, Jonathan and Durand, Fr{\'e}do},
  journal={ACM Transactions on Graphics (TOG)},
  volume={38},
  number={6},
  pages={201},
  year={2019},
  publisher={ACM}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].