Path planning method and system based on improved teaching and learning algorithm

By improving the teaching and learning algorithm and combining the multi-factor weighted fitness function and Dijkstra's algorithm, efficient and safe path planning in complex environments was achieved. This solved the shortcomings of existing teaching and learning algorithms in path length control and environmental adaptability, and improved the navigation capabilities of mobile robots.

CN120991882AActive Publication Date: 2025-11-21泉州职业技术大学
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511491862.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2025-11-21
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Existing teaching and learning algorithms suffer from insufficient path length control, poor adaptability to paths of different lengths, and an imbalance between global and local search capabilities, making it difficult to meet the high-precision navigation requirements of mobile robots in complex environments.

Method used

An improved teaching and learning algorithm is adopted. By designing a fitness function with multiple weights, the initial path is generated by combining it with Dijkstra's algorithm. The path is updated through teacher and student stages. Dynamic teaching factors are used to achieve early global search and later local convergence. Path inequality handling and boundary projection mechanisms are adopted to improve the algorithm's environmental adaptability and path quality.

Benefits of technology

It improves the overall performance of path planning, reduces energy consumption and time costs, enhances the robot's motion stability and obstacle avoidance success rate, and adapts to the path planning needs in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120991882A_ABST
    Figure CN120991882A_ABST
Patent Text Reader

Abstract

The invention discloses a path planning method and system based on an improved teaching and learning algorithm, and relates to the technical field of intelligent robot autonomous navigation. Carrying out improved teaching and learning algorithm initialization based on map and path node constraints, and generating all initial paths by adopting a Dijkstra algorithm; performing teacher stage path updating based on all the initial paths to obtain a teacher stage path updating result; performing student stage path updating based on the teacher stage path updating result to obtain a student stage path updating result; and judging whether a termination condition is met or not, if the termination condition is met, outputting the path with the maximum fitness function value in the student stage path updating result as the optimal path, otherwise, continuing to update the teacher and student stage paths until the termination condition is met. The method has the advantages of being better in path quality, higher in algorithm efficiency, higher in environmental adaptability, wide in application scene and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of intelligent robot autonomous navigation, and particularly relates to a path planning method and system based on an improved teach and learn algorithm. BACKGROUND

[0002] With the rapid development of intelligent robot technology, mobile robots are increasingly widely used in warehouse logistics, intelligent inspection, disaster rescue and other fields, and the core of their autonomous navigation capability lies in efficient and safe path planning technology. In a complex dynamic environment, mobile robots need to avoid static obstacles and dynamic interference in real time, while taking into account path length, motion smoothness and energy cost, which puts high demands on path planning algorithms.

[0003] Traditional path planning algorithms such as Dijkstra algorithm and A* algorithm can generate feasible paths in simple static environments, but have slow convergence speed and poor adaptability to dynamic changes in complex environments; intelligent optimization algorithms such as particle swarm optimization and genetic algorithm have certain advantages in global search, but are prone to local optimal trap, resulting in low obstacle avoidance success rate, and it is difficult to balance the relationship between path length, smoothness and safety. Teach and learn algorithm, as an intelligent optimization method simulating the classroom teaching process, has the characteristics of simple principle and few parameters, and has been used in path planning, such as the model training method, path planning method and related device disclosed in Chinese patent application No. CN202411677598.8. However, the existing teach and learn algorithm has defects such as insufficient path length control, poor adaptability to different length paths, and unbalanced global and local search capability in path planning, which makes it difficult to meet the high-precision navigation requirements of mobile robots in complex environments. Therefore, developing an improved teach and learn algorithm that can comprehensively optimize path quality, improve convergence efficiency and obstacle avoidance safety is the key to solving the bottleneck of mobile robot autonomous navigation. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a path planning method and system based on an improved teach and learn algorithm to at least solve some of the above technical problems.

[0005] To achieve the above-mentioned purpose, the technical solution adopted by the present application is as follows: In a first aspect, a path planning method based on an improved teach and learn algorithm comprises the following steps: Step S1, map construction and path node constraint; Step S2, improved teach and learn algorithm initialization based on the map and path node constraint, the improved teach and learn algorithm initialization including designing an adaptive function of comprehensive path length, turning amplitude and obstacle distance, and generating all initial paths by using Dijkstra algorithm; Step S3: Update the teacher stage path based on all initial paths to obtain the teacher stage path update result; Step S4: Based on the teacher's stage path update results, update the student's stage path to obtain the student's stage path update results; Step S5: Determine whether the termination condition is met. If the termination condition is met, output the path with the largest fitness function value in the student stage path update results as the optimal path; otherwise, use the student stage path update results as all initial paths and repeat steps S3-S5 until the termination condition is met.

