Deep RL for Fluid-Rigid Control
Deep-reinforcement-learning Controlled Fluid-Rigid Simulation
A python-based ball-shooting game of fluid-rigid simulation and autonomous control via Deep Reinforcement Learning.
Table of Contents
Features
- MLS-MPM method for fluid simulation
- Newton-Eulerian system for rigid body movement
- Lagrangian sampling for fluid-rigid coupling
- Robustness and Vram optimization for GPU parallelization
- Soft Actor-Critic deep reinforcement learning framework for tube control
- Meta Learning for problem generalization
- CNN Autoencoder pretraining for correlated field properties
Installation
Requirements
python 3.10
jittor 1.3.6
taichi 1.4
gym 0.26.2
pytorch 2.1.0
Platform
Good Nvidia GPU (cuda) to run simulation, rendering and learning
Usage
How to play with shooting tube
1
python play.py
- A(←) & D(→): control the tube to move leftwards and rightwards
- W(↑) & S(↓): increase or decrease the ejecting speed
- right & left mouse click: control the tube to rotate clockwise and counter-clockwise
- R: reset the ball and tube
Quick Start
Train
1
python train.py ./configs/train.json
Eval
1
python eval.py ./configs/eval.json
-provided models in model_trial1
Demo
-Effects of the AutoEncoder:
—— by Zhiwei Zhao, Dec. 2023
This post is licensed under CC BY 4.0 by the author.