Intelligent programmable mode-locked fiber laser with a human-like algorithm

Nonlinear polarization evolution-based passively mode-locked fiber lasers with ultrafast and high peak power pulses are a powerful tool for engineering applications and scientific research. However, their sensitivity to polarization limits their widespread application. To address this, automatic mode-locking immune to environmental disturbances is gaining attention. Here, we experimentally demonstrate the first intelligent programmable mode-locked fiber laser enabled by our proposed human-like algorithm, combining the human approach with machine speed, computing capability, and precision. The laser is capable of automatically locking onto multiple operation regimes, such as fundamental mode-locking, harmonic mode-locking, Q-switching, and even Q-switched mode-locking without physically altering its structure. The shortest initial mode-locking time and recovery time from detachment are only 0.22 s and 14.8 ms, respectively, which are the record values to date. We believe this intelligent laser with superior performance can find practical applications in engineering and provide infinite possibilities for scientific research. © 2019


INTRODUCTION
Ultrafast fiber lasers have extensive applications in optical frequency measurements [1][2][3][4], high-resolution atomic clocks [5,6], signal processing [7,8], ranging metrology [9,10], and astronomy [11,12]. The mode-locked fiber laser (MLFL) is the primary means of generating ultrafast pulses with extremely high peak powers and incredibly wide spectra. Nonlinear polarization evolution (NPE) is particularly favored by researchers as the main method to realize passively MLFL. This is because of its simple structure, superior performance, and rich nonlinear dynamics [13][14][15][16][17][18][19][20][21]. Through flexible polarization control, an NPE-based MLFL can produce harmonic mode-locking (HML) [16,17,22] with high repetition rates, Q-switching (QS) [23][24][25] with high pulse energies, and Q-switched mode-locking (QML) with high pulse peak powers [25,26]. These operating regimes combined with the fundamental mode-locking (FML) regime show the rich nonlinear dynamics of the NPE-based MLFL. However, manual polarization control is difficult to locate in other rare regimes (except for the FML regime) in passively MLFLs because the corresponding polarization solution space is much narrower. Under the disturbance of thermal instability and mechanical vibration, polarization control in the NPE-based MLFL becomes more difficult [27,28]. Thus, fast and programmable polarization controlbased automatic mode-locking is urgently required. Automatic mode-locking through direct sweeping of polarization space has been reported with the help of electrical polarization control [18][19][20][21]. This method is straightforward but inefficient because the entire polarization space is extremely large. Recently, genetic and evolutionary optimization algorithms have been used to achieve automatic mode-locking through fast polarization searching [27][28][29][30][31]. Automatic mode-locking applying machine learning and deep learning have also been demonstrated [32][33][34][35][36]. Owing to the complexity of the genetic algorithm/evolutionary algorithm/ deep learning methods, the automatic mode-locking procedure is time-consuming. Offline searching the polarization space is required in the above-mentioned methods, further limiting the automatic mode-locking time. For instance, the automatic modelocking time is around 30 min [27,29] and even up to 2 h when searching HML regimes [30]. The long mode-locking time and long recovery time from disturbance limit the practical applications in engineering.
Genetic, evolutionary, and neural-network-based deep learning algorithms are considered as the main intelligent algorithms in the artificial intelligence field. The intelligent-algorithm-based MLFLs are known as autosetting lasers [30], smart lasers [27], and self-tuning lasers [33,36] (because the lasers can automatically reach the desired operation regime). However, they cannot be regarded as intelligent lasers yet. In our opinion, an intelligent MLFL should have the capability of automatically locking on and switching to any possible operation regime in a fixed laser cavity, such as FML, HML, QS, and QML. Additionally, the polarization-searching algorithm should learn and follow the human approach. None of the previous automatic MLFLs meet these criteria, where only one or two regimes have been achieved and the intelligent algorithms are completely different from the human approach. To illustrate, the genetic algorithm follows Darwin's biological evolution theory and genetic mechanism, which is completely different from the manual mode-locking tuning procedure where humans are tuning polarization via their direct and high-efficiency logic to make decisions. Additionally, even though the intelligent algorithms can achieve the objective of mode-locking through global optimization, the searching time is too long (even longer than an experienced researcher). Compared with a machine, a human's core advantage is logic. The main advantages of machines include speed, computing capability, and precision. Hence, a genuine intelligent algorithm should combine the advantages of humans and machines.
In this study, the first real-time intelligent MLFL is experimentally demonstrated that can automatically lock on and switch to FML, HML, QS, and QML regimes using our human-like algorithm. The human-like algorithm combines the advantages of humans and machines. It consists of advanced Rosenbrock searching, random collision recovery, and discrimination of each regime. The advanced Rosenbrock searching algorithm guides the passively MLFL from free-running to the desired operation regime. Random collision recovery is our proposed algorithm to recover the passively MLFL back to the desired operation regime from detachment induced by environmental disturbances. Both advanced Rosenbrock searching and random collision recovery learn and follow the human approach in the polarization-tuning process for mode-locking. We set a series of objective functions for different operation regimes and use them as the discrimination criteria during the entire process. Attributed to the human-like algorithm, the shortest mode-locking time from free-running toward the FML regime expends only 0.22 s. This is the fastest among all automatic mode-locking realizations to the best of the authors' knowledge. For ten repeated experiments with randomly assigned original states of polarization (SOP), the average modelocking time is only 3.1 s. The pulse width varies from 115 to 155 fs, even though the corresponding driven voltages of the electrical polarization controller (EPC) are different. This shows the repeatability of the intelligent system. The fastest recovery from the vibration-induced detachment via random collision recovery of the human-like algorithm costs 14.8 ms (which is also a new record). The fast recovery time from detachments can protect the subsequent devices from being damaged by the high-power QS pulses during detachments [37]. Note that the human-like algorithm is implemented in a field-programmable gate array (FPGA), which contributes to its simplicity. Only an analog-to-digital converter (ADC) and four digital-to-analog converters (DACs) are required to construct the feedback loop. Therefore, this intelligent MLFL with multiregime operation, fast mode-locking, low cost, and high stability is suitable and ready for engineering applications. Furthermore, through recording several sets of voltages leading to different operation regimes (i.e., the experienced values) the laser can achieve microsecond-level switching among different operation regimes. Additionally, this intelligent control system could be used in any feedback system with complex nonlinear dynamics but without a known nonlinear model. Figure 1(a) compares recent automatic mode-locking works and our work on initial lock time, recovery time, and number of regimes. The initial lock time of our laser is 400 times shorter than the reported shortest initial lock time to date. Our laser's recovery time is 2000 times shorter than the previously reported shortest recovery time. Additionally, our laser can realize five different regimes in an identical setup (the most among these works). The results of the comparisons illustrate the efficiencies of both the proposed human-like algorithm and the real-time experimental setup.

