A reinforcement learning strategy to automate and accelerate h/p-multigrid solvers
David Huergo, Laura Alonso, Saumitra Joshi, Adrián Juanicotena, Gonzalo Rubio, Esteban Ferrer · Results in Engineering · 2024
We explore a reinforcement learning strategy to automate and accelerate h/p-multigrid methods in high-order solvers. Multigrid methods are very efficient but require fine-tuning of numerical parameters, such as the number of smoothing sweeps per level and the correction fraction (i.e., proportion of the corrected solution that is transferred from a coarser grid to a finer grid). The objective of this paper is to use a proximal policy optimization algorithm to automatically tune the multigrid parameters and, by doing so, improve stability and efficiency of the h/p-multigrid strategy. Our findings reveal that the proposed reinforcement learning h/p-multigrid approach significantly accelerates and improves the robustness of steady-state simulations for one-dimensional advection-diffusion and nonlinear Burgers' equations, when discretized using high-order h/p methods, on uniform and nonuniform grids. • RL h/p-multigrid Optimization : Reinforcement learning (RL) is applied for optimizing the key parameters of an h/p-multigrid algorithm. • Performance : Multigrid parameters tuned by RL result in an improvement of performance, with more than x100 speed-up in some simulations. • Robustness and automation : The proposed strategy provides a robust and automatic way of obtaining stable simulations within an h/p-multigrid framework. • Proven Effectiveness : Demonstrated on 1D advection-diffusion and Burgers' equations, the RL strategy reduces the run-time and preserves stability.