Code Monkey home page Code Monkey logo

mathphyssim / fermi_rl_paper Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 66.56 MB

The repo for the FERMI FEL paper using model-based and model-free reinforcement learning methods to solve a particle accelerator operation problem.

License: MIT License

TeX 42.42% Python 57.58%
trpo ae-dyna naf fel model-based-reinforcement-learning accelerators model-free-rl reinforcement-learning reinforcement-learning-algorithms applied-reinforcement-learning acclerator-physics

fermi_rl_paper's Introduction

Model-free and Bayesian Ensembling Model-based Deep Reinforcement Learning for Particle Accelerator Control Demonstrated on the FERMI FEL

Contact: simon.hirlaender(at)sbg.ac.at

Pre-print https://arxiv.org/abs/2012.09737

Please cite code as:

DOI

The included scripts:

  1. To run the NAF2 as used in the paper on the pendulum run: run_naf2.py
  2. To run the AE-DYNA as used in the paper on the pendulum run: AEDYNA.py
  3. To run the AE-DYNA with tensorflow 2 on the pendulum run: AE_Dyna_Tensorflow_2.py

The rest should be straight forward, otherwise contact us.

These are the results of RL tests @FERMI-FEL

The problem has four degrees of freedom in state and action space. A schematic overview:

SchemaFERMIFEL

Algorithm Type Representational power Noise resistive Sample efficiency
NAF Model-free Low No High
NAF2 Model-free Low Yes High
ME-TRPO Model-based High No High
AE-DYNA Model-based High Yes High

Experiments done on the machine:

A new implementation of the NAF with double Q learning (single network dashed, double network solid):

NAF2_training

NAF2_training

A new implementation of a AE-DYNA:

AE-DYNA

AE-DYNA

A variant of the ME-TRPO:

ME-TRPO

ME-TRPO

ME-TRPO

Experiments done on the inverted pendulum openai gym environment:

Cumulative reward of different NAF implementations on the inverted pendulum with artificial noise.

NAF_NOISE

Comparison of the inclusion of aleatoric noise in the AE-DYNA in the noisy inverted pendulum:

AE-DYNA_NOISE

Comparison of the inclusion of aleatoric noise in the AE-DYNA in the noisy inverted pendulum:

AE-DYNA_NOISE

Sample efficiency of NAF and AE-DYNA:

AE-DYNA

Free run on the inverted pendulum:

AE-DYNA

Update of AE-Dyna-(SAC) to Tensorflow 2

Finally, there is an update of the AE-dyna to use tensorflow 2. Run the script AE_Dyna_Tensorflow_2.py. It is based on tensor_layers tensorlayer, which has to be installed. The script AE_Dyna_Tensorflow_2.py runs on the inverted pendulum and produces results like shown in the figure below.

img.png If you have questions do not hesitate to contact us.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.