A path planning method based on SCA-QL

By running the SCA-QL algorithm in the simulation environment and using the improved sine and cosine algorithm to initialize the Q value table and generate an iterable population, the problem of convergence speed and result accuracy of the Q-learning algorithm in complex environments is solved, achieving a more efficient path planning.

CN115016499BActive Publication Date: 2024-10-25JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210792993.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2024-10-25
Estimated Expiration
2042-07-07

AI Technical Summary

Technical Problem

The Q-learning algorithm is prone to falling into a loop of searching for targets in complex environments, making it difficult to converge, and may fall into a local optimal solution due to excessive greed, which reduces its convergence speed and result accuracy in complex environments.

Method used

The path planning method based on SCA-QL is adopted, by running the improved SCA-QL algorithm in the simulation environment, using the improved sine and cosine algorithm to initialize the Q value table, and combining the Q-learning method to train the reinforcement learning model to generate an iterable population. Path planning.

Benefits of technology

It improves the path planning efficiency of the agent in complex environments, reduces invalid iterations, obtains more accurate path planning results, and improves the convergence speed and result accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115016499B_ABST
    Figure CN115016499B_ABST
Patent Text Reader

Abstract

The present invention discloses a path planning method based on SCA-QL, and the method comprises the following steps: first, obtaining real environment information, including the starting position and end position information of an intelligent agent in a real environment, and obstacle position information; second, establishing a simulation environment for training the intelligent agent according to the real environment information; third, running the SCA-QL algorithm in the simulation environment to train the intelligent agent to solve the optimal path: wherein, the established Q value table is initialized by improving the sine-cosine algorithm, and on this basis, a reinforcement learning model is trained based on the Q-learning method to solve the optimal path. Beneficial effect: a large number of invalid iterations in the aimless and completely random search process of the Q-learning method in the initial stage of training are reduced. The method has a faster convergence speed and more accurate path planning results, and improves the path planning efficiency of the intelligent agent in complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a path planning method, and in particular to a path planning method based on SCA-QL. Background Art

[0002] At present, with the development of intelligent technology, intelligent agents represented by smart cars and smart robots are being applied to more complex and diverse scenarios. Path planning method is one of the important core technologies of mobile intelligent agents.

[0003] Current path planning methods can be divided into three categories: search-based methods, sampling-based methods, and swarm intelligence-based methods. Among them, the search-based method mainly discretizes the state space in a certain way, and then searches for feasible solutions through heuristic search algorithms. This type of algorithm has analytical completeness and even optimality. Representative algorithms include Dijkstra algorithm, A* algorithm, D* algorithm, etc. The basic idea of ​​the sampling-based method is to construct a connected graph by uniformly random sampling of the state space. When the initial and target states are in the graph, the planning problem is solved. The random sampling algorithm does not need to explicitly model the state space. Representative algorithms include PRM algorithm, RRT algorithm, etc. The swarm intelligence-based method performs path planning by simulating the behavior of biological organisms in nature. The more classic ones include ant colony algorithm and genetic algorithm.

[0004] In recent years, reinforcement learning methods have been widely used in various fields to solve the optimal behavior strategy of intelligent systems in the environment. Its characteristic is that it can enable the intelligent agent to learn through the interaction between the intelligent agent and the environment, and finally learn the optimal sequential decision. The Q-learning algorithm is a widely used reinforcement learning algorithm. Its characteristic is to establish the Q value that represents the state and action transfer relationship of the intelligent agent, form a Q value table, and update the Q value table by rewarding and punishing the intelligent agent during its exploration of the environment, so that the intelligent agent can give the optimal action for different states after learning to maximize the long-term reward.

[0005] The Q-learning algorithm is often used to solve the path planning problem of mobile agents. It performs agent learning through the interaction of the agent with the environment with obstacles and targets, and completes the planning of the optimal path. When the agent has a complete understanding of the state of the environment, the Q-learning algorithm often obtains the optimal path planning result. However, when the environment is more complex, the agent will fall into a cycle of searching for the target due to the lack of prior information about the target and it is difficult to converge to the result. In addition, for complex environments, the Q-learning algorithm may fall into a local optimal solution due to excessive greed for existing learning knowledge, and reducing the greediness will cause the convergence speed to drop significantly. Therefore, it is necessary to improve the Q-learning algorithm to improve its convergence speed and result accuracy for complex environments. Summary of the invention

