Skip to content

A python-based ball-shooting game of fluid-rigid simulation and autonomous control via Deep Reinforcement Learning.

License

Notifications You must be signed in to change notification settings

Furkath/DRL_controlled_fluid-rigid_simulation

Repository files navigation

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

demo

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

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

python train.py ./configs/train.json

Eval

python eval.py ./configs/eval.json

-provided models in model_trial1

Demo

demo1 demo2

-Effects of the AutoEncoder:

demo3

—— by Zhiwei Zhao, Dec. 2023

About

A python-based ball-shooting game of fluid-rigid simulation and autonomous control via Deep Reinforcement Learning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages