Giter Site home page Giter Site logo

dgm_4fp's Introduction

Deep Galerkin Method for MFG

Following the work of Bonnemain et al., it appears that Mean-Field Games models do a good job at describing long-term anticipation patterns in optimizations problems involving a large number of competing agents. However, there are times where a forecasting is reasonable only for a portion of the future. In Butano et al., it was shown that the aforementioned MFG model can be adapted to such instances, simply by introducing a discount factor tuning the agents' foresightedness. When dealing with a cylindrical intruder crossing a static dense crowd, it has been shown that the experimental data gathered in Nicolas et al. can be well reproduced by the stationary state of a MFG whose equations in the Schrödinger formulations are

$$\lambda \Phi^e - \mu\sigma^2\vec{s}\cdot\vec{\nabla}\Phi^e =- \frac{\mu \sigma^4}{2}\Delta \Phi^e -V[m^e]\Phi^e+\gamma\mu\sigma^2\Phi^e\log{\Phi^e},$$

$$-\lambda \Gamma^e - \mu \sigma^2 \vec{s}\cdot \vec{\nabla}\Gamma^e= \frac{\mu\sigma^4}{2} \Delta \Gamma^e + V[m^e]\Gamma^e -\gamma \mu \sigma^2\Gamma^e \log{\Phi^e}.$$

The present repository contains the code to solve these two equations using Neural Networks, in particular by including relevant physical features of the system, something called Physics Informed Neural Networks (PINNs). In particular, we take inspiration from the work of Sirignano and Spiliopoulos and reproduce $\Phi$ and $\Gamma$ with $\Phi_{\theta}$ and $\Gamma_{\theta}$, two NNs composed of an equal number of LSTM and FNN layers. We want these nets to be a solution for the equations above and we do so by making them minimize

$$\text{loss} = MSE(res_{\text{HJB}}) + MSE(res_{\text{KFP}}) + MSE(boundary) + MSE(obstacle) + MSE(mass)$$

where the first two terms ensure that the nets solve the equations, more precisely,

$$res_{\text{HJB}} = -\lambda \Phi_{\theta}- \frac{\mu \sigma^4}{2}\Delta \Phi_{\theta} -V[m_{\theta}]\Phi_{\theta} + \mu\sigma^2\vec{s}\cdot\vec{\nabla}\Phi_{\theta} +\gamma\mu\sigma^2\Phi_{\theta}\log{\Phi_{\theta}},$$

$$res_{\text{KFP}} =\lambda \Gamma_{\theta} + \frac{\mu\sigma^4}{2} \Delta \Gamma_{\theta} + V[m_{\theta}]\Gamma_{\theta} + \mu \sigma^2 \vec{s}\cdot \vec{\nabla}\Gamma_{\theta}-\gamma \mu \sigma^2\Gamma_{\theta} \log{\Phi_{\theta}},$$

the boundary one checks that far from the obstacle the density of pedestrians is at rest at a given value, the obstacle term makes sure no one is under the cylinder and the mass term prevent agents from disappearing.

dgm_4fp's People

Contributors

jadgle avatar matteobutano avatar

Stargazers

 avatar Leo Aparisi de Lannoy avatar  avatar

Watchers

 avatar

Forkers

matteobutano

dgm_4fp's Issues

config.json

I read your code mfg_obstacle.py , but I can find config.json file . where can i find i?

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.