[0006] The main purpose of the present invention is to improve the Q-learning algorithm to increase its convergence speed and result accuracy for complex environments, and to provide a path planning method based on SCA-QL.

[0007] The path planning method based on SCA-QL provided by the present invention comprises the following steps:

[0008] The first step is to obtain real environment information, including the starting and ending position information of the agent in the real environment, and the obstacle position information;

[0009] The second step is to establish a simulation environment for agent training based on the real environment information. The simulation environment establishment process includes: establishing an environment model based on the real environment information, dividing the environment model using the grid method, marking the grid positions based on Cartesian coordinates, determining and marking the grids corresponding to the starting position and the end position coordinates in the environment model, and similarly marking the grids corresponding to the obstacle positions in the environment model according to the obstacle position information.

[0010] The third step is to run the SCA-QL algorithm in the simulation environment to train the intelligent agent to solve the optimal path: the Q-value table is initialized by improving the sine-cosine algorithm, and then the reinforcement learning model is trained based on the Q-learning method to solve the optimal path.

[0011] The SCA-QL algorithm in the third step is an improved reinforcement learning method. The main steps are as follows:

[0012] Step 1: Initialize the parameter space and set the hyperparameters. During the parameter space initialization process, the parameter space specifically refers to the set of important variables in the SCA-QL algorithm. The initialization process includes the algorithm's creation of the set and the setting of initial conditions.

[0013] The parameter space includes at least: state space S, which represents the set of possible states of the agent; action space A, which represents the set of actions performed by the agent; reward function space R, which represents the expected set of reward functions for specified states and actions; action value space Q-table, which represents the expected set of cumulative values ​​brought by the agent's actions for specified states and actions; population space X, which represents the set of iterable individuals of the SCA algorithm;

[0014] The hyperparameters include at least: greediness ε, which affects the degree of reliance on learning information in the decision-making process of the agent, specifically indicating the probability of the agent's decision-making process selecting the action with the maximum Q value; learning rate α, which affects the learning speed of the agent for the action with the most action value; decay coefficient γ, which affects the decay benefit when considering the impact of future action rewards on the current action value; maximum number of iterations Max_Iteration, which specifically indicates the maximum number of iterations in each loop stage in the algorithm, used to terminate the algorithm and avoid infinite loops;

[0015] Step 2: Randomly generate the SCA initial population; the process of randomly generating the SCA initial population means that in the population space X, several iterable individuals are generated by random methods, wherein each iterable individual is represented as a state in the state space S, and its position coordinates are represented in the same dimension as the grid map. The requirements that the iterable individuals should meet are: the position coordinates of each generated iterable individual cannot exceed the range of the grid map; the coordinates of each generated iterable individual cannot be within the obstacle grid. For the iterable individuals that do not meet the requirements, the same random generation method is used to generate them again until the conditions are met or the maximum number of iterations is reached. If the iterable individual generation cannot be completed after reaching the maximum number of iterations, the SCA population dimension is readjusted;

[0016] Step 3: Calculate and update the Q value of each individual position in the current population; initialize and iterate the Q value of the SCA population before Q-learning. The Q value iteration process uses the time series difference, i.e., the TD learning method. TD learning means estimating the value function of the current time step based on the value function of the next time step. The specific estimation formula is as follows:

[0017] V(s)←V(s)+α(R t+1 +γV(s′)-V(s)) (1)

[0018] Among them, V(s) represents the state value function under state s, R t+1 represents the reward corresponding to the next state s', R t+1 +γV(s′) is called the TD target, δ t =R t+1 +γV(s′)-V(s) is called TD deviation;

[0019] For the Q-learning method, the iterative individuals can iterate the Q value according to formula (1), as follows:

[0020] Q(s,a)←Q(s,a)+α[R t+1 +γmax a′ Q(s′,a′)-Q(s,a)] (2)

