Method for controlling a processing operation of a workpiece by means of a Reinforcement Learning agent unit, comprising the steps of: (a) observing an interaction zone in the workpiece by means of at least one radiation sensor to generate at least one sensor signal s t, wherein the workpiece is processed using an actuator having an initial actuator value a t; (b) determining a basis function φ(s t) from the set of sensor signals s t; (c) determining a reward function r t giving the probability of good results of the processing operation; (d) choosing a next actuator value a t+1 on the basis of a policy π depending on the reward function r t and the basis function φ(s t); and (e) repeating the steps (a) to (d) for further time points to perform an RL controlled processing operation; wherein steps (a) and (b) comprise the steps of: - recording a pixel image at an initial time point of an interaction zone in the workpiece by means of a camera; and - converting the pixel image into a pixel vector s t: and - representing the pixel vector s t by a sum of predetermined pixel mappings each multiplied by a corresponding feature value, wherein the set of feature values φ(s t) represents the basis function φ(s t), and - characterized in that the predetermined pixel mappings are obtained by the steps of: - recording a training set of pixel images at a predetermined first number of time points displaying the interaction zone having a good processing result, and at a predetermined second number of time points displaying the interaction zone having a bad processing result; - converting the pixel images into pixel vectors and generating a covariance matrix from the pixel vectors; - calculating the eigenvectors of the covariance matrix to determine the predetermined pixel mappings. (a) observing an interaction zone in the workpiece by means of at least one radiation sensor to generate at least one sensor signal s t, wherein the workpiece is processed using an actuator having an initial actuator value a t; (b) determining a basis function φ(s t) from the set of sensor signals s t; (c) determining a reward function r t giving the probability of good results of the processing operation; (d) choosing a next actuator value a t+1 on the basis of a policy π depending on the reward function r t and the basis function φ(s t); and (e) repeating the steps (a) to (d) for further time points to perform an RL controlled processing operation; - recording a pixel image at an initial time point of an interaction zone in the workpiece by means of a camera; and - converting the pixel image into a pixel vector s t: and - representing the pixel vector s t by a sum of predetermined pixel mappings each multiplied by a corresponding feature value, wherein the set of feature values φ(s t) represents the basis function φ(s t), and - characterized in that the predetermined pixel mappings are obtained by the steps of: - recording a training set of pixel images at a predetermined first number of time points displaying the interaction zone having a good processing result, and at a predetermined second number of time points displaying the interaction zone having a bad processing result; - converting the pixel images into pixel vectors and generating a covariance matrix from the pixel vectors; - calculating the eigenvectors of the covariance matrix to determine the predetermined pixel mappings.