Non-invasive and invasive electrical neurostimulation are promising tools to better understand brain functionandultimately treat its malfunction. In current open-loop approaches, a clinician chooses a fixed set of stimulation parameters, informed by …