[0021] Among them, Q(s,a) represents the action value of action a at a certain moment in state s, max a′ Q(s′,a′) represents the Q value corresponding to the action a′ with the maximum action value in the next state s′;

[0022] Step 4: Determine the best individual in the current population; search the Q values ​​of all individuals in the current population, and mark the individual with the largest Q value as the known best individual;

[0023] Step 5: Update the SCA algorithm parameters r1, r2, r3, and r4. The SCA algorithm is optimized based on the SCA population, using a mathematical model based on sine and cosine functions to fluctuate outward or move in the optimal direction. The algorithm parameters r1, r2, r3, and r4 are used to adaptively adjust the search space in different optimization stages, as follows:

[0024] Parameter r1 indicates the next location area or moving direction, and the next location area or moving direction is between the current solution and the optimal solution of the current stage, or outside the current solution and the optimal solution of the current stage;

[0025] Parameter r2 defines the distance moved in the direction indicated by parameter r1;

[0026] Parameter r3 affects the weight of the optimization target, that is, it strengthens or weakens the influence of the optimal solution in the current stage on the movement distance;

[0027] Parameter r4 randomly selects whether to use the sine formula or the cosine formula;

[0028] The update process of parameters r2, r3, and r4 refers to random selection within a certain range. The update process of parameter r1 uses the following formula:

[0029]

[0030] Among them, a is a constant, t is the current generation, and T is the maximum number of iterations;

[0031] Step 6: Use the SCA iteration formula to update the population based on the current population optimal solution; the SCA iteration formula is as follows:

[0032]

[0033] in, represents the position of the t-th generation individual in the i-th dimension, P i t Indicates the position of the optimal solution of the tth generation individual in the i-th dimension;

[0034] Step 7: Repeat steps 3 to 6 until the set number of iterations is reached;

[0035] Step 8: The agent selects actions according to the Q-learning method; the action value function maximum strategy is selected. The specific action selection strategy formula is as follows:

[0036]

[0037] Among them, a * (s) represents the optimal action in state s;

[0038] Step 9, calculate the Q value and update the Q value table; the Q value table is a vector space about the Q value with state s and action a as the basis. The update of the Q value table includes the iteration of the Q value and the addition of the new state s'. The iteration of the Q value estimates the next state based on the action determined in step 8 and uses the Bellman equation for calculation. The specific Q value iteration formula is as follows:

[0039] Q(s,a)←Q(s,a)+α[R t+1 +γmax a′ Q(s′,a′)-Q(s,a)] (6);

[0040] Step 10: The agent performs state transfer. The state transfer process is performed according to the action selection performed in step 8. The specific state transfer formula is as follows:

[0041] s t =s t+1 (7)

[0042] Step 11. Repeat steps 8 to 10 until the convergence condition is reached or the set number of iterations is reached. Repeat the cycle process to obtain the trained Q value table. The agent starts from the starting position and repeats the action selection process and the state transfer process until the end position. The path is the optimal path obtained by planning. Projecting it to the real environment completes the path planning process.

[0043] Beneficial effects of the present invention:

[0044] The SCA-QL-based path planning method provided by the present invention uses the SCA method to generate an iterable population, uses the population's exploration of the environment to initialize the Q value, and then performs agent path planning based on the Q-learning method. Compared with the traditional Q-learning algorithm that uses the SCA method for initialization, this method reduces a large number of invalid iterations in the aimless and completely random search process of the Q-learning method in the initial stage of training. This method has a faster convergence speed and more accurate path planning results, and improves the path planning efficiency of the agent in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1The figure is a schematic diagram of the overall process of the path planning method described in the present invention.

[0046] Figure 2 A schematic diagram of establishing a virtual environment in the method described in the present invention.

[0047] Figure 3 Schematic diagram of the principle of the SCA method described in the present invention. DETAILED DESCRIPTION

[0048] See also Figures 1 to 3 As shown:

[0049] The path planning method based on SCA-QL provided by the present invention specifically comprises the following steps:

[0050] The first step is to obtain real environment information, including the starting and ending position information of the agent in the real environment, and the obstacle position information;

[0051] Step 2: Establish a simulation environment for agent training based on the real environment information;

