Off-the-shelf optical systems design enabled by an evolution strategy: front stop case

Commercial off-the-shelf optics enable economic and rapid solutions in the photonics industry and academia. However, the design of optical systems with off-the-shelf optics is a time-consuming task for experienced optical designers and hopeless for novice designers. In this paper, we propose an automatic optical design tool to generate optical systems using only off-the-shelf optical components without human assistance. Our solution is based on an evolution strategy (ES) that performs a discrete combinatorial optimization following optical design-based methodologies that satisfy user-defined specifications. Unlike the conventional methods, the algorithm decreases the design process time and provides optical designers with several optical solutions from where to choose and adapt for targeted applications. In this work, the ES is described and tested with front stop optical configurations. We demonstrate the broad solution domain of the algorithm through the generation of optical systems with F-numbers within a range F/1 to F/90 and field of views up to 300 mm at the image plane. To analyze the solution domain and the characteristics of the solution, we used the design specifications of 29 commercially available scan lenses and compared the performance of different ES parameters. The compatibility of our algorithm with (standard) commercially available optical design software unlocks automatic design tools for off-the-shelf optical systems.


Introduction
Commercial off-the-shelf (OTS) optics are optical elements fabricated in quantity and kept in stock by optical suppliers.Due to their readily availability and low-cost, these optical elements reduce the prototyping, fabrication, assembly costs and time of optical systems, and thus, enable economic and rapid solutions for industry and academia [1][2][3][4][5][6].
However, the design of optical systems that consist completely or partially of OTS optics is a challenging task.On one side, due to the unreachable amount of lens combinations, e.g. a lens system typically consists of at least three lenses to fulfil the desired performance, and the number of lenses available in stock catalogues readily exceeds thousands of lenses, thus the number of combinations as obtained by equation (1) are possible, influence the number and characteristics of the solutions.Second, we test and compare the algorithm with the specifications of 28 systems.Finally, the conclusions are presented.

Problem description
A lens system consists of individual lenses, also referred to as lens elements, that are described by the radii of curvature, thickness, diameter and glass type.Those parameters are used by the optical designer in combination with the airspaces, refractive indices and dispersive powers of multiple elements, the position of the stop or aperture-limiting diaphragm as available design 'degrees of freedom' .The degrees of freedom are used to reduce the aberrations of the optical system and maintain the required design specifications such as focal length, magnification and f-number of the lens system [7].Contrary to customized lens design, in the OTS-OS design problem, such degrees of freedom are represented by a discrete domain of solutions generated by available commercial stock lenses, thus limiting the possible values used in the OTS-OS optimization.
The OTS-OS design aims to find a combination of commercial stock lens elements to compose an optical system that satisfies the user's technical specifications [22,23,25].Those specifications are defined by the main application of the target system and used as control parameters of the ES.At the same time, the target system determines the strategy to propose the initial systems.Here, we focus on optical systems in which the stop is located outside the lens system.Therefore, we propose initial optical systems based on positive and negative lenses to compensate for the aberrations and fulfil the design specifications.Although the initial configurations depend on the target system, the ES and the mutation operators applied over the candidates follow established rules independent from the optical system.Therefore, our method searches for new candidates based on their constant mutation and iterative competence.

Target systems
Based only on the position of the aperture stop, we classify the optical systems in three possible configurations.The first type locates the stop in front of the first lens element.This configuration includes scan lenses, telescopes and landscape lenses.The second type positions the stop between two lens elements and consists of many optical systems, e.g.projection lenses, camera objectives and microscope objectives, among others.Finally, the stop at the rear of the optical system represents the last type of systems, including, for example, eyepieces.In terms of stop position, the first and last types are analogous configurations and the design process to obtain both systems is similar [32].
We implemented and tested our ES for systems of the first type, the front stop case.Figure 1(a) illustrates this configuration with a scan lens that consists of a front stop, double convex, double concave and plane convex lenses.To represent a candidate for these optical systems, we define the vector L of stock lenses l j as being the relative position of each element in the vector the same as its corresponding real optical element in the OTS-OS.

