# Evolutionary Statistical System Based on Novelty Search:
## 3 Novelty-Based Approach for the Optimization Stage in a Wildfire Prediction System
### Novelty-Based Genetic Algorithm with Multiple Solutions
Another difference is that the archive of novel solutions (_archive_) is managed with replacement based on novelty only as opposed to the pseudocode in [33], which uses a randomized approach. These features correspond to a \"classical\" implementation of the NS paradigm: an optimization guided exclusively by the novelty criterion, and a set of results based on the best values obtained using the fitness function. These criteria allow us to establish a baseline against which it will be possible to perform comparisons among future variants of the algorithm. In this first version, parallelism has been implemented in the evaluation of the scenarios, i.e., in the simulation process and subsequent computation of the fitness function. The novelty score computation and other steps are not parallelized in this version. Figure 6: Example of the fitness computation with Equation (3). We have that \(|A\cup B|=8\), and \(|A\cap B|=4\); then \(fitness(A,B)=4/8=0.5\). ```
1:population size \(N\), number of offspring \(m\), tournament probability \(\mathit{tour\_prob}\), mutation rate \(\mathit{mut\_prob}\), crossover rate \(\mathit{cr}\), maximum number of generations \(\mathit{maxGen}\), fitness threshold \(\mathit{fThreshold}\), number of neighbors for novelty score \(k\)
2:the set \(\mathit{bestSet}\) of individuals of highest fitness found during the search
3:\(population\longleftarrow\) initializePopulation\((N)\)
4:\(\mathit{archive}\longleftarrow\emptyset\)
5:\(\mathit{bestSet}\longleftarrow\emptyset\)
6:\(\mathit{generations}\longleftarrow 0\)
7:\(\mathit{maxFitness}\longleftarrow 0\)
8:while\(\mathit{generations}<\mathit{maxGen}\)and\(\mathit{maxFitness}<\mathit{fThreshold}\)do
9:\(\mathit{offspring}\longleftarrow\) generateOffspring\((population,m,\mathit{tour\_prob},\mathit{mut\_prob},\mathit{cr})\)
10:for each individual \(\mathit{ind}\in(population\cup\mathit{offspring})\)do
11:\(\mathit{find\_fitness}\longleftarrow\) evaluateFitness\((\mathit{ind})\)
12:endfor
13:\(\mathit{noveltySet}\longleftarrow(population\cup\mathit{offspring}\cup \mathit{archive})\)
14:for each individual \(\mathit{ind}\in(population\cup\mathit{offspring})\)do
15:\(\mathit{ind\_novelty}\longleftarrow\) evaluateNovelty\((\mathit{ind},\mathit{noveltySet},k)\)
16:endfor
17:\(\mathit{archive}\longleftarrow\) updateArchive\((\mathit{archive},\mathit{offspring})\)
18:\(\mathit{population}\longleftarrow\) replaceByNovelty\((population,\mathit{offspring},N)\)
19:\(\mathit{bestSet}\longleftarrow\) updateBest\((\mathit{bestSet},\mathit{offspring})\)
20:\(\mathit{maxFitness}\longleftarrow\) getMaxFitness\((\mathit{bestSet})\)
21:\(\mathit{generations}\longleftarrow\mathit{generations}+1\)
22:endwhile
23:return\(\mathit{bestSet}\)
```  
**Algorithm 1** Novelty-based Genetic Algorithm with Multiple Solutions. We now provide a detailed description of Algorithm 1, specifying _parameters in italics_ and functions in typewriter face. The input parameters of the algorithm include: the typical GA parameters \((N,m,\mathit{tour\_prob},\mathit{mut\_prob},\mathit{cr})\), the two stopping conditions (\(\mathit{maxGen}\) and \(\mathit{fThreshold}\)), and one NS parameter: \(k\), which is the number of neighbors to be considered for the computation of the novelty score in Equation (1). The algorithm begins by initializing some variables; notably, the evolution process starts with the function initializePopulation (line 1), which generates \(N\) scenarios with random values for the unknown variables in a given range; such range has been determined beforehand for each variable. Afterwards, each iteration of the main loop (lines 6 to 20) corresponds to a generation of the GA. At the beginning of each generation, the algorithm performs the selection and reproduction steps, abstracted in generateOffspring; that is, it generates \(m\) offspring based on the current \(N\) individuals of the population. Our chosen GA population selection strategy is by tournament.