[0006] Furthermore, step S1 includes: Map Construction: Construct a 2D raster map, where each raster has a resolution of 1x1 pixels. Each raster's attributes include free space and static obstacles. The overall 2D raster map matrix... Represented as ,in, This indicates the number of rows in a two-dimensional raster map. This indicates the number of columns in a two-dimensional raster map. This represents the row index of a two-dimensional raster map. Represents the column index of a two-dimensional raster map. Indicates the first line, number The element values ​​of the column, Represents free space. Indicates a static obstacle; Path node constraints: Path nodes satisfy The distance between adjacent path nodes satisfies ,in, Indicates the index of the path node.

[0007] Furthermore, step S2 includes: Parameter definition: The population size for improving the teaching and learning algorithm is... The maximum number of iterations is ; Path encoding: A single path is represented as a sequence of nodes. ,in For the number of nodes, for One of the node coordinates, Indicates the first Path, This indicates the first in this path. Node, and ; fitness function for: ; wherein, represents the length of a single path, ; represents the turning angle at the point of , represents the turning amplitude; represents the minimum distance from a single path to the nearest static obstacle, the expression of , is the set of grids where static obstacles exist, is the distance from the grid where static obstacles exist to the path node ; represents the weight coefficient of the total length of a single path, represents the weight coefficient of the smoothness of a single path, represents the weight coefficient of the safety distance; Dijkstra algorithm is used to generate the initial path of each individual, the initial path contains L path nodes, random offset is performed on the nodes in each initial path which are within 2 grids from the static obstacles, the distance between the node and the next node is detected, if the distance does not meet , a node is added between the node and the next node, finally all initial paths are generated, the number of all initial paths is , each initial path is an individual , , an individual is a student, all individuals form a group, the group represents , T represents transposition.

[0008] Further, in the fitness function, .

[0009] Further, step S3 comprises: Teacher selection: the fitness function value of each student is calculated according to the fitness function, and a student with the largest fitness function value is selected as the individual after teacher selection ; Group mean calculation: the group mean , is calculated, the expression of ; the node-level average , is calculated, the expression of , wherein, represents the th path node of the th individual; Path inequality processing: when the number of path nodes of is less than the number of path nodes of , Representing a group The Middle Individual, Representing a group The Middle Individuals; using linear interpolation, in Temporary path nodes are generated between path nodes to obtain the corresponding path nodes. Temporary node paths with the same number of path nodes Will Replace with Temporary path node for: ;in, and For the index of a randomly selected pair of adjacent path nodes, This represents a path node. When a temporary path node exceeds the boundary of the 2D raster map or falls on a static obstacle, the temporary path node is projected to the nearest free space.

[0010] Furthermore, step S3 also includes: Teaching process: For each individual Each path node in Generate a new candidate path node ; in, A random number between [0, 1]; As dynamic teaching factors, The expression is: , For time, Individuals selected for teachers Path nodes, when When it exceeds the boundaries of the 2D raster map or falls on a static obstacle, it will... Project onto the nearest free space; Based on new candidate path nodes Generate new candidate individuals ; Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are considered as the teacher's stage path update results.

[0011] Furthermore, step S4 includes: Student pairing: Two different students are randomly selected from the teacher-stage path update results. and Calculate the fitness function values ​​for both. when The number of path nodes is higher than When the number of path nodes is small, path inequality processing is adopted; Learning process: Students learn from each other in pairs, generating a new candidate individual. , ,in, A random number that follows a uniform distribution within the range (0,1); Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are used as the result of updating the student stage path.

[0012] Furthermore, step S5 includes: determining whether the number of iterations exceeds [a certain threshold]. If the number of iterations exceeds If the student-stage path update results are correct, then the path with the largest fitness function value among the student-stage path update results will be output as the optimal path; otherwise, the student-stage path update results will be used as all initial paths, and steps S3-S5 will be repeated until the number of iterations exceeds [a certain threshold]. .