Control parameters
Besides the location of the stop with respect to the lenses, other parameters that define the target optical system include the paraxial, physical specifications and the maximum aberrations allowed.First, the paraxial specifications are primarily defined by: (i) F-number (F/#), (ii) effective focal length (EFL), (iii) entrance pupil diameter (EPD), (iv) the paraxial field of view (FOV) at the image plane and (v) the source wavelength [32].For scan lens design, the system is set in this algorithm as monochromatic, and the source wavelength to be used with the scan lens is set as the target value.
As physical specifications (constraints), we set the maximum and minimum values for the (vi) lens diameters, (vii) the airspace between the stop and the first optical surface, named scanning distance; (viii) the airspaces between lenses, and (ix) the working distance.The latter is defined as the distance between the last optical surface and the image or scanning plane.Finally, the performance of the optical system is measured with (x) the root mean square (RMS) spot size at the image plane, (xi) the amount of f-theta (f − θ) distortion, and for telecentric systems, (xii) with the incident angle of the chief ray at the image plane [33], figure 1(b).The smaller these values (parameters x) to (xii), the better the overall performance of the scan lens.Figure 1(b) illustrates the rays' distribution on the image plane for one field after raytracing simulations.The difference between the paraxial chief ray and the real chief ray determines the amount of f − θ distortion, the RMS variance of the rays' position is calculated with respect to the chief ray and compared with the diffraction-limited spot radius (Airy radius).
The technical and performance parameters (previously listed from (i) to (xii)) for all the candidate systems are evaluated and stored in the control parameters vector y as the variables y i as shown in equation ( 3), y := (y 1 , y 2 , . . ., y i , . . ., y Σ ) . (3)

The ES
For optical design, the goal of the ES is to minimize an objective or merit function F with respect to a set of decision variables or control parameters y, as defined by equation ( 3), by performing a series of transformations on the population of optical systems and selecting the most fit candidates from the current population.These selected candidates are carried forward into the next generation population.Following the Beyer and Schwefel notation [34], the ES operates on populations B of individuals a.An individual a m with subindex m includes, for our problem, not only the control parameters y m and its merit function value F m := F(y m ), but also the optical system candidate L m of equation ( 2) and a set of strategy parameters s m .The strategy parameters s m are used to control the mutation operators that produce a new generation of offspring B o of OTS-OSs.Our ES is based on the (µ/ρ + λ)-ES with ρ = 1 (no recombination) [34]: a population of λ-offsprings individuals B o is generated from the set of µ-parent individuals a m by copying the parental set and performing on them a series of mutations.After the population of offspring is completed, a pool of γ = µ + λ OTS-OS candidates, with λ = µ, is used in the selection of a new generation of OTS-OSs.This process guarantees that only the best γ/2 OTS-OS are chosen and transferred into the next parental generation B (g+1) p . As follows, we describe the process to initialize the parental population B (g=0) p , the mutation operations established for our particular ES, and the evaluation, selection and termination conditions.

The population B (g=0) p
The initial candidates consist of OTS-OSs of three singlets, one negative and two positive focal length lenses.The combination of positive and negative lenses was chosen to compensate the Petzval curvature and f − θ distortion, and to provide enough scanning distance to place a scanning device at the stop of the OTS-OS [33].The scan lens candidates of the initial generation are based on two lens configurations, [+, +, −] and [−, +, +].The user can choose either one of these options or generate an equal-distributed population of the combination of both configurations.Figure 1(a) illustrates a [−, +, +] configuration.Due to the limited quantity and shapes of negative lenses in commercial catalogues, our method selects the positive lenses based on the mean focal length of the negative lenses within the catalogue as follows: first, the algorithm filters the catalog according to the required lens aperture sizes.Afterwards, it calculates the mean power φ− of the negative lenses left and it searches for the µ negative stock lenses with the closest power to φ− .The power of the positive lenses is calculated by using the paraxial approximation equation ( 4), where ϕ is the optical power of the target system.Once the set of positive and negative lenses are selected, the population of initial parental candidates B (0) p is built by a random combination of one negative and two positive lenses following [+, +, −], [−, +, +] or both configurations, Figure 2. Mutation operators used in the evolution strategy.

Mutation operators in the OTS design problem
From the parental population B (g) p at generation g, a new offspring is created by applying a set of transformations or mutation operators, as shown in figure 2. These operators are based on the actions commonly used by optical designers to improve an optical system such as splitting, swapping, inverting and permuting a lens element.In addition, we use the ES crossover to combine lenses between two parents.From all the mutation operators, splitting is an operator defined with a deterministic rule.As illustrated in figure 2, it splits the most optical-powerful lens into two randomly chosen lenses from a set of µ lenses with half of the original power.This procedure reduces the curvature of the optical surfaces, the angles of incidence and the aberrations' effect [35,36].Splitting a lens significantly contributes to increasing the performance of the optical system and becomes an important tool for fast systems, namely small F/#.However, when only the split operator is used in the strategy, the solutions tend to have a large number of lenses that lead to increased costs and inferior performance due to an overall sensitivity to the tolerances of the optical system.As shown in figure 2, we implemented additional operators to increase the stochastic exploration of systems with a limited number of lenses and to increase the interaction with the lens catalogue, a proposal that differs from those of state-of-the-art [22,23,25].For example, the swap and inverse operators are mutations executed only over the original parent.The swap operator exchanges the position of two lenses from their original configurations, leading to different configurations from the initially proposed in subsection 3.3.1.The inverse operator rotates an element 180 degrees with respect to its transverse axis.Alternatively, the crossover and permutation operators allow the interaction between other parents and the catalogue, respectively.The crossover operator combines one lens between two parents, generating two new offspring OTS-OS for each couple.The permute operator selects one element from the parent and randomly changes it with one lens with similar power from the catalogue.All the selection actions are randomly based except for the selection of the most powerful lens in the case of splitting operation.Additionally, the repetition ratio of a specific mutation operator is controlled by the strategy parameters s m , discussed in section 4.

Merit function and local optimization
After the mutation process, the offspring population B (g) o is given as a list of lenses and relative positions within the optical configuration.The airspaces between all the elements of each offspring, including the stop, are optimized to get a local minimum of the merit function value.The merit function uses the square difference of the measured and the target value of the control parameters defined in section 3.2 to quantify the fitness of the OTS-OS (e.g.F/# , EFL, RMS spot size, etc).These differences are weighted by factors W i .Besides the specifications of section 3.2, the merit function also measures the un-vignetting ratio v field of rays for three fields.Vignetting reduces the amount of energy incident on the target plane; thus, the algorithm penalizes those systems when a percentage of rays from any field falls outside the lens apertures [20].The merit function is set as Where the value y real i corresponds to the control parameter evaluated by ray tracing algorithms.Each value is then compared with the target specifications y target i .For reference, a value of v field = 1 means zero vignetting for the specific field.
The local optimization is iteratively performed using the damped least squares optimization algorithm until ∆F(y) < 0.01%.Our experiments show that this optimization takes less than 0.5 min per candidate, when running in a CPU i7-4790 3.60 GHz with 8 GB RAM.Until this point, the offspring population B (g) o comprises not only each list of stock lens references, but also the lens separations for which the OTS-OS perform with a merit function value F(y).

Selection and termination condition
The selection of the new parent individuals } is obtained from the pool of candidates γ = µ + λ of the generation g by pairing randomly offsprings and parents, and keeping the candidates with the best merit function values F(y).If the OTS optical system satisfies all the following rules, the candidate is then stored and classified as a successful candidate: (i) The system satisfies the control parameters y.
(ii) The ray-traced RMS spot radius of the system is equal or smaller than the Airy radius, for all the fields.(iii) f − θ distortion and telecentricity tolerances are satisfied.
(iv) The systems do not suffer from vignetting.
Finally, the algorithm runs until the termination condition is reached, which is met when the maximum number of successful OTS-OSs or generations, defined by the user, are reached.In case the maximum number of generations is reached first, the algorithm will always deliver the best designs found based on the same successful candidate's criteria.

Implementation of the algorithm
Algorithm 1 shows the pseudocode of our (µ/ρ + λ)-ES.It consists of the ES, the operators described in section 2, and it also involves the ray tracing, merit function evaluation and the optimization stage of the OTS-OS.While the entire ES was coded in Python, the ray tracing simulations and local optimizations were performed using the lens design software Zemax version 21.3 [20].Here, the communication between Python and Zemax is established to evaluate, in Zemax, the merit function of the OTS-OS, optimize the airspaces and support the selection of the best systems as explained in sections 3.3.3and 3.3.4.The selection of the best systems is performed in Python.Regarding the algorithm, at generation g = 0, the parent population B (0) p is initialized in line 1 of algorithm 1.At this point, three actions take place.(i) The algorithm creates a filtered catalogue from the original catalogue of stock lenses.We use the catalogue provided by the software Zemax, which includes a total of 15 108 lenses at the date of writing this paper, and consists of biconvex, plane concave, plane convex, biconcave and meniscus lenses.We set the lens aperture as a filter parameter to create the set of stock lenses used in a specific run.
(ii) The initial candidates are created following the strategy described in section 3.3.1.The algorithm traces a bundle of rays to evaluate the initial merit function of each candidate, then optimizes the airspaces and saves the final merit function F(y).These actions are performed by using Zemax raytracing tools.Finally, (iii) the strategy parameters s (0) are created.The variable s (0) = [s x , s s ] is a vector of two uniform and randomly generated numbers within the range [0, 1] that are compared to the probability values S x and S s to control the occurrence of crossover and splitting operations along the complete execution.
After the initialization line, the algorithm executes the repeat loop of lines 3-19.The strategy parameter vector s (0) is evaluated considering the probability values S x and S s for crossover and splitting, respectively.When the crossover condition does not apply (line 4), the parent population is cloned in an initial offspring population B

Results and discussion
In this section, the performance of the ES is demonstrated through two case studies.First, one commercially available scan lens is selected as a comparison model, and its optical specifications are used to evaluate the evolution of the optimization in function of the splitting probability S s .As a second demonstration, the performance of the ES is benchmarked with respect to a set of commercially available scan lenses.In this process, the solution domain, number of solutions and computing time are evaluated.

The scan lens model
Three hyper-parameters influence the dynamics of the ES in algorithm 1, to which we refer in this work as the strategy parameters.The first parameter is the seed used to generate the random list of lens systems, namely the initial population of OTS-OSs, which is used in all the random-based decisions.The other two parameters are S x and S s .In what follows, we describe the effect of these parameters on the dynamics of our ES and the nature of the generated OTS-OSs.To address such an analysis and provide a comparison reference, we chose as a case study the design specifications of the commercial scan lens CLS-SL (Thorlabs) [37].The CLS-SL is a commercially available telecentric scan lens optimized for confocal laser scanning microscopy systems [38].This lens system has large FOV and well-corrected telecentricity and f − θ distortion, as shown in the specifications of table 1.Within the scan systems, the scan lens CLS-SL has a good cost-performance balance, which makes it a good selection for multiple applications.Table 1 also compares the technical specifications of the commercial scan lens CLS-SL with the specifications of the scan lens obtained with our ES.Unlike the commercial system, we slightly decreased the F/#, leading to higher resolution, and increased the 2D-FOV of our OTS scan lens.Due to the current implementation of the algorithm, our scan systems perform only for one wavelength, although they operate for other wavelengths when re-optimized.The three last rows of table 1 compare the working distance, scanning distance and housing of the CLS-SL with one of the obtained OTS-OS.In general, OTS-OS present larger housings and shorter scanning and working distances.Figure 3(a) shows the ray tracing simulation for the scan lens CLS-SL and (b) the OTS scan lens of table 1 obtained by the algorithm.

Analysis of the strategy parameters
To evaluate the evolution of the search against different splitting occurrence ratios, we used in total five different seeds to randomly select the stock lenses, and two splitting probability values S s = 0.5 and S s = 0.65 to compare with a fixed probability value S x = 0.5 for the crossover operator.A combination of those parameters, as shown in table 2, results in eight optimizations where each of them consists of 60 generations (g = 60) with 30 candidates (µ = λ = 30).These experiments indicate that values S s < 0.5 lead to very slow convergence, a small number of solutions, and a poor evolution towards better candidates.Contrarily, values with S s → 1.0 lead to higher reachability, but they tend to systems with a greater number of lenses.On the other hand, when the strategy parameters are balanced, the obtained evolution of the accumulative number of successful candidates behaves as shown in figures 4(a)-(c).
The results show that (i) when 0.5 < S s < 1.0, the number of successful candidates is larger.It is found that a successful candidate in generation g has a greater probability of producing a new successful candidate in generation g + 1 after a splitting operation.(ii) S s > 0.5 values result in candidates with a large number for the minimum and maximum number of lenses over the whole ES execution.Contrarily, (iii) a value of S s ⩽ 0.5 has a larger likelihood of delivering systems with few stock lenses within the same number of generations.To measure the amount of stock lenses introduced in OTS candidates for the ES execution, we set as a metric the ratio between the number of successful candidates with [3,5] lenses and the overall number of successful solutions, as shown in table 2.
Although with S s > 0.65 a large number of lenses is obtained, the dynamics of the ES benefits from splitting operators to have a constant decrease of the merit function value of the overall candidates, in opposition to the stationary-like evolution of S s = 0.5 (see for example figure 4(b)).The splitting operation provides a smooth mutation thanks to its deterministic rule compared with the randomly based mutations from other operators (see, e.g.[25]).However, it is worthy to note that a small best merit function value does not consequently mean finding several successful candidates (compare for example figures 4(a) and (b)).
Regarding the random seed, it determines the stock lens selection for the optical configuration of the parental population and the other randomly based decisions along the ES, e.g. the selection of the lens location where to apply the other mutation operations.For example, figure 4(d) shows that the seed influences the merit function values of the initial configurations, see g = 0.However, a particular random list generator does not present a correlation with good reachability and evolution of successful candidates, thus, the ES converges to better and more diverse solutions independently of the randomness of their stock lens selection.

Application of the ES to scan lens specifications
In the following sections, the ES is used to design OTS scan lenses with different design specifications.

Estimation of the ES solution domain for scan lenses
In section 5.1.2,we analyzed the influence of the strategy parameters and used the design specifications of one commercial scan lens as control constraints.In what follows, we use the ES to design OTS scan lenses with different design specifications, a condition that mimics the real use of the tool we propose.In addition, we employ the optimizations presented in this section to benchmark the algorithm's performance to find systems with specifications similar to commercially available scan lenses.With this goal in mind, we listed the technical specifications of 468 commercially available scan lenses from 8 manufacturers.These systems include F/# from 1 to 89.70, FOVs between 2.99 mm and 1100 mm and wavelengths between 266 nm and 10 600 nm.The resulting list includes systems with different entrance aperture diameters, telecentric and Figure 5. Field of view vs F/# distribution of the commercial scan lenses (blue dots) and the chosen systems used in the ES optimizations (red dots).The specifications of the chosen systems (red dots) for which at least one OTS-OS labelled as successful was found are located within the solution's domain (green region).All the ES-optimizations were executed with the parameters g = 60, µ = λ = 30, Sx = 0.5 and Ss = 0.65.non-telecentric systems, systems corrected for f − θ distortion, among other characteristics.A complete description of the specifications is listed in supplementary list 1.The distribution of the commercial scan lenses in terms of their FOV and EFL is shown by the blue dots in figure 5.
Based on these specifications, we chose 28 commercial scan lenses to test the ES, which are listed in supplementary list 2 and shown as red dots in figure 5.The sampled list covers systems with various entrance aperture diameters, FOV, F/#, telecentric and non-telecentric systems, and 14 different wavelengths.
The ES was set with 60 generations g = 60, 30 candidates µ = λ = 30, probability parameters S x = 0.5 and S s = 0.65, seed = 3 and the lens aperture filter factor was set accordingly to the entrance aperture of the target systems.The 28 optimizations spent 373.28 h of computing time using a CPU i7-4790 3.60 GHz with 8 GB RAM.
The outcome of the 28 ES executions was used to estimate the region in which the ES algorithm is able to deliver successful OTS scan lenses (as defined in section 3.3.4).This region, denominated the solution's domain, was constructed considering the boundary between those specifications resulted from at least one found OTS scan lens (red dots in the green region in figure 5) labeled as successful, and those specifications with no generated successful solutions (red dots in the white region in figure 5).In the latter case, it was observed that the merit function values of their best systems were degraded by a factor of about four with respect to those tests with successful solutions, as shown in figure 6(a).Meanwhile, their spot size quality was degraded by a factor of about two with respect to the expected Airy radius, as shown in figure 6(b).The results show that although for some specifications the OTS-OSs exhibit some degraded performance, the candidates might still remain acceptable for conditions where less strict specifications, but still low-cost and rapid availability are needed, thus emphasizing the versatility and relevance of such an optimization tool.
In summary, figure 5 shows that the main limiting specification for OTS-OS scan lenses is the FOV, and that systems with a fast F/# and values smaller than F/3 represent a great challenge for the algorithm to obtain good combinations.This suggests that the constraint curvature values, curvature shapes and diameters of commercially OTS components are a crucial limiting factor for the generation of high-throughput OTS-OS [22,23,25,26].In the case of scan lenses, large FOVs and fast F/#s require from optical characteristics that are not covered by OTS-lenses, but for which customized commercially available scan lenses play a key role.

OTS-OS characteristics and ES computing performance
Besides determining the domain where the algorithm has a greater probability of success, we also assessed the algorithm's performance in finding an OTS-OS for a comprehensive set of control specifications.This task is challenging considering that each optical system requires a different optimization condition.Therefore, we set four metrics to quantify the algorithm's performance in finding a system with customized control parameters.The first metric, introduced in section 4, is the number of successful candidates.A solution with  more than one OTS-OS provides more freedom to the optical designer when choosing, adapting or adjusting the system to practical conditions.The second metric is the number of the generation when the first successful candidate was found.The third indicator includes the minimum and the maximum number of lenses in the OTS-OS, which help to estimate the systems' complexity.The last parameter is the number of systems with [3,5] lenses ratio.These 'performance' parameters are grouped and presented alongside each red point in figure 7(a) following the notation

Generation first successful candidate
Min.#of lenses Max.#of lenses/% [3,5]group .Figure 7(a) shows the metrics for the 14 tests that yielded successful candidates.As shown in figure 7(a), the distribution of the number of successful candidates tends to decrease when the F/# of the system increases, falling to less than five solutions for those configurations that belong to the region 25 ⩽ F/# ⩽ 90. Figure 7(a) also shows that regions that take more generations to find their first candidates include 16 ⩽ F/# ⩽ 90, while regions 1 ⩽ F/# < 16 take on average 4 generations to find the first candidate.This particular behavior suggests that the design specifications that fall within 25 ⩽ F/# ⩽ 90 are more susceptible to failure.We associate this behavior with the density of stock lenses in the catalogues: systems that belong to regions F/# ≲ 16 usually have a FOV that is smaller or similar to the lens aperture of the densest region of stock lenses, see supplementary figure 1.In addition, the same group of lenses readily provides the focal length to reach systems F/# ≲ 16, characteristic that is more challenging for larger focal lengths, FOV and apertures.Referring to [3,5] ratios, all tests, except for test 14, found at least one solution with a minimum 3, 4 or 5 lenses.
For the 14 tests with successful candidates (see figure 7(b)), the average computing time was 12.71 h running in the previously reported hardware.Moreover, the average computing time until the generation at which the first candidate was found was 3.07 h.Compared to the conventional design practices, the reported average computing times establish the proposed ES as an efficient tool to support the optical design process.
Finally, figures 8 and 9 show a selection of OTS-OSs from the pool of successful candidates.The sketch of the systems shows the stock lens configuration with the ray tracing simulations of three fields.The stock lens references of the OTS-candidates presented in figures 8 and 9 are listed in supplementary list 3.

Conclusions
Strategies to automate optical systems design are growing in interest with the request to be more efficient.This work introduces an efficient tool to an unresolved challenge in the photonics industry and academia: the automatic design of optical systems using commercially available stock lenses.
The design of OTS optical systems is a time consuming task that requires iterative and specialized human intervention.With our work, we introduced and formulated for the first time, to our knowledge, an ES for the automatic design of optical systems with OTS optics.The ES consists of mutation operations such as crossing, splitting, swapping, permuting and inverting that allow local and global system transformations.This strategy provides a practical and efficient exploration to the unreachable combinatorial solution space generated from stock lens catalogues, and revealed optical system configurations not possible to obtain with state of the art approaches.The results showed OTS optical systems comparable with the specification space of commercially available systems, what make the generated designs suitable for diverse applications.Furthermore, we demonstrated that evolution algorithms provide designers with an efficient tool for designing full OTS optical systems and reducing the design process time to a few hours in a regular laptop.The results presented in this work focus on scan lens design, however, the proposed framework could be generalized to other types of optical solutions and stop positions.The extensive range of specifications demonstrated with our results suggest that by only introducing additional mutations, e.g. the stop position, our approach can be extended to other types of optical systems typically used in imaging applications.Moreover, with expert and novice optical designers in mind, the algorithm was executed using a Python implementation and the commercially available optical design software Zemax.However, the algorithm can also be adapted to other design software by only adjusting the communication protocols.There are still several challenges to tackle with our approach.First, calling local optimizers and ray-tracing algorithms embedded in commercial software makes the current approach slow and time consuming.By considering standalone ray-tracing algorithms, e.g.programmed and integrated in the same code, the algorithm can significantly reduce computing time.Second, we also believe that more advanced evolution strategies with, for example, dynamic and guided operator's probabilities can lead to a better performance.The results obtained in this work show that the exploration versus exploitation of an optical configuration can be controlled by the hyper-parameters set in our ES.Therefore, a correct balance of those probability parameters leads to well performed systems with a low number of lenses.

Figure 1 .
Figure 1.(a) Sketch of a scan lens with power configuration [−, +, +] representing the target system (S: stop, SP: scanning/image plane, SL: scan lens, s.d.: scanning distance, w.d.: working distance).The red and blue lines represent two light fields.(b) Spot diagram of one light field that illustrates the control parameters used in this work.
(g)o (line 7), and is consequently modified with either the split operator (line 10), or by applying swap, invert and permute operators over 1/3 of the offspring population as shown in lines 12-14.Finally, the evaluation of the offspring population B (g) o and the selection of the new parental population B (g+1) p are executed in lines 17 and 18.

Figure 3 .
Figure 3. (a) Ray tracing simulations of the scan lens CLS-SL represented as a black box and (b) the OTS scan lens obtained with the ES.

Figure 4 .
Figure 4. Dynamics of the evolution strategy for the control parameters shown in table 1.(a) Evolution of the accumulative number of successful candidates for Ss = 0.5, Ss = 0.65 and three seeds.(b) Merit function evolution of the same execution conditions.(c) Evolution of the accumulative number of successful candidates for Ss = 0.65 and five seeds, seed 1 to 3 corresponds to the same executions from figures (a)-(d) Merit function evolution of the same execution conditions from figure (c).

Figure 6 .
Figure 6.(a) Distribution of the minimum merit function values grouped by the tests that delivered successful OTS scan lenses (Test Success) and under-performing scan lenses (Test Failure).(b) Distribution of the spot radius as a multiple of the targeted Airy radius for the same group of tests.(In both plots (a) and (b), lower is better).

Figure 7 .
Figure 7. (a) Number of successful candidates per test and characteristics of the solutions.(b) Total computing time and time to reach the first successful candidates for the tests with successful candidates.The test reference numbers correspond to those shown in figure (a).

Figure 8 .
Figure 8. Raytracing simulations of selected successful candidates from test one to four.All systems are telecentric.The geometrical layout of the OTS-scan lenses is shown next to the ray-spot diagram, field curvature and f − θ distortion plots, and a summary table listing the test wavelength (λ), Airy radius, entrance pupil diameter (ENPD) and the obtained RMS spot radius for four angular fields.As reference, the dark circles in the spot diagram represent the diffraction limited Airy spot.The field curvature is shown for the sagittal (dashed-line) and tangential (solid-line) rays.

Figure 9 .
Figure 9. Raytracing simulations of two selected successful candidates from test 11 and 12.Both systems are non-telecentric.The geometrical layout of the OTS-scan lenses is shown next to the ray-spot diagram, field curvature and f − θ distortion plots, and a summary table listing the test wavelength (λ), Airy radius, entrance pupil diameter (ENPD) and the obtained RMS spot radius for four angular fields.As reference, the dark circles in the spot diagram represent the diffraction limited Airy spot.The field curvature is shown for the sagittal (dashed-line) and tangential (solid-line) rays.

Table 1 .
Specs F/17.5 commercial lens Thorlabs and the final specs of the selected stock lens design.

Table 2 .
Combination of the probability values and their results for eight ES executions with the control parameters of table 1.