[0052] The third step is to run the SCA-QL algorithm in the simulation environment to train the intelligent agent to solve the optimal path: wherein, the established Q-table is initialized by improving the Sine Cosine Algorithm (SCA), and on this basis, the reinforcement learning model is trained based on the Q-learning method to solve the optimal path.

[0053] In the first step, the real environment information can be obtained by positioning and mapping based on a map car equipped with a fusion perception system, or by processing images collected by drones. In this example, the two-dimensional path planning task is taken as an example, and the drone image acquisition solution is selected as a specific implementation method. After graying the image collected by the drone, the Canny algorithm is used to smooth and denoise the image to extract the obstacle boundary in the image. The next step is to perform Hough transform processing on the image boundary, and convert the image in Cartesian space to Hough space to extract straight lines and circles to form the obstacle boundary.

[0054] The simulation environment establishment process in the second step includes: establishing an environmental model based on the real environment information, dividing the environmental model using the grid method, marking the grid positions based on Cartesian coordinates, determining and marking the grids corresponding to the starting position and the end position coordinates in the environmental model, and similarly marking the corresponding grids in the environmental model according to the obstacle position information.

[0055] Specifically, in this example, in the simulation environment, the position of the agent is simplified to a point according to its center of mass, and the position of the obstacle is represented by the area covered by the graphic surrounded by its obstacle boundary. This example takes the two-dimensional path planning task as an example, and establishes a grid with a dimension of 100*100 to divide the environment model. Each grid is used to represent the state of the position in the SCA-QL algorithm. The grid position is marked based on Cartesian coordinates, specifically represented as (x, y). Create a matrix Grid(x, y) about the grid position coordinates to represent the state of each grid. The dimension of the matrix Grid is consistent with the grid dimension, which is 100*100. The grid state includes the obstacle occupied position, idle position, end position, and starting position. The Grid matrix is ​​initialized and assigned according to the state of each grid. For example, if the position (x1, y1) is an idle position, then Grid(x1, y1) = 0. The specific grid state assignment rules are as follows:

[0056] Table 1 Grid matrix assignment rules for grid status

[0057]

[0058] The SCA-QL method in the third step is an improved reinforcement learning method. The main steps are as follows:

[0059] Step 1: Initialize the parameter space and set the hyperparameters;

[0060] Step 2: Randomly generate the SCA initial population;

[0061] Step 3: Calculate and update the Q value of each individual position in the current population;

[0062] Step 4: Determine the best individual in the current population;

[0063] Step 5: Update SCA algorithm parameters r1, r2, r3, and r4;

[0064] Step 6: Use the SCA iteration formula to update the population based on the current population optimal solution;

[0065] Step 7: Repeat steps 3 to 6 until the set number of iterations is reached;

[0066] Step 8: The agent selects actions based on the Q-learning method;

[0067] Step 9: Calculate the Q value and update the Q-table;

[0068] Step 10: The agent performs state transfer;

[0069] Step 11: Repeat steps 8 to 10 until the convergence condition is met or the set number of iterations is reached.

[0070] The parameter space in step 1 specifically refers to the set of important variables in the SCA-QL algorithm, and its initialization process includes the process of creating the algorithm for the set and the process of setting initial conditions.

[0071] The parameter space includes at least: state space S, which represents the set of possible states of the agent; action space A, which represents the set of possible actions that the agent may perform; reward function space R, which represents the expected set of reward functions for specified states and actions; action value space Q-table, which represents the expected set of cumulative values ​​brought by the agent's actions for specified states and actions; population space X, which represents the set of iterable individuals of the SCA algorithm.

[0072] Specifically, the initialization process of the state space S in this example is to create an empty state space S:

[0073] S=[]

[0074] The data format in the S space is grid coordinates (x, y), and the data is filled into the S space during the loop process to record the locations where the agent passes.

[0075] Specifically, the initialization process of the action space A in this example is to create an immutable action space A:

[0076] A=['top','bottom','left','right','topleft','topright','bottomleft','bottomright']

[0077] Among them, the A space provides actions that the agent can perform, which are used to guide the agent's behavior evaluation and state transfer.