[0013] Secondly, a path planning system based on an improved teaching and learning algorithm is characterized by comprising: The environment modeling module is used for map building and path node constraints. The algorithm initialization module is used to initialize the improved teaching and learning algorithm based on map and path node constraints. The initialization of the improved teaching and learning algorithm includes designing a fitness function that integrates path length, turning radius and obstacle distance, and using Dijkstra's algorithm to generate all initial paths. The teacher path update module is used to update the teacher's stage path based on all initial paths and obtain the teacher's stage path update result. The student path update module is used to update the student's stage path based on the teacher's stage path update results, and obtain the student's stage path update results. The termination judgment module is used to determine whether the termination condition is met. If the termination condition is met, the path with the largest fitness function value in the student stage path update results is output as the optimal path; otherwise, the student stage path update results are used as all initial paths and the teacher path update module-termination judgment module is repeated until the termination condition is met.

[0014] Compared with the prior art, the present invention has the following beneficial effects: The path quality is improved. By using a fitness function with multiple factors weighted, the path length, turning radius, and obstacle distance are incorporated into a unified evaluation system. This ensures that the path is shorter to reduce energy consumption and time costs, reduces robot mechanical wear and improves motion stability by constraining the turning radius, and avoids collision risks by constraining safe distances, thus improving the overall performance of the path.

[0015] The algorithm is more efficient. The design of dynamic teaching factors enables adaptive optimization of early global search and later local convergence. Combined with teacher-led guidance and student-group collaborative learning, it effectively accelerates the algorithm's convergence speed, avoids the local optimum trap of traditional intelligent algorithms, and can quickly generate feasible paths in complex environments.

[0016] It exhibits enhanced environmental adaptability. The path inequality handling mechanism addresses the adaptation problem for paths of different lengths through linear interpolation and boundary projection, enabling the algorithm to adapt to diverse path structures. Simultaneously, the real-time adjustment strategy for obstacles and boundaries significantly improves the robot's obstacle avoidance success rate in complex obstacle environments.

[0017] With a wide range of applications, this invention can be directly applied to scenarios such as robot scheduling in warehousing and logistics, intelligent inspection in the power or security fields, and autonomous navigation in disaster relief. It provides reliable technical support for the efficient and safe operation of mobile robots in dynamic and complex environments, and has significant practical value and promotional significance. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the steps of a path planning method based on an improved teaching and learning algorithm according to the present invention. Figure 2 This is a schematic diagram of the structure of a path planning system based on an improved teaching and learning algorithm according to the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0020] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0021] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; of course, they can also refer to a mechanical connection or an electrical connection; furthermore, they can refer to a direct connection, an indirect connection through an intermediate medium, or a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances. Example 1

[0022] Please see Figure 1 As shown, the present invention provides a path planning method based on an improved teaching and learning algorithm, comprising the following steps: Step S1, Environment Modeling: Map Construction and Path Node Constraints; Step S2, Algorithm Initialization: The improved teaching and learning algorithm is initialized based on the map and path node constraints. The initialization of the improved teaching and learning algorithm includes designing a fitness function that integrates path length, turning radius and obstacle distance, and using Dijkstra's algorithm to generate all initial paths. Step S3, Teacher Stage Path Update: Update the teacher stage path based on all initial paths to obtain the teacher stage path update result; Step S4, Student Stage Path Update: Based on the teacher stage path update results, update the student stage paths to obtain the student stage path update results; Step S5: Determine whether the termination condition is met. If the termination condition is met, output the path with the largest fitness function value in the student stage path update results as the optimal path; otherwise, use the student stage path update results as all initial paths and repeat steps S3-S5 until the termination condition is met.

[0023] This invention incorporates path length, turning radius, and obstacle distance into a unified evaluation system through a multi-factor weighted fitness function. This ensures shorter paths to reduce energy consumption and time costs, reduces robot mechanical wear and improves motion stability by constraining turning radius, and avoids collision risks by constraining safe distances, thereby improving the overall performance of the path.

[0024] In some embodiments of the present invention, step S1 includes: Map Construction: Construct a 2D raster map, where each raster has a resolution of 1x1 pixels. Each raster's attributes include free space and static obstacles. The overall 2D raster map matrix... Represented as ,in, This indicates the number of rows in a two-dimensional raster map. This indicates the number of columns in a two-dimensional raster map. This represents the row index of a two-dimensional raster map. Represents the column index of a two-dimensional raster map. Indicates the first line, number The element values ​​of the column, Represents free space. Indicates a static obstacle; Path node constraints: Path nodes satisfy The distance between adjacent path nodes satisfies That is, diagonal movement is allowed, where, Indicates the index of the path node.

