# Genetic Algorithm as a Tool for the Determination of the Self-Stress States of Tensegrity Domes
## 3 Results for Two-Dimensional Truss
Two approaches were used. Firstly, elements were divided into three groups (two groups of tensed elements and one of compressed elements), and then into two groups (two groups of tensed elements). For both approaches, two series with different values of population size and number of generations were used (Series 1 and 2 for the approach with three genes; Series 3 and 4 for the approach with two genes). The genetic main parameters and results of the genetic algorithm are presented in Table 1, whereas the values of self-stress states and relative errors in Table 2.  
The accuracy of the results obtained using the genetic algorithm depends on the number of genes, the population size and the number of generations. The larger the population size is, the more diverse the possible solutions are and the larger the chance that there is the solution among those randomly generated by the program. The higher the number of generations is, the more genetic operations are applied and the greater the chance of obtaining the right solution is. In Series 1 and 2, three genes were searched for and the range of the solution was set from 0 to 1. Then, the values were normalized so that the forces in compressed elements were equal to \(-1\). In Series 3 and 4, knowing the approximate solutions from Series 1 and 2, only the forces in tensed elements were searched for, the range of the solution was set from 2 to 3 and the force in strut was assumed as normalized \(-1\). For low level of genetic parameters (Series 1 and 3), the maximum relative error for the series is equal to 14% and 25%, respectively. Increasing the level of the parameters (Series 2 and 4) improves the accuracy of solutions. In the case of Series 2, the maximum relative error is 6.24%, while, in the case of Series 4, the relative error is insignificant--0.01%. It means that the solutions obtained in Series 4 can be considered accurate. In the considered case, the exact solutions are known and the accuracy of the solutions can be evaluated by comparing them. What if they are not known? For the appropriately selected solution, equilibrium of each node needs to be close to zero. To measure the \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Series 1** & **Series 2** & **Series 3** & **Series 4** \\ \hline
**Number of genes** & 3 & 3 & 2 & 2 \\
**Population size** & 18 & 100 & 18 & 100 \\
**Number of generations** & 4 & 10 & 4 & 10 \\
**Solutions in the population** & 9 & 20 & 9 & 20 \\ \hline \(\sum S_{\text{2x}}\) & \(-0.0576\) & \(-0.0028\) & \(-0.0706\) & \(-0.00002\) \\ \(\sum S_{\text{2y}}\) & \(-0.1360\) & \(-0.0623\) & \(-0.2141\) & \(-0.00009\) \\
**Equilibrium of nodes _EN (11)_** & 0.0873 & 0.0794 & 0.2034 & 0 \\
**Fitness function (8)** & 3.38481 & 3.54881 & 2.21706 & 503.083 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Genetic main parameters and results of genetic algorithm for the two-dimensional truss. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & & & & & & & & \\ \hline
**Groups of Elements** & \begin{tabular}{c} **Exact** \\ **Solutions** \\ \end{tabular} & **Series 1** & \begin{tabular}{c} **Relative** \\ **Error** \\ \end{tabular} & **Series 2** & \begin{tabular}{c} **Relative** \\ **Error** \\ \end{tabular} & **Series 3** & \
\begin{tabular}{c} **Relative** \\ **Error** \\ \end{tabular} & **Series 4** &
\begin{tabular}{c} **Relative** \\ **Error** \\ \end{tabular} \\ \hline
**1** & **2.23607** & 2.54022 & 13.60\% & 2.37559 & 6.24\% & 2.71499 & 21.42\% & 2.23829 & 0.1\% \\
**2** & **2.00000** & 2.21443 & 10.72\% & 1.99847 & 0.08\% & 2.49898 & 24.95\% & 2.00197 & 0.1\% \\
**3** & \(-\)**1.00000** & \(-1.00000\) & 0\% & \(-1.00000\) & 0\% & \(-1.00000\) & 0\% & \(-1.00000\) & 0\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Values of self-stress states of the two-dimensional truss. accuracy of the self-stress states, the equilibrium of each node and the fitness functions are calculated (Table 1).