[0078] Specifically, the reward function space R initialization process in this example is to create the reward function space R and assign values:

[0079]

[0080] Among them, R space is a 2*u*v dimensional tensor, u and v represent the horizontal and vertical dimensions of the grid. In this example, u and v are both 100. A reward function is assigned to each grid coordinate. In this example, the reward assignment rules for each type of grid are as follows:

[0081] Table 2 Grid matrix assignment rules for grid status

[0082]

[0083] In this example, the action value space Q-table initialization process is to create an empty action value space Q-table:

[0084] Q-table=[]

[0085] The Q-table space format is grid coordinates (x, y), action a is the vector space of the basis Q value, and the data is updated to the Q-table space during the loop process for subsequent action selection. The updated Q-table is as follows:

[0086]

[0087] Among them, m is the number of states experienced by the agent, n is the number of actions that the agent may perform, and in this example, n is 8, and the Q-value matrix Q-table of each action performed by the agent in each experienced state is obtained.

[0088] Specifically, this example aims at a two-dimensional path planning problem, and sets the population space X dimension as follows:

[0089]

[0090] Where N represents the number of individuals in the population, and each individual in the population represents a position in the grid map.

[0091] The hyperparameters include at least: greediness ε, which affects the degree of reliance on the learned information in the decision-making process of the agent, and specifically indicates the probability of the agent choosing the action with the maximum Q value in the decision-making process; learning rate α, which affects the learning speed of the agent for the action with the most action value; decay coefficient γ, which affects the decay effect when considering the impact of future action rewards on the current action value; maximum number of iterations max_Iteration, which specifically indicates the maximum number of iterations in each loop stage in the algorithm. In this example, it is selected as 100 to terminate the algorithm and avoid infinite loops.

[0092] The process of randomly generating the initial SCA population in step 2 means generating multiple iterative individuals in the population space X by means of a random method. Each iterative individual should be represented as a state in the state space S, and its position coordinates should be represented in the same dimension as the grid map. The iterative individuals should meet the following requirements: the position coordinates of each generated iterative individual cannot exceed the range of the grid map; the coordinates of each generated iterative individual cannot be within the obstacle grid. For iterative individuals that do not meet the requirements, the same random generation method should be used to generate them again until the conditions are met or the maximum number of iterations is reached. If the iterative individual generation cannot be completed after reaching the maximum number of iterations, the SCA population dimension should be readjusted.

[0093] In step 3, the Q value of the SCA population is initialized and iterated before Q-learning. The Q value iteration process uses the temporal difference (TD) learning method. TD learning refers to estimating the value function of the current time step based on the value function of the next time step. The specific estimation formula is as follows:

[0094] V(s)←V(s)+α(R t+1 +γV(s′)-V(s)) (1)

[0095] Among them, V(s) represents the state value function under state s, R t+1 represents the reward corresponding to the next state s', R t+1 +γV(s′) is called the TD target, δ t =R t+1 +γV(s′)-V(s) is called TD deviation.

[0096] Furthermore, for the Q-learning method, the iterative individuals can iterate the Q value according to formula (1):

[0097] Q(s,a)←Q(s,a)+α[R t+1 +γmax a′ Q(s′,a′)-Q(s,a)] (2)

[0098] Among them, Q(s,a) represents the action value of action a at a certain moment in state s, max a′ Q(s′,a′) represents the Q value corresponding to the action a′ with the maximum action value in the next state s′.

[0099] Step 4: Search the Q values ​​of all individuals in the current population and mark the individual with the largest Q value as the known optimal individual.

[0100] Step 5: Update the SCA algorithm parameters r1, r2, r3, and r4. The SCA algorithm is optimized based on the SCA population, using a mathematical model based on sine and cosine functions to fluctuate outward or move toward the optimal direction. The algorithm parameters r1, r2, r3, and r4 are used to adaptively adjust the search space in different optimization stages.

[0101] Parameter r1 indicates the next position area or moving direction, which may be between the current solution and the optimal solution of the current stage, or outside the two; parameter r2 defines the distance of movement in the direction indicated by parameter r1; parameter r3 affects the weight of the optimization target, that is, to strengthen or weaken the influence of the optimal solution of the current stage on the movement distance; parameter r4 randomly selects whether to use the sine formula or the cosine formula.