[0025] This invention uses a two-dimensional ground mobile robot as the core adaptable object, employs a 1×1 pixel two-dimensional grid map (with dynamically adjustable resolution), and strictly constrains path nodes to the grid center in free space, while ensuring the spacing between adjacent path nodes is... It supports diagonal movement and conforms to the motion logic of ground robots.

[0026] In some embodiments of the present invention, step S2 includes: Parameter definition: The population size for improving the teaching and learning algorithm is... The maximum number of iterations is ; Path encoding: A single path is represented as a sequence of nodes. ,in For the number of nodes, for The coordinates of a node in the grid are the center points of the free space grid. Indicates the first Path, This indicates the first in this path. 1 node, and ; fitness function for: ; in, Indicates the length of a single path. ; Indicates that radians are used. The turning angle at that point Indicates the turning radius; This represents the minimum distance from a single path to the nearest static obstacle. The expression is: , The grid set where static obstacles exist. For grid-to-path nodes where static obstacles exist The distance; The weighting coefficient represents the total length of a single path. The weighting coefficients represent the smoothness of a single path. Weighting coefficients representing the safety distance; Dijkstra's algorithm is used to generate an initial path for each individual. The initial path contains L path nodes. For each node in the initial path that is within two grid cells of a static obstacle, a random offset is performed. The distance between the node and the next node is checked. If the distance does not meet the requirement... Then, nodes are added between the current node and the next node, eventually generating all initial paths. The total number of initial paths is... Each initial path is an individual. , An individual is a student, all individuals are a group, a group is all students, and a group is... Represented as , This indicates transpose. Dijkstra's algorithm, also known as Dijkstra's algorithm, is a shortest path algorithm that finds the shortest path from one vertex to all other vertices in a weighted graph. The main characteristic of Dijkstra's algorithm is that it starts from the starting point and uses a greedy algorithm strategy, traversing to the nearest unvisited vertex's adjacent node each time, until it extends to the destination.

[0027] Preferably, in the fitness function, The above weights of the fitness function were finally determined after verification through orthogonal experiments.

[0028] Because in the fitness function, the first part is the path length term. To calculate the sum of Euclidean distances between all adjacent nodes on the path, guiding the algorithm to generate shorter paths and thus reducing the energy consumption and time cost of the mobile robot, this term is the most important and is therefore assigned a weight coefficient of 0.6 in this invention; the second part is the path smoothness term. This refers to the turning radius, which reflects the smoothness of the path, avoiding sharp turns, reducing mechanical wear caused by frequent robot turning, and improving the stability of motion control (especially for differential drive robots); the third part is the safety distance. The fitness function reflects the minimum safe distance between the path and static obstacles, penalizes paths that are too close to static obstacles to avoid collision risks, and guides the path to deviate towards the center of free space. The latter two factors are less effective than the first, therefore they are assigned weight coefficients of 0.2 and 0.2 respectively in this invention. It can be seen that the shorter the path length, the smaller the turning radius, and the farther the path is from the obstacle, the larger the fitness function value, and the easier it is to be selected.

[0029] In some embodiments of the present invention, step S3 includes: Teacher selection: Calculate the fitness function value for each student based on the fitness function, and select the student with the highest fitness function value as the individual selected by the teacher. ; Population mean calculation: Calculate the population mean , The expression is ; Calculate node-level average , The expression is ,in, Indicates the first The first individual One path node; Path inequality handling: When The number of path nodes is higher than When the number of path nodes is small, Representing a group The Middle Individual, Representing a group The Middle Individuals; using linear interpolation, in Temporary path nodes are generated between path nodes to obtain the corresponding path nodes. Temporary node paths with the same number of path nodes ,Will Replace with Temporary path nodes for: ;in, and For the index of a randomly selected pair of adjacent path nodes, This represents a path node. When a temporary path node exceeds the boundary of the 2D raster map or falls on a static obstacle, the temporary path node is projected to the nearest free space. Teaching process: For each individual Each path node in Generate a new candidate path node ; in, A random number between [0, 1]; As dynamic teaching factors, The expression is: For time, Individuals selected for teachers Path nodes, The value changes from 1 to 2, with a slower initial change and a faster change later, to satisfy the algorithm's preference for global search capability in the early stages and local convergence capability in the later stages; when... When it exceeds the boundaries of the 2D raster map or falls on a static obstacle, it will... Project onto the nearest free space; Based on new candidate path nodes Generate new candidate individuals ; Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are considered as the teacher's stage path update results.