PRINCIPLES
The human-like algorithm mainly consists of three portions: the advanced Rosenbrock searching algorithm, the random collision recovery algorithm, and the discrimination of each regime. The human-like algorithm [ Fig. 1(b)] starts from advanced Rosenbrock searching, which is utilized to lock onto the desired regime. After locking onto the desired regime, the human-like algorithm focuses on discrimination-based monitoring (unless detachment is detected). Random collision recovery attempts to pull the laser back on track afterward. The human-like algorithm goes back to the monitoring process if the recovery is successful. Otherwise, restarting advanced Rosenbrock searching is necessary to anchor a new desired point. This software scheme is denoted as the human-like algorithm because our proposed algorithm has many features in common with human logic and behaviors in the manual mode-locking process. The advanced Rosenbrock searching process is somewhat an analogy of human behaviors in polarization tuning. Let us consider how a highly experienced researcher manually tunes the polarization controller (PC) for the FML regime. Initially, three or four knobs of the PC are randomly (b) Schematic of human-like algorithm. Advanced Rosenbrock searching keeps on running until the desired regime is achieved. A discriminationbased monitoring phase is used to detect detachment. Once detachment appears, random collision recovery tries to return to the desired regime. Human-like algorithm initializes advanced Rosenbrock searching from the breakpoint when random collision recovery fails to recover. tuned to approach the critical FML regime. Correspondingly, advanced Rosenbrock searching randomly assigns the SOP of EPC at the starting point. When the researcher notices the peaks' voltages of the waveform increasing (using an oscilloscope), they continue tuning in the current direction (just like the advanced Rosenbrock searching pace reward mechanism). Otherwise, the researcher tunes in the opposite direction, which corresponds to the pace punishment mechanism in advanced Rosenbrock searching. Near the mode-locking regime, the tuning step switches from coarse to fine. Therefore, the advanced Rosenbrock searching algorithm follows similar logic and behavior as a human but with much faster speed and tuning precision. As most detachments are considered to be the result of environmental disturbances (with only minor SOP drift), humans usually conduct random fine tuning on the original mode-locking SOP. If the laser cannot recover from the detachment by random fine tuning, the tuning step is enlarged by the researcher using the reward and punishment mechanism. The random collision recovery algorithm's response is similar to the human's after detachment happens but with much faster speed. Hence, we consider the human-like algorithm, which combines the human approach with machine speed, computing capability, and precision. Figure 2 illuminates the real-time intelligent MLFL, where a 980 nm laser pumps an 8 m erbium-doped fiber (EDF) as the gain medium. In order to enhance nonlinear effects, a 5 m singlemode fiber (SMF) is inserted after the EDF. A 50:50 optical coupler keeps half of the power inside the cavity for oscillation while the other half is sent for detection. The isolator guarantees unidirectional running of the cavity, and the polarizer is the key component in NPE-based mode-locking. The core polarizationtuning component in the cavity is an EPC, which is driven by four channels of 0-5 V DC voltage and is capable of generating all possible SOP over the Poincaré sphere. Concretely, each set of voltages corresponds to a certain SOP on the Poincaré sphere. Therefore, only one EPC is required in the laser setup as in Ref. [31], and single EPC utilization sharply reduces the cost. Moreover, the EPC can respond in microseconds. A 10 GHz photodetector is used to complete the conversion from optical to electrical. For simplicity, some measurement devices outside the cavity, including an oscilloscope, an optical spectrum analyzer, and an electrical spectrum analyzer, are not illustrated in Fig. 2. The cavity length of the fiber laser is ∼28.7 m. In the electronic part, an ADC, an FPGA, and four DACs together constitute the human-like feedback control panel. The ADC functions like a human's eyes in monitoring the waveforms. The part number of the ADC is AD9286, and it is an 8-bit ADC with an up to 500 MSa/s sampling rate. The sampled waveform is then delivered to the FPGA (the computing center which performs a similar function to the human brain in this instance) for the desired regime searching utilizing the advanced Rosenbrock searching algorithm. We choose ZC702 from Xilinx as the computing center for its remarkable performance. During the searching process, the FPGA adjusts the DC voltage through four DACs. The DAC translates the instructions from the FPGA to the DC voltage and finally acts on the EPC. This process is quite like a human's hand tuning a PC or wave plate. The four DACs are AD9706 with 12-bit resolution and a 175 MSa/s sampling rate. These steps are repeated one by one until the desired regime is achieved.
The advanced Rosenbrock searching algorithm is the core component of the human-like algorithm and is illustrated in Fig. 3(a). It is based on the traditional Rosenbrock algorithm, which is an unconstrained direct search method [38]. The distinguishing feature of advanced Rosenbrock searching from the traditional Rosenbrock algorithm is a unique exit mechanism called patience. Patience involves a preset parameter, which is the maximum of successive exploration failures that the advanced Rosenbrock searching algorithm can tolerate. Once patience is exceeded, the current optimization is terminated immediately. Subsequently, a new exploration starts from a new random point. Due to this unique exiting mechanism, the advanced Rosenbrock searching algorithm outperforms the traditional Rosenbrock algorithm in exploiting the potential toward various regimes of each initial point and avoids the difficulty of moderately choosing the exiting variation threshold (as required in the traditional Rosenbrock algorithm). In this experiment, DC voltages of the EPC are the variables and the size of the voltage space is extremely large at 4096 4 (as confined by the resolution of the DAC). The objective of advanced Rosenbrock searching is chosen to be some special feature of the time-domain waveform or fast Fourier transform (FFT) result, depending on which regime the laser is desired to operate on.
The SOP of light in fiber always varies with the birefringence variation induced by temperature, strain, mechanical vibration, and other environmental factors. SOP sensitivity to environmental disturbances has frustrated MLFL development for a long  Research Article time, because it induces frequent detachments, increases the instability of MLFLs, and simultaneously decreases its practicality in many scenarios. Fortunately, this kind of SOP variation drifts slowly when external factors change slowly [39]. Therefore, after detachment from the desired regime, the current SOP is close to the altered SOP area corresponding to the desired regime [28]. The random collision recovery principle is illuminated in Fig. 3(b). The target area, which corresponds to the desired regime before and after the birefringence variation, are illustrated on the Poincaré sphere via different colors. The black star is the original target point but fails to lock after birefringence variation. Inside the dashed-line circle is the area that the random collision recovery algorithm operates on, which is defined by the collision range (a preset parameter in random collision recovery). Note that the collision range is smaller than the tuning step in the advanced Rosenbrock searching algorithm. The blue diamonds are failed attempts of random collision recovery, and the red squares successfully recover back to the desired regime via random collision recovery. The random collision recovery algorithm changes the current SOP by adding a tiny SOP variation. Next, the random collision recovery algorithm directly discriminates on the waveforms under the altered SOP until the desired regime is detected. Nevertheless, random collision recovery is judged as a failure after dozens of trials have been conducted, in which case the algorithm will reboot the advanced Rosenbrock searching process from the breakpoint.
Pulse count proves to be an effective method in discriminating mode-locking regimes [18][19][20]. To eliminate higher HML regimes, the dual-region count scheme is proposed and is illustrated in Fig. 4(a), where blue pulses in green regions are desired, while red pulses out of green regions are considered to be noise. Threshold 1 [blue dashed line in Fig. 4(a)] is built for the desired pulse count. Threshold 2 [red dashed line in Fig. 4(a)] is a limit that noise should not exceed. Ideally, the count in green regions (denoted as C ideal ) should satisfy C ideal floor N total_pts N period_pts or floor N total_pts N period_pts 1: (1) Here, N total_pts represents the number of points that ADC obtains each time and N period_pts denotes the number of period points between two pulses, which is decided by the ADC sampling rate and the repetition rate. The floor function is to round down. Contrarily, the counts out of green regions should be zero. For real-time automatic mode-locking, successful and fast discrimination of different operation regimes is crucial. A set of objective functions are designed to address this problem. The waveform is evaluated as the FML regime when dual-region count is satisfied. Our previous criteria [18], which involve setting a threshold on the variation of pulse train, are unable to execute because of the ADC sampling rate constraint. As is well known, mode-locked pulses have a considerably larger amplitude than the free-running state. The objective function of the FML regime derived from this feature is where A i denotes the amplitude of pulse and C is the pulse count from the dual-region count. Hence, the objective function of the FML is the average of counted pulses' amplitudes.
The nth HML regime discrimination is slightly more complicated. First, dual-region count satisfaction is essential. Through observation of FFT results of HML regimes, it is found that the amplitude of the nth spectral component is largest among all the spectral lines for the nth HML regime. Furthermore, the knth (k > 1 and k cannot be too large) spectral line is much stronger than other spectral lines, especially between the knth spectral line and the k 1nth spectral line. For instance, Fig. 4(b) shows the FFT result of the second-order HML regime below 200 MHz. It is clear that the second spectral line is the strongest and all even spectral lines are stronger than the odd spectral lines. This phenomenon is more evident in the FFT result of the third HML regime, as shown in Fig. 4(c). The third spectral line is the strongest, and all integer multiple of three spectral lines are distinctly stronger than other spectral lines. This relation offers the other accurate discrimination criterion for the nth HML regime, which is that the nth spectral line of the FFT result should be the strongest. The waveform is only judged as the nth HML regime when both the time-domain dual-region count and the FFT condition are satisfied simultaneously. The objective function of the nth HML is as follows: in consideration of the special FFT characteristic of HML. L n , L 2n , and L 3n represent the amplitudes of the nth, 2nth, and 3nth spectral lines, respectively. The denominator of Eq. (3) represents the amplitude sum of all FFT spectral lines. Analogously, QS and QML regime discrimination can be achieved in virtue of FFT results. The majority of FFT spectral components of QS and QML concentrate on low frequencies, as illustrated in Figs. 4(d) and 4(e). This is because of the low repetition rate of QS and the envelope of QML. The difference with the QML regime is that there are mode-locked pulses within the envelope. This indicates the existence of considerable higherfrequency spectral components. As shown in the right inset of Fig. 4(e), the center peak is the carrier frequency, whereas the side peaks indicate that the carrier is modulated by a low-frequency envelope. The objective functions of QS and QML for optimization are as below, where F lf denotes the amplitude of lowfrequency FFT spectral components and the denominator of this equation represents the amplitude sum of all FFT spectral components. We have After the objective function value surpasses the preset threshold, the FFT result is scanned to inspect whether considerable higherfrequency spectral components exist. When the FFT result only exhibits very strong low-frequency spectral components, the current waveform is judged to lie in the QS regime. Otherwise, it is judged to lie in the QML regime. Since all the discrimination criteria for multiple regimes are based on the characteristics of mode-locking regimes and the basic relationship between time and the frequency domain, they are universal for all the modelocked lasers.

