## 3 Onset Detection
As the same parameter may have one meaning and domain for one particular function and another meaning and domain for another function, we normalized the domain of the parameter \(P_{2}\) to a fix interval. Each function is responsible for mapping that fix interval to the correct domain for its own purpose. The parameter \(p_{2}\) of each function with its own range is normalized into \([0;1]\): all intervals are transformed from \([a;b]\) to a normalized one \([0;1]\). By using this technique, the actual value of any parameter can be seen as a number between 0 and 1 or a percentage of the interval, and the mutation process becomes standard and easier. ### Mutation

Mutation process plays a fundamental role in the evolutionary process of Cartesian genetic programming-based systems. Without crossover, mutation is the only process responsible for the generation of new individuals in an offspring. The mutation process depends on two different stages, ruled by different probability distributions functions: the first stage decides if and which gene or genes will be mutated; the second stage decides how these genes will be mutated. There is a configurable parameter, the mutation probability that represents the probability of each gene undergoing a mutation. For instance, \(p=0.015\) means that each gene will mutate with a 1.5% probability. Different mutations are performed according to the gene type and domain: if a function gene happens to be mutated, then a valid value must be chosen for selecting a new function in the function set lookup table; if a mutation occurs in a gene node input, then a valid value is the output of any previous node in the genotype or any system input; and the valid values for the system output genes are the output of any node in the genotype or the address of a system input. All these mutations happen according to the discrete uniform probability distribution function for integers. Two additional genes can also mutate: the real parameters used by the functions. These parameters are important because they are used by those functions to perform specific tasks. According to each function, each parameter has a specific meaning and has its own domain range. In this case, we use the normalized interval \([0,1]\) as the

Figure 2:8 Node genotype and its graphical representation. Node 6 has five genes: the first gene (**black**) codifies the function from the function set table (value 4), the second and third genes (**red**) are connection genes (values 3 and 1: node 3 output and node 1 output), and the fourth and fifth genes (**blue**) are real parameters for function use (values 0.4 and 7.2). mutation domain. The mutation of real genes (function parameters) is done using the normal distribution in order to address the entire range:

Figure 2:9

where \(f(x)\) represents the density function of an \(x\) variable, with a normal distribution. This function is also represented as \(N(\mu,\sigma)\), where \(\mu\) is the mean and \(\sigma\) is the standard deviation. To perform the mutation of a function parameter, \(P_{old}\), we generated a new random \(P_{mutate}\) using the normal distribution \(N(\mu=P_{old},\sigma)\), with \(\sigma\) being configurable in our system. This way, we ensured that, when a mutation occurs on a real parameter, all parameter intervals are reachable but with higher probability to mutate to closer values. For better performance, we maintained a list of active and inactive genes and, when there is no mutation in one of the active genes, the fitness function is not computed. ### Evolutionary Strategy

The evolutionary strategy widely used for CGP is a special case of the \(\mu+\lambda\)[58], where \(\mu=1\) (see Algorithm 2).