Open ghost opened 3 years ago
As I said on the other issue, it's been a while since I last worked on this code and I've moved on to other projects. If you have any specific questions on this DGM implementation I might try to answer them, but I won't try to debug your code. I simply don't have the spare time to do so. As a suggestion for your problem, begin with some code base that does work (e.g. merton.py) and go from there adjusting to your case. Also, feel free to rewrite the DGM net yourself since you might learn a lot doing so.
I am trying to use Deep Galerkin Method (DGM) to solve high dimensional PDEs and I face a problem. For illustrative purposes, I am posting a simple optimization problem below. The feed-forward network successfully recovers the optimal funciton, but DGM network fails to do so. Any help is highly appreciated.
The problem is to find the optimal function i that maximizes the function v=10-(x+i^2)-ix^2, where x is the state variable. That is, the optimal function i will depend on x. If I set 'DGM' as False in the parameter dictionary and run the code, I get the right solution (in this case the functions are coded as feed-forward neural network), where the correct analytical solution is i_star = 0.5*(-2x-x^2). If I set 'DGM' as False, the solution is incorrect. I tried with different number of layers and number of neurons per each layer, but DGM always gives incorrect solution.
Am I doing something wrong? Many thanks.