## 4 Calibrating the Assessment Mechanism with Machine Learning
### Calibration Using Genetic Algorithms  
The weights \(w_{1}\), \(w_{2}\), \(\ldots\), \(w_{n}\) in the _completion rate_ of an experiment represent the importance of their respective individual scores \(x_{1}\), \(x_{2}\), \(\ldots\), \(x_{n}\) and they form the _weight vector_\(w\). \[\overset{\rightarrow}{w}=\left(w_{1},w_{2},\ldots,w_{n}\right)^{T} \tag{2}\]  
For our GA, each weight consists of a _gene_ and each weight vector consists of a _chromosome_. We first randomly produce a _population_ of \(p\) weight vectors, \(\overset{\rightarrow}{w^{1}}\), \(\overset{\rightarrow}{w^{2}}\), \(\ldots\), \(\overset{\rightarrow}{w^{p}}\), or, in short, \(\overset{\rightarrow}{w^{i}}\). Figure 5 gives an illustrative description of the genes, chromosomes, and populations of our GA. Specializing (2) for each weight vector, we obtain the following. \[\overset{\rightarrow}{w^{i}}=\left(w^{i}_{1},w^{i}_{2},\ldots,w^{i}_{n} \right)^{T} \tag{3}\]  
Now reformulating (1) in vector terms, we obtain the following:  
\[completion\ rate\leftarrow\frac{\overset{\rightarrow}{w^{i}\cdot}\overset{ \rightarrow}{s}}{\|\overset{\rightarrow}{w^{i}}\|_{1}}\]  
where \(\|\overset{\rightarrow}{w^{i}}\|_{1}\) is the first-degree norm of \(\overset{\rightarrow}{w^{i}}\) vector, equal to \(\sum_{k=1}^{n}w^{i}_{k}\). The first generation of weight vectors is produced by creating a set of weight vectors, \(\overrightarrow{w^{1}}\), \(\overrightarrow{w^{2}}\),..., \(\overrightarrow{w^{p}}\), with random values from 0 to 100 as their components. The _fitness function_ of our GA guides (probabilistically) how weight vectors will propagate in the next generation, as individuals or through crossover with other weight vectors. It should, therefore, reflect as accurately as possible the score given by an expert on all of the examples of the training data set. It needs to be mentioned that, by incorporating human feedback, we actually have an interactive GA that differs from the conventional GAs which let the population evolve without interacting with a human expert. After a play session is completed in training mode, the computer calculates the various individual scores \(x_{i}\) and the resulting _completion rate_ while the expert provides their own evaluation. For the individual scores, we create a _score vector_\(\overrightarrow{x}\), similar to the _weight vector_ of (2). \[\overrightarrow{x}=\left(x_{1},\ x_{2},\ldots,x_{n}\right)^{T}\]  
Assuming, for simplicity reasons, that only one session has been played, so there is only one _score vector_, \(\overrightarrow{x}\), and denoting the expert's score for this session as \(ES(\overrightarrow{x})\), we proceed by defining a generic form of _fitness function_ as follows. \[\mathit{Fitness}_{\mathit{generic}}(\overrightarrow{w^{i}})=1-\left|ES \left(\overrightarrow{x}\right)-\frac{\overrightarrow{w^{i}\cdot \overrightarrow{x}}}{\overrightarrow{\lVert w^{i}\rVert_{1}}}\right| \tag{4}\]  
The _generic fitness function_ reaches its maximum value, 1, when the produced _completion rate_, \(\frac{\overrightarrow{w^{i}\cdot\overrightarrow{x}}}{\lVert w^{i}\rVert_{1}}\), equals the expert's score, and its minimum value when those two quantities are as \"far\" as possible from each other. Of course, a single _score vector_, i.e., a single play session or, in machine learning terms, a single training data point, does not suffice for a GA. We therefore carry out several sessions for the same experiment and obtain a series of score vectors, \(\overrightarrow{x^{j}}\), \(j=1\ldots h\), with their respective _expert scores_, \(ES(\overrightarrow{x^{j}})\). Adjusting the generic _fitness function_ in (4) for each _score vector_\(\overrightarrow{x^{j}}\), we have the following. \[\mathit{Fitness}_{j}(\overrightarrow{w^{i}})=1-\left|ES(\overrightarrow{x^{j }})-\frac{\overrightarrow{w^{i}\cdot\overrightarrow{x}}}{\overrightarrow{ \lVert w^{i}\rVert_{1}}}\right| \tag{5}\]  
Figure 5: Genes, chromosomes, and populations of the Genetic Algorithm.