[0102] The update process of parameters r2, r3, and r4 refers to random selection within a certain range. The update process of parameter r1 uses the following formula:

[0103]

[0104] Among them, a is a constant, t is the current generation, and T is the maximum number of iterations.

[0105] Step 6: Use the SCA iteration formula to update the population based on the optimal solution of the population at the current stage. The SCA iteration formula is as follows:

[0106]

[0107] in, represents the position of the t-th generation individual in the i-th dimension, P i t Represents the position of the optimal solution of the tth generation individual in the ith dimension.

[0108] Step 8: The agent selects actions according to the Q-learning method, and selects the strategy with the maximum action value function. Compared with the traditional Q-learning method, the action selection process of this algorithm is affected by SCA initialization and has less randomness. The specific action selection strategy formula is as follows:

[0109]

[0110] Among them, a * (s) represents the optimal action in state s.

[0111] It should be noted that the action selection performed in step S8 is used for the iterative process of the Q value, and the process of selecting the action here does not perform the agent state transfer.

[0112] Step 9 calculates the Q value and updates the Q value table. The Q value table is a vector space about the Q value with state s and action a as the basis. The specific value of the Q value table update includes the iteration of the Q value and the addition process of the new state s'. The iteration of the Q value estimates the next state based on the action determined in step S8 and uses the Bellman equation for calculation. The specific Q value iteration formula is as follows:

[0113] Q(s,a)←Q(s,a)+α[R t+1 +γmax a′ Q(s′,a′)-Q(s,a)] (6)

[0114] The state transfer process in step 10 is executed based on the action selection in step 8. The specific state transfer formula is as follows:

[0115] s t =s t+1 (7)

[0116] After repeating the cycle process in step eleven, a trained Q value table is obtained. The intelligent agent starts from the starting position and repeats the action selection process and the state transfer process until the end position. The path is the optimal path obtained by planning, and the path planning process is completed when it is projected to the real environment.

Claims