RESULTS AND DISCUSSION
Under the guidance of the human-like algorithm, the laser can automatically achieve multiple operation regimes without any physical structure alteration to the setup. The measured oscilloscope traces, optical/frequency spectra for the FML, secondand third-order HML, QS, and QML under 600 mW pump power are illustrated in Fig. 5. Clearly, a fundamental repetition frequency of ∼7.2 MHz is revealed by frequency spectra. Since the cavity has no dispersion management, the laser works under soliton mode-locking with anomalous net dispersion. From the frequency spectrum of the second-order HML regime, the second spectral line is the strongest. However, the difference between the second spectral line and the fourth line is as small as 1.7 dB. The fourth, sixth, and even eighth spectral lines are stronger than the third, fifth, and seventh spectral lines, respectively. While in the third-order HML regime, it is clear that the triple order of fundamental spectral lines is stronger than the rest of the spectral lines. Overall, the characteristics of the frequency spectra validate the effectiveness of the proposed HML objective function.
Through the frequency spectrum of the QS regime, the repetition rate of the QS pulse is determined to be approximately 115 kHz. This is far lower than the mode-locked regimes. As expected, the optical spectra width of the QS regime is much narrower compared with the mode-locked regimes because of much wider pulses. The envelope frequency of the QML is 200 kHz, and the basis of the carrier is the second order of the fundamental repetition frequency. Note that the laser can achieve microsecondlevel switching between multiple operation regimes by recording and setting the experienced values.
To prove the validity of the proposed FML objective function, a scanning experiment is conducted. During scanning, the voltages of channel 1 and channel 2 of the EPC are fixed. Next, the voltages of channel 3 and channel 4 of the EPC are swept from 0 to 5000 mV (with a step of 24.4 mV). The scanning results of the FML objective function value and the mode-locking status are illustrated in Fig. 6(a) and Fig. 6(b), respectively. Interestingly, the objective function value distribution presents a stair-like shape. The zone of higher objective function values is flat because Fig. 5. Operation regimes. From left to right: FML, second-order HML, third-order HML, QS, and QML operation regimes are shown. In each column, the top row shows oscilloscope traces, the middle row illustrates optical spectra, and the bottom plots are frequency spectra. The fundamental repetition frequency is ∼7.2 MHz, which is evident from the frequency spectra of the FML regime. The oscilloscope traces of two HML regimes are distinctly denser than that of the FML regime, and the features of their frequency spectrum are in accordance with the HML discrimination. The repetition frequency of the QS regime is 115 kHz. The envelope frequency of QML is 200 kHz, and the carrier frequency is ∼14.4 MHz.
the amplitude of the pulse is even larger than the conversion range of the ADC. The higher objective function values assemble in the zone where the voltage of channel 3 surpasses ∼3400 mV. The same situation occurs with the mode-locking distribution. It is clear that almost all mode-locking points aggregate in the area where the voltage of channel 3 is over ∼3400 mV. In this area, there are still numerous points that cannot lead to the FML regime forming many small areas unable to achieve the FML regime. However, when the voltage of channel 3 is less than ∼3400 mV, there is lack of mode-locking points. From Fig. 6, we can see the high objective function value corresponds to the high probability of mode-locking. Therefore we can conclude that the objective functions we choose are effective. In other words, a larger average of counted pulses' amplitudes more likely correspond to the FML regime. This result is consistent with our proposed objective function. Moreover, Fig. 6(c) records the optimization path during the FML searching. The advanced Rosenbrock searching algorithm can reach the FML regime within several effective optimization times, which reveals the high efficiency of the advanced Rosenbrock searching algorithm.
To demonstrate the time-consumption performance of our system, ten successive experiments of the FML on initial modelocking and recovery from detachment are performed. The results are shown in Fig. 7(a). The initial DC voltages of the EPC for each time-advanced Rosenbrock searching are completely random and correspond to random original SOP in the cavity. It only takes a few seconds from free-running to the desired FML regime because of the high-efficiency advanced Rosenbrock searching algorithm and valid objective function. The mean of ten initial lock times is only 3.1 s (the longest is 12.8 s). The shortest cold boost only takes 0.22 s. To the best of the authors' knowledge, this is the fastest time recorded for automatic mode-locking. For the recovery time, ten successive recoveries all finish within 100 ms. The detachments originate from bending or twisting the fiber manually. The longest recovery time is 95.2 ms, and the mean of ten recovery times is 58.9 ms. The shortest recovery time is 14.8 ms. Still, it is the fastest recorded recovery time (to the best of the authors' knowledge). Except for the three recoveries marked in gray, the other seven recoveries are successfully achieved through the proposed random collision recovery algorithm (and with less time than the three relocking events via advanced Rosenbrock searching). The longest time consumption of the three relocking via advanced Rosenbrock searching is 95.2 ms, which is much less than the initial mode-locking time through advanced Rosenbrock searching. The reason for this is that the distance between the current SOP and the desired SOP area is out of the collision range in the random collision recovery algorithm. However, the current SOP is not far from the desired SOP area (due to the slow drift nature of the SOP under environmental disturbance), so it is easily reached by advanced Rosenbrock searching with a larger tuning step than random collision recovery. Owing to the extremely fast recovery, the detachments from mode-locking are visually undetectable and only the software can record these events. This demonstrates the speed and efficiency of the random collision recovery algorithm. The overall time consumption of advanced Rosenbrock searching and random collision recovery consists of the time for data reading from the ADC, time for controlling voltage output through the DAC, and time for the algorithm execution. The time consumption of the advanced Rosenbrock searching algorithm is largely determined by the distance between the initial SOP and the desired SOP in the mode-locking area. However, considerable time is consumed in data reading from the ADC in the random collision recovery process. Each trial in random collision recovery costs ∼1 ms in which the response time of the EPC is 10 μs at most. However, the data reading process needs ∼450 μs, which is nearly half the time of each trial. The time-consumed controlling voltages output via the DAC is less than 2 μs, and the remainder is expended on random SOP generation and discrimination. The time consumption could be further reduced with a faster ADC and a more powerful computing center. Note that the fast recovery time from detachments is extremely important for industrial applications because the optical devices followed with the MLFL are vulnerable to sustained high-power QS pulses during detachments [37]. Meanwhile, the fast initial mode-locking time is important for observing and investigating the pulse formation process of the NPE-based MLFL. For comparison with the  Research Article genetic algorithm, an offline measurement is performed using the advanced Rosenbrock searching algorithm and the genetic algorithm with an identical physical setup. Here, the offline measurement represents using an oscilloscope as the ADC and using a computer as the computing center in the experiment because the sampling data transmission from the oscilloscope to the computer via Ethernet or serial ports is rather time-consuming and the computing speed of the computer is slower than that of an embedded device. To achieve the FML regime, the genetic algorithm with a population size of 40 requires 20 min, while the advanced Rosenbrock searching algorithm only needs 1 min. In the offline measurement, the time cost mainly consists of the sampling data transmission from the oscilloscope to the computer, the algorithm running time on the computer, and the EPC controlling time through the computer and the DACs. This comparison further validates the simplicity and effectiveness of the proposed advanced Rosenbrock searching algorithm. Due to the smaller solution space compared with the FML, it usually costs much more time (sometimes needs several minutes) to achieve other rare regimes (including the HML regime, the QS regime, and the QML regime).
A 15-day running test was conducted under the guidance of the human-like algorithm. The running record is shown in Fig. 7(b). The laser reaches the FML regime with the help of advanced Rosenbrock searching after only ∼0.5 s. There were 12 detachments in 15 days. Of those, 11 were successfully recovered using the random collision recovery algorithm giving a mean recovery time of only 31 ms. The rest detachment was recovered through rerunning the advanced Rosenbrock searching algorithm. It should be noted that the long-period running test was conducted in an open environment without any assistance from thermal-stability or vibration-protection devices. These results experimentally demonstrate the stability and anti-noise ability of our proposed human-like algorithm.
The autocorrelation traces and full width at half-magnitude (FWHM) of the FML pulses are measured in another ten independent measurements. Figure 7(c) shows that the autocorrelation pulses have little difference in shape. As indicated in Fig. 7(d), the maximal FWHM and the minimal FWHM in ten autocorrelation pulses are 155 fs and 115 fs, respectively. Further, most pulse widths vary by 20 fs. This proves the stability of the output pulse shape and the width of the proposed laser during repeated on-off operations.

CONCLUSION
In conclusion, the first real-time intelligent MLFL using the proposed human-like algorithm has been experimentally demonstrated. The laser is considered intelligent because it can be automatically locked on different operation regimes including FML, HML, QS, and QML without any physical structure alteration to the setup. Additionally, it can quickly recover from environmental-disturbance-induced detachments (not previously possible). The human-like algorithm combines the human approach and machine speed, computing capability, and precision. In our opinion, this should be the key of an intelligent algorithm. The intelligent MLFL exhibits the fastest initial mode-locking and recovery times of 0.22 s and 14.8 ms, respectively. This is attributed to the simplicity and effectiveness of the human-like algorithm and the real-time feedback control. Moreover, excellent performance in a 15-day running test was observed in which the stability and anti-noise ability of the human-like algorithm was clearly demonstrated. This intelligent MLFL will surely find versatile applications in engineering and scientific research fields. The intelligent human-like algorithm is also applicable to other complex nonlinear systems without an established nonlinear model.