Computer-implemented method for optimizing welding parameters (SP1, SP2) for a welding controller, having the following steps: receiving a first dataset comprising a plurality of first welding parameters for the welding controller; wherein the welding parameters are process control parameters; characterized by: approximating at least one numerical value of an objective function for the plurality of first welding parameters for the welding controller using a trained machine learning algorithm, which is applied to the plurality of first welding parameters, wherein the objective function represents at least one quality criterion of a welding operation in response to a weld produced by the plurality of first welding parameters; outputting a second dataset comprising at least one numerical value of the objective function; and optimizing the plurality of first welding parameters for the welding controller by way of an optimization algorithm that uses the first dataset comprising the plurality of first welding parameters for the welding controller and the approximated numerical value of the objective function to calculate an optimized plurality of second welding parameters for the welding controller, wherein the welding parameters are process control parameters; wherein the optimization algorithm uses a gradient method in which an extreme value, in particular a maximum, of the numerical value of the objective function is determined on a hypersurface formed by a definition range of the plurality of first welding parameters as a function of a numerical value range of the objective function. receiving a first dataset comprising a plurality of first welding parameters for the welding controller; wherein the welding parameters are process control parameters; characterized by: approximating at least one numerical value of an objective function for the plurality of first welding parameters for the welding controller using a trained machine learning algorithm, which is applied to the plurality of first welding parameters, wherein the objective function represents at least one quality criterion of a welding operation in response to a weld produced by the plurality of first welding parameters; outputting a second dataset comprising at least one numerical value of the objective function; and optimizing the plurality of first welding parameters for the welding controller by way of an optimization algorithm that uses the first dataset comprising the plurality of first welding parameters for the welding controller and the approximated numerical value of the objective function to calculate an optimized plurality of second welding parameters for the welding controller, wherein the welding parameters are process control parameters; wherein the optimization algorithm uses a gradient method in which an extreme value, in particular a maximum, of the numerical value of the objective function is determined on a hypersurface formed by a definition range of the plurality of first welding parameters as a function of a numerical value range of the objective function. approximating at least one numerical value of an objective function for the plurality of first welding parameters for the welding controller using a trained machine learning algorithm, which is applied to the plurality of first welding parameters, wherein the objective function represents at least one quality criterion of a welding operation in response to a weld produced by the plurality of first welding parameters; outputting a second dataset comprising at least one numerical value of the objective function; and optimizing the plurality of first welding parameters for the welding controller by way of an optimization algorithm that uses the first dataset comprising the plurality of first welding parameters for the welding controller and the approximated numerical value of the objective function to calculate an optimized plurality of second welding parameters for the welding controller, wherein the welding parameters are process control parameters; wherein the optimization algorithm uses a gradient method in which an extreme value, in particular a maximum, of the numerical value of the objective function is determined on a hypersurface formed by a definition range of the plurality of first welding parameters as a function of a numerical value range of the objective function.