## 2 Theory
### Genetic Algorithm  
As mentioned in the introduction, GAs have been successfully used in LC settings, although not for a higher number of variables. As we handle complex, non-linear, high-dimensional problems, a tool that can explore a large search space, avoid local minima, and optimise without requiring gradient information can be worth the study. The genetic algorithm's population-based approach allows for a diverse exploration of potential solutions, and since its mechanism and approach significantly differs from the Euler-Lagrange equations-based one it can both add valuable insights and potential improvements on optimisation strategies for liquid crystal systems. The Genetic Algorithm is an optimisation method for solving minimisation problems. It operates by generating a population of potential solutions named individuals and creating new ones by combining characteristics from two existing 'parent' individuals, adding random mutations in the process, and selecting individuals based on testing suitability analogously to genetic inheritance and natural selection work in biology. The algorithm is valued for its simplicity in implementation, lack of need for trial solutions, and generally accurate results. A scheme of the GA deployed is shown in Figure 2a The algorithm beginsby generating an initial population of solutions, each of which is evaluated based on a fitness function. The fitness function quantifies how well each solution meets the objective of the optimisation (in our case, minimising the Frank-Oseen free energy). After evaluating the population, the algorithm checks for convergence. This involves determining if the solution meets the pre-defined stopping criteria, if the maximum number of generations has been reached, or if there have been 100 stall iterations without any improvement. If the algorithm has not yet converged, selection occurs, where individuals with better fitness scores are more likely to be chosen as parents. For this purpose, and based on empirical exploration, Stochastic Uniform Selection is used, where individuals are laid out on a line, with each individual assigned a section of the line proportional to its fitness. This method gives individuals with higher fitness a greater chance of being selected but also ensures that even less fit individuals have some chance of being chosen. These parents also undergo crossover--a process where portions of their genetic material are mixed to form offspring solutions. This step encourages exploration of the solution space by creating new combinations of existing individuals' characteristics. The arithmetic crossover method is selected in our particular setup and based on the empirical exploration of different crossover functions. This method creates offspring by taking a weighted average of the parent's genes. In our implementation, 20% of the population is taken for crossover. This helps to introduce diversity into the population, allowing the algorithm to explore new areas of the solution space. Additionally, random mutations are applied to some individuals to introduce a different source of variability, ensuring the algorithm can avoid getting stuck in local minima by exploring regions of the search space that may not be reachable by crossover alone. Here, we use the Gaussian mutation function (mutationgaussian in MATLAB R2024a), which adds random noise drawn from a Gaussian distribution to the selected individuals. The mutation strength is empirically set to a small value (gaussian mutations with standard deviations of 0.003), ensuring mutations are sufficient to explore new solutions yet small enough to ensure convergence. The newly generated individuals then replace the previous population, and the process repeats until the convergence criterion is met. Since the GA approach consists of a completely different, complementary method from gradient-based Euler-Lagrange alone in the study of LC systems, it might posit an advantage and is worth studying.