[0030] This invention effectively solves the problem of "inconsistent path lengths preventing iteration" in traditional teaching and learning algorithms by generating temporary nodes through linear interpolation when dealing with differences in the number of nodes on different paths; simultaneously, it enables dynamic teaching factors... As the number of iterations increases linearly from 1 to 2, it can achieve early global search (wide search range) and later local convergence (high optimization accuracy).

[0031] In some embodiments of the present invention, step S4 includes: Student pairing: Two different students are randomly selected from the teacher-stage path update results. and Calculate the fitness function values ​​for both. when The number of path nodes is higher than When the number of path nodes is small, path inequality processing is adopted. For the specific steps of path inequality processing, please refer to the detailed introduction in step S3, which will not be repeated here. Learning process: Students learn from each other in pairs, generating a new candidate individual. , ,in, A random number that follows a uniform distribution within the range (0,1); Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are used as the result of updating the student stage path.

[0032] In some embodiments of the present invention, step S5 includes: determining whether the number of iterations exceeds [a certain threshold]. If the number of iterations exceeds Then, the path with the largest fitness function value in the student stage path update results is output as the optimal path; otherwise, the student stage path update results are used as all initial paths, and steps S3-S5 are repeated until the number of iterations exceeds [a certain threshold]. Periodic route updates complete, process ends.

[0033] In summary, by adopting the above-described technical solution of the present invention, at least the following beneficial effects are achieved: The path quality is improved. By using a fitness function with multiple factors weighted, the path length, turning radius, and obstacle distance are incorporated into a unified evaluation system. This ensures that the path is shorter to reduce energy consumption and time costs, reduces robot mechanical wear and improves motion stability by constraining the turning radius, and avoids collision risks by constraining safe distances, thus improving the overall performance of the path.

[0034] The algorithm is more efficient. The design of dynamic teaching factors enables adaptive optimization of early global search and later local convergence. Combined with teacher-led guidance and student-group collaborative learning, it effectively accelerates the algorithm's convergence speed, avoids the local optimum trap of traditional intelligent algorithms, and can quickly generate feasible paths in complex environments.

[0035] It exhibits enhanced environmental adaptability. The path inequality handling mechanism addresses the adaptation problem for paths of different lengths through linear interpolation and boundary projection, enabling the algorithm to adapt to diverse path structures. Simultaneously, the real-time adjustment strategy for obstacles and boundaries significantly improves the robot's obstacle avoidance success rate in complex obstacle environments.

[0036] With a wide range of applications, this invention can be directly applied to scenarios such as robot scheduling in warehousing and logistics, intelligent inspection in the power or security fields, and autonomous navigation in disaster relief. It provides reliable technical support for the efficient and safe operation of mobile robots in dynamic and complex environments, and has significant practical value and promotional significance.

[0037] Example 2 Please see Figure 2As shown, the present invention provides a path planning system based on an improved teaching and learning algorithm, comprising: The environment modeling module is used for environment modeling: map building and path node constraints; The algorithm initialization module is used for algorithm initialization: it performs improved teaching and learning algorithm initialization based on map and path node constraints. The improved teaching and learning algorithm initialization includes designing a fitness function that integrates path length, turning radius and obstacle distance, and using Dijkstra's algorithm to generate all initial paths; The teacher path update module is used for updating teacher stage paths: it updates teacher stage paths based on all initial paths to obtain the teacher stage path update results. The student path update module is used for updating student stage paths: based on the teacher's stage path update results, the student stage path is updated to obtain the student stage path update results; The termination judgment module is used to determine whether the termination condition is met. If the termination condition is met, the path with the largest fitness function value in the student stage path update results is output as the optimal path; otherwise, the student stage path update results are used as all initial paths and the teacher path update module-termination judgment module is repeated until the termination condition is met.

[0038] This invention incorporates path length, turning radius, and obstacle distance into a unified evaluation system through a multi-factor weighted fitness function. This ensures shorter paths to reduce energy consumption and time costs, reduces robot mechanical wear and improves motion stability by constraining turning radius, and avoids collision risks by constraining safe distances, thereby improving the overall performance of the path.

[0039] In some embodiments of the present invention, the environment modeling module is specifically used for: Map Construction: Construct a 2D raster map, where each raster has a resolution of 1x1 pixels. Each raster's attributes include free space and static obstacles. The overall 2D raster map matrix... Represented as ,in, This indicates the number of rows in a two-dimensional raster map. This indicates the number of columns in a two-dimensional raster map. This represents the row index of a two-dimensional raster map. Represents the column index of a two-dimensional raster map. Indicates the first line, number The element values ​​of the column, Represents free space. Indicates a static obstacle; Path node constraints: Path nodes satisfy The distance between adjacent path nodes satisfies That is, diagonal movement is allowed, where, Indicates the index of the path node.

[0040] This invention uses a two-dimensional ground mobile robot as the core adaptable object, employs a 1×1 pixel two-dimensional grid map (with dynamically adjustable resolution), and strictly constrains path nodes to the grid center in free space, while ensuring the spacing between adjacent path nodes is... It supports diagonal movement and conforms to the motion logic of ground robots.

[0041] In some embodiments of the present invention, the algorithm initialization module is specifically used for: Parameter definition: The population size for improving the teaching and learning algorithm is... The maximum number of iterations is ; Path encoding: A single path is represented as a sequence of nodes. ,in For the number of nodes, for The coordinates of a node in the grid are the center points of the free space grid. Indicates the first Path, This indicates the first in this path. 1 node, and ; fitness function for: ; in, Indicates the length of a single path. ; Indicates that radians are used. The turning angle at that point Indicates the turning radius; This represents the minimum distance from a single path to the nearest static obstacle. The expression is: , The grid set where static obstacles exist. For grid-to-path nodes where static obstacles exist The distance; The weighting coefficient represents the total length of a single path. The weighting coefficients represent the smoothness of a single path. Weighting coefficients representing the safety distance; Dijkstra's algorithm is used to generate an initial path for each individual. The initial path contains L path nodes. For each node in the initial path that is within two grid cells of a static obstacle, a random offset is performed. The distance between the node and the next node is checked. If the distance does not meet the requirement... Then, nodes are added between the current node and the next node, eventually generating all initial paths. The total number of initial paths is... Each initial path is an individual. An individual is a student, all individuals are a group, a group is all students, and a group is... Represented as T represents transpose. Dijkstra's algorithm, also known as Dijkstra's algorithm, is a shortest path algorithm from one vertex to all other vertices, solving the shortest path problem in a weighted graph. The main feature of Dijkstra's algorithm is that it starts from the starting point and uses a greedy algorithm strategy, traversing to the nearest unvisited vertex adjacent to the starting point each time, until it extends to the destination.

[0042] Preferably, in the fitness function, and The above weights of the fitness function were finally determined after verification through orthogonal experiments.

[0043] Because in the fitness function, the first part is the path length term. To calculate the sum of Euclidean distances between all adjacent nodes on the path, guiding the algorithm to generate shorter paths and thus reducing the energy consumption and time cost of the mobile robot, this term is the most important and is therefore assigned a weight coefficient of 0.6 in this invention; the second part is the path smoothness term. This refers to the turning radius, which reflects the smoothness of the path, avoiding sharp turns, reducing mechanical wear caused by frequent robot turning, and improving the stability of motion control (especially for differential drive robots); the third part is the safety distance. The fitness function reflects the minimum safe distance between the path and static obstacles, penalizes paths that are too close to static obstacles to avoid collision risks, and guides the path to deviate towards the center of free space. The latter two factors are less effective than the first, therefore they are assigned weight coefficients of 0.2 and 0.2 respectively in this invention. It can be seen that the shorter the path length, the smaller the turning radius, and the farther the path is from the obstacle, the larger the fitness function value, and the easier it is to be selected.

[0044] In some embodiments of the present invention, the teacher path update module is specifically used for: Teacher selection: Calculate the fitness function value for each student based on the fitness function, and select the student with the highest fitness function value as the individual selected by the teacher. ; Population mean calculation: Calculate the population mean , The expression is ; Calculate node-level average , The expression is ,in, Indicates the first The first individual One path node; Path inequality handling: When The number of path nodes is higher than When the number of path nodes is small, Representing a group The Middle Individual, Representing a group The Middle Individuals; using linear interpolation, in Temporary path nodes are generated between path nodes to obtain the corresponding path nodes. Temporary node paths with the same number of path nodes ,Will Replace with Temporary path node for: ;in, and For the index of a randomly selected pair of adjacent path nodes, This represents a path node. When a temporary path node exceeds the boundary of the 2D raster map or falls on a static obstacle, the temporary path node is projected to the nearest free space. Teaching process: For each individual Each path node in Generate a new candidate path node ; in, A random number between [0, 1]; As dynamic teaching factors, The expression is: , For time, Individuals selected for teachers Path nodes, The value changes from 1 to 2, with a slower initial change and a faster change later, to satisfy the algorithm's preference for global search capability in the early stages and local convergence capability in the later stages; when... When it exceeds the boundaries of the 2D raster map or falls on a static obstacle, it will... Project onto the nearest free space; Based on new candidate path nodes Generate new candidate individuals ; Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are considered as the teacher's stage path update results.

[0045] This invention effectively solves the problem of "inconsistent path lengths preventing iteration" in traditional teaching and learning algorithms by generating temporary nodes through linear interpolation when dealing with differences in the number of nodes on different paths; simultaneously, it enables dynamic teaching factors... As the number of iterations increases linearly from 1 to 2, it can achieve early global search (wide search range) and later local convergence (high optimization accuracy).

[0046] In some embodiments of the present invention, the student path update module is specifically used for: Student pairing: Two different students are randomly selected from the teacher-stage path update results. and Calculate the fitness function values ​​for both. when The number of path nodes is higher than When the number of path nodes is small, path inequality processing is adopted. For the specific steps of path inequality processing, please refer to the detailed introduction in the Teacher Path Update module, which will not be repeated here. Learning process: Students learn from each other in pairs, generating a new candidate individual. , ,in, A random number that follows a uniform distribution within the range (0,1); Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are used as the result of updating the student stage path.

[0047] In some embodiments of the present invention, the termination determination module is specifically used to: determine whether the number of iterations exceeds [a certain threshold]. If the number of iterations exceeds If the student-stage path update results are correct, the path with the largest fitness function value among the updated paths is output as the optimal path; otherwise, the teacher path update module and termination judgment module are repeated for all initial paths until the number of iterations exceeds the limit. Periodic route updates complete the process.

[0048] Finally, it should be noted that the above embodiments are merely preferred embodiments of the present invention used to illustrate the technical solutions of the present invention, and are not intended to limit the invention, nor are they intended to limit the patent scope of the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention. That is to say, any changes or refinements made to the main design concept and spirit of the present invention that are not of substantial significance, but whose technical problems are still consistent with the present invention, should be included within the protection scope of the present invention. In addition, the direct or indirect application of the technical solutions of the present invention to other related technical fields are similarly included within the patent protection scope of the present invention.

Claims

1. A path planning method based on an improved teaching and learning algorithm, characterized in that, Includes the following steps: Step S1: Map construction and path node constraints; Step S2: Initialize the improved teaching and learning algorithm based on map and path node constraints. The initialization of the improved teaching and learning algorithm includes designing a fitness function that integrates path length, turning radius and obstacle distance, and using Dijkstra's algorithm to generate all initial paths. Step S3: Update the teacher stage path based on all initial paths to obtain the teacher stage path update result; Step S4: Based on the teacher's stage path update results, update the student's stage path to obtain the student's stage path update results; Step S5: Determine whether the termination condition is met. If the termination condition is met, output the path with the largest fitness function value in the student stage path update results as the optimal path; otherwise, use the student stage path update results as all initial paths and repeat steps S3-S5 until the termination condition is met.

2. The path planning method based on an improved teaching and learning algorithm according to claim 1, characterized in that, Step S1 includes: Map Construction: Construct a 2D raster map, where each raster has a resolution of 1x1 pixels. Each raster's attributes include free space and static obstacles. The overall 2D raster map matrix... Represented as ,in, This indicates the number of rows in a two-dimensional raster map. This indicates the number of columns in a two-dimensional raster map. This represents the row index of a two-dimensional raster map. Represents the column index of a two-dimensional raster map. Indicates the first line, number The element values ​​of the column, Represents free space. Indicates a static obstacle; Path node constraints: Path nodes satisfy The distance between adjacent path nodes satisfies ,in, Indicates the index of the path node.

3. The path planning method based on an improved teaching and learning algorithm according to claim 2, characterized in that, Step S2 includes: Parameter definition: The population size for improving the teaching and learning algorithm is... The maximum number of iterations is ; Path encoding: A single path is represented as a sequence of nodes. ,in For the number of nodes, for One of the node coordinates, Indicates the first Path, This indicates the first in this path. 1 node, and , ; fitness function for: ;in, Indicates the length of a single path. ; Indicates that radians are used. The turning angle at that point Indicates the turning radius; This represents the minimum distance from a single path to the nearest static obstacle. The expression is: , The grid set where static obstacles exist. For grid-to-path nodes where static obstacles exist The distance; The weighting coefficient represents the total length of a single path. The weighting coefficients represent the smoothness of a single path. Weighting coefficients representing the safety distance; Dijkstra's algorithm is used to generate an initial path for each individual. The initial path contains L path nodes. For each node in the initial path that is within two grid cells of a static obstacle, a random offset is performed. The distance between the node and the next node is checked. If the distance does not meet the requirement... Then, nodes are added between the current node and the next node, eventually generating all initial paths. The total number of initial paths is... Each initial path is an individual. An individual is a student, and all individuals form a group. Represented as , T represents transpose.