1. A path planning method based on SCA-QL, characterized by: The method comprises the following steps: The first step is to obtain real environment information, including the starting and ending position information of the agent in the real environment, and the obstacle position information; The second step is to establish a simulation environment for agent training based on real environment information; The simulation environment establishment process includes: establishing an environment model according to real environment information, dividing the environment model using a grid method, marking grid positions based on Cartesian coordinates, determining and marking grids corresponding to the coordinates of the starting position and the end position in the environment model, and similarly marking the grids corresponding to the obstacle position information in the environment model; The third step is to run the SCA-QL algorithm in the simulation environment to train the agent to solve the optimal path: the Q value table is initialized by improving the sine-cosine algorithm, and on this basis, the reinforcement learning model is trained based on the Q-learning method to solve the optimal path; The SCA-QL algorithm is an improved reinforcement learning method. The steps are as follows: Step 1: Initialize the parameter space and set the hyperparameters. During the parameter space initialization process, the parameter space specifically refers to the set of important variables in the SCA-QL algorithm. The initialization process includes the algorithm's creation of the set and the setting of initial conditions. The parameter space includes at least: state space S, which represents the set of possible states of the agent; action space A, which represents the set of actions performed by the agent; reward function space R, which represents the expected set of reward functions for specified states and actions; action value space Q-table, which represents the expected set of cumulative values ​​brought by the agent's actions for specified states and actions; population space X, which represents the set of iterable individuals of the SCA algorithm; The hyperparameters include at least: greediness ε, which affects the degree of reliance on learning information in the decision-making process of the agent, specifically indicating the probability of the agent's decision-making process selecting the action with the maximum Q value; learning rate α, which affects the learning speed of the agent for the action with the most action value; decay coefficient γ, which affects the decay benefit when considering the impact of future action rewards on the current action value; maximum number of iterations Max_Iteration, which specifically indicates the maximum number of iterations in each loop stage in the algorithm, used to terminate the algorithm and avoid infinite loops; Step 2: Randomly generate the SCA initial population; The process of randomly generating the SCA initial population means that in the population space X, several iterable individuals are generated by random methods, where each iterable individual is represented as a state in the state space S, and its position coordinates are represented in the same dimension as the grid map. The requirements that the iterable individuals should meet are: the position coordinates of each generated iterable individual cannot exceed the range of the grid map; the coordinates of each generated iterable individual cannot be within the obstacle grid. For the iterable individuals that do not meet the requirements, the same random generation method is used to generate them again until the maximum number of iterations is met. If the iterable individual generation cannot be completed after reaching the maximum number of iterations, the SCA population dimension is readjusted; Step 3: Calculate and update the Q value of each individual position in the current population; initialize and iterate the Q value of the SCA population before Q-learning. The Q value iteration process uses the time series difference, i.e., the TD learning method. TD learning means estimating the value function of the current time step based on the value function of the next time step. The specific estimation formula is as follows: V(s)←V(s)+α(R t+1 +γV(s′)-V(s)) (1) Among them, V(s) represents the state value function under state s, R t+1 represents the reward corresponding to the next state s', R t+1 +γV(s′) is called the TD target, δ t =R t+1 +γV(s′)-V(s) is called TD deviation; For the Q-learning method, the iterative individuals can iterate the Q value according to formula (1), as follows: Q(s,a)←Q(s,a)+α[R t+1 +γmax a′ Q(s′,a′)-Q(s,a)] (2) Among them, Q(s,a) represents the action value of action a at a certain moment in state s, max a′ Q(s′,a′) represents the Q value corresponding to the action a′ with the maximum action value in the next state s′; Step 4: Determine the best individual in the current population; search the Q values ​​of all individuals in the current population, and mark the individual with the largest Q value as the known best individual; Step 5: Update the SCA algorithm parameters r1, r2, r3, and r4. The SCA algorithm is optimized based on the SCA population, using a mathematical model based on sine and cosine functions to fluctuate outward or move in the optimal direction. The algorithm parameters r1, r2, r3, and r4 are used to adaptively adjust the search space in different optimization stages, as follows: Parameter r1 indicates the next location area or moving direction, and the next location area or moving direction is between the current solution and the optimal solution of the current stage, or outside the current solution and the optimal solution of the current stage; Parameter r2 defines the distance moved in the direction indicated by parameter r1; Parameter r3 affects the weight of the optimization target, that is, it strengthens or weakens the influence of the optimal solution in the current stage on the movement distance; Parameter r4 randomly selects whether to use the sine formula or the cosine formula; The update process of parameters r2, r3, and r4 refers to random selection within a certain range. The update process of parameter r1 uses the following formula: Among them, a is a constant, t is the current generation, and T is the maximum number of iterations; Step 6: Use the SCA iteration formula to update the population based on the current population optimal solution; the SCA iteration formula is as follows: in, represents the position of the t-th generation individual in the i-th dimension, P i t Indicates the position of the optimal solution of the tth generation individual in the i-th dimension; Step 7: Repeat steps 3 to 6 until the set number of iterations is reached; Step 8: The agent selects actions according to the Q-learning method; the action value function maximum strategy is selected. The specific action selection strategy formula is as follows: Among them, a * (s) represents the optimal action in state s; Step 9, calculate the Q value and update the Q value table; the Q value table is a vector space about the Q value with state s and action a as the basis. The update of the Q value table includes the iteration of the Q value and the addition of the new state s'. The iteration of the Q value estimates the next state based on the action determined in step 8 and uses the Bellman equation for calculation. The specific Q value iteration formula is as follows: Q(s,a)←Q(s,a)+α[R t+1 +γmax a′ Q(s′,a′)-Q(s,a)] (6); Step 10: The agent performs state transfer. The state transfer process is performed according to the action selection performed in step 8. The specific state transfer formula is as follows: s t =s t+1 (7) Step 11. Repeat steps 8 to 10 until the convergence condition is reached or the set number of iterations is reached. Repeat the cycle process to obtain the trained Q value table. The agent starts from the starting position and repeats the action selection process and the state transfer process until the end position. The path is the optimal path obtained by planning. Projecting it to the real environment completes the path planning process.