4. The path planning method based on an improved teaching and learning algorithm according to claim 3, characterized in that, In the fitness function, and .

5. A path planning method based on an improved teaching and learning algorithm according to claim 3, characterized in that, Step S3 includes: Teacher selection: Calculate the fitness function value for each student based on the fitness function, and select the student with the highest fitness function value as the individual selected by the teacher. Population mean calculation: Calculate the population mean. , The expression is ; Calculate node-level average , The expression is ,in, Indicates the first The first individual One path node; Path inequality handling: When The number of path nodes is higher than When the number of path nodes is small, Representing a group The Middle Individual, Representing a group The Middle Individuals; using linear interpolation, in Temporary path nodes are generated between path nodes to obtain the corresponding path nodes. Temporary node paths with the same number of path nodes ,Will Replace with Temporary path node for: ;in, and For the index of a randomly selected pair of adjacent path nodes, , This represents a path node. When a temporary path node exceeds the boundary of the 2D raster map or falls on a static obstacle, the temporary path node is projected to the nearest free space.

6. A path planning method based on an improved teaching and learning algorithm according to claim 5, characterized in that, Step S3 also includes: Teaching process: For each individual Each path node in Generate a new candidate path node : ; in, A random number between [0, 1]; As dynamic teaching factors, The expression is: , For time, Individuals selected for teachers Path nodes, when When it exceeds the boundaries of the 2D raster map or falls on a static obstacle, it will... Project onto the nearest free space; Based on new candidate path nodes Generate new candidate individuals ; Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are considered as the teacher's stage path update results.

7. A path planning method based on an improved teaching and learning algorithm according to claim 6, characterized in that, Step S4 includes: Student pairing: Two different students are randomly selected from the teacher-stage path update results. and Calculate the fitness function values ​​for both. when The number of path nodes is higher than When the number of path nodes is small, path inequality processing is adopted; Learning process: Students learn from each other in pairs, generating a new candidate individual. , ,in, A random number that follows a uniform distribution within the range (0,1); Student Update: Each student selects and Individuals with larger fitness function values ​​are considered as their own, and all students are used as the result of updating the student stage path.

8. A path planning method based on an improved teaching and learning algorithm according to claim 3, characterized in that, Step S5 includes: determining whether the number of iterations exceeds [a certain threshold]. If the number of iterations exceeds If the student-stage path update results are correct, then the path with the largest fitness function value among the student-stage path update results will be output as the optimal path; otherwise, the student-stage path update results will be used as all initial paths, and steps S3-S5 will be repeated until the number of iterations exceeds [a certain threshold]. .

9. A path planning system based on an improved teaching and learning algorithm, characterized in that, include: The environment modeling module is used for map building and path node constraints. The algorithm initialization module is used to initialize the improved teaching and learning algorithm based on map and path node constraints. The initialization of the improved teaching and learning algorithm includes designing a fitness function that integrates path length, turning radius and obstacle distance, and using Dijkstra's algorithm to generate all initial paths. The teacher path update module is used to update the teacher's stage path based on all initial paths and obtain the teacher's stage path update result. The student path update module is used to update the student's stage path based on the teacher's stage path update results, and obtain the student's stage path update results. The termination judgment module is used to determine whether the termination condition is met. If the termination condition is met, the path with the largest fitness function value in the student stage path update results is output as the optimal path. Otherwise, the student-stage path update result is used as all initial paths, and the teacher path update module-termination judgment module is repeated until the termination condition is met.

Citation Information

Patent Citations

  • Unmanned aerial vehicle path planning method and device for improving teaching and learning algorithm, and unmanned aerial vehicle

    CN118776583A

  • Model training method, path planning method and related device

    CN119646507A

  • Intelligent navigation method and system for mobile charging robot based on distillation strategy

    CN119915298A

  • Equipment assembly debugging teaching method and system based on virtual reality

    CN120564496A

  • Robot path planning method and system based on multi-strategy improvement and medium

    CN120593777A