A path planning method and system based on improved teaching and learning algorithms

By improving the teaching and learning algorithm and designing a multi-factor weighted fitness function and dynamic teaching factors, the problems of insufficient path length control and global-local search imbalance in path planning were solved, thus achieving efficient and safe path planning.

CN120991882BActive Publication Date: 2026-03-10泉州职业技术大学
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-03-10

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 and combining it with Dijkstra's algorithm to generate the initial path, and by updating the path in the teacher and student stages, the algorithm optimizes the path quality and convergence efficiency by using dynamic teaching factors and path inequality handling mechanisms.

Benefits of technology

It improves the overall performance of the path, reduces energy consumption and time costs, increases the obstacle avoidance success rate and algorithm convergence speed, and adapts to path planning in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120991882B_ABST
    Figure CN120991882B_ABST
Patent Text Reader

Abstract

This invention discloses a path planning method and system based on an improved teaching and learning algorithm, relating to the field of autonomous navigation technology for intelligent robots. The method includes map construction and path node constraints. The improved teaching and learning algorithm is initialized based on the map and path node constraints, using Dijkstra's algorithm to generate all initial paths. Teacher-stage path updates are performed based on all initial paths, yielding teacher-stage path update results. Student-stage path updates are then performed based on the teacher-stage path update results, yielding student-stage path update results. A termination condition is determined; if the termination condition is met, the path with the largest fitness function value among the student-stage path update results is output as the optimal path; otherwise, teacher and student-stage path updates continue until the termination condition is met. This invention offers advantages such as superior path quality, higher algorithm efficiency, stronger environmental adaptability, and wider application scenarios.
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 is 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 often fall into local optimal traps, resulting in low obstacle avoidance success rate and difficulty in balancing 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, making it difficult to meet the high-precision navigation needs 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 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 application is as follows:

[0006] In a first aspect, a path planning method based on an improved teach and learn algorithm includes the following steps:

[0007] Step S1, map construction and path node constraint;

[0008] 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.

[0009] Step S3: Update the teacher stage path based on all initial paths to obtain the teacher stage path update result;

[0010] 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;

[0011] 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.

[0012] Furthermore, step S1 includes:

[0013] 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;

[0014] Path node constraints: Path nodes satisfy The spacing between adjacent path nodes satisfies ,in, Indicates the index of the path node.

[0015] Furthermore, step S2 includes:

[0016] Parameter definition: The population size for improving the teaching and learning algorithm is... The maximum number of iterations is ;

[0017] Path encoding: A single path is represented as a sequence of nodes. ,in the number of nodes, for a node coordinate in the indicates the path, indicates the node in the path, and ;

[0018] fitness function is: ;

[0019] wherein, indicates the length of a single path, ; indicates the turning angle at the in radian, indicates the turning amplitude; indicates the minimum distance from a single path to the nearest static obstacle, the expression of , is a set of grids where static obstacles exist, is the distance from the grid where the static obstacle exists to the path node ; indicates the weight coefficient of the total length of a single path, indicates the weight coefficient of the smoothness of a single path, indicates the weight coefficient of the safety distance;

[0020] Dijkstra algorithm is used to generate the initial path of each individual, the initial path contains L path nodes, for each initial path, the nodes within 2 grids from the static obstacle are randomly offset, 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 indicates that T indicates transposition.

[0021] Further, in the fitness function, .

[0022] Further, step S3 comprises:

[0023] teacher selection: according to the fitness function value of each student calculated by the fitness function, a student with the largest fitness function value is selected as the individual after teacher selection ;

[0024] Population mean calculation: calculate the population mean , The expression of ; Calculate the node-level average , The expression of , where represents the th path node of the th individual;

[0025] Path inequality processing: when the number of path nodes of is less than the number of path nodes of , represents the th individual in the population , represents the th individual in the population ; Using linear interpolation method, generate temporary path nodes between path nodes, get the same number of temporary node paths Replace with , the temporary path node is: ; Wherein, and are the indices of a pair of adjacent path nodes selected at random, represents the path node, when the temporary path node exceeds the boundary of the two-dimensional grid map or falls on the static obstacle, then project the temporary path node to the nearest free space.

[0026] Further, step S3 further comprises:

[0027] Teaching process: for each path node in each individual , generate a new candidate path node ;

[0028] Wherein, is a random number between 0 and 1; is a dynamic teaching factor, The expression of , is time, is the path node of the individual selected by the teacher, when exceeds the boundary of the two-dimensional grid map or falls on the static obstacle, then project to the nearest free space;​

[0029] based on the new candidate path node generate a new candidate individual ;

[0030] student update: each student selects and the individual with the larger fitness function value as its own individual, and all students as the teacher stage path update result.

[0031] Further, step S4 includes:

[0032] student pairing: randomly select two different students from the teacher stage path update result, respectively and , calculate the fitness function value of the two;

[0033] When the number of path nodes of is less than the number of path nodes of , the path inequality processing is adopted;

[0034] learning process: students learn from each other, generate a new candidate individual , wherein, is a random number in (0, 1) obeying uniform distribution;

[0035] student update: each student selects and the individual with the larger fitness function value as its own individual, and all students as the student stage path update result.

[0036] Further, step S5 includes: judging whether the iteration number exceeds , if the iteration number exceeds , the path with the largest fitness function value in the student stage path update result is output as the optimal path; otherwise, the student stage path update result is taken as all initial paths and steps S3-S5 are repeated until the iteration number exceeds .

[0037] In a second aspect, a path planning system based on the improved teach-and-learn algorithm, characterized in that, comprising:

[0038] an environment modeling module for map construction and path node constraint;

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] 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.

[0045] 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.

[0046] 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.

[0047] 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

[0048] 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.

[0049] 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

[0050] 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.

[0051] 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.

[0052] 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

[0053] 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:

[0054] Step S1, Environment Modeling: Map Construction and Path Node Constraints;

[0055] 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.

[0056] Step S3, Teacher Stage Path Update: Update the teacher stage path based on all initial paths to obtain the teacher stage path update result;

[0057] 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;

[0058] 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.

[0059] 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.

[0060] In some embodiments of the present invention, step S1 includes:

[0061] 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;

[0062] Path node constraints: Path nodes satisfy The spacing between adjacent path nodes satisfies That is, diagonal movement is allowed, where, Indicates the index of the path node.

[0063] 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.

[0064] In some embodiments of the present invention, step S2 includes:

[0065] Parameter definition: The population size for improving the teaching and learning algorithm is... The maximum number of iterations is ;

[0066] 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 ;

[0067] fitness function for: ;

[0068] 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. Grid to path nodes where static obstacles exist The distance; The weighting coefficient represents the total length of a single path. The weighting coefficients representing the smoothness of a single path. Weighting coefficients representing the safe distance;

[0069] 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.

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

[0071] 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.

[0072] In some embodiments of the present invention, step S3 includes:

[0073] 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. ;

[0074] 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;

[0075] 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.

[0076] Teaching process: For each individual Each path node in Generate a new candidate path node ;

[0077] 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;

[0078] Based on new candidate path nodes Generate new candidate individuals ;

[0079] 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.

[0080] 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).

[0081] In some embodiments of the present invention, step S4 includes:

[0082] Student pairing: Two different students are randomly selected from the teacher-stage path update results. and Calculate the fitness function values ​​for both.

[0083] 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.

[0084] 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);

[0085] 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.

[0086] 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.

[0087] In summary, by adopting the above-described technical solution of the present invention, at least the following beneficial effects are achieved:

[0088] 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.

[0089] 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.

[0090] 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.

[0091] 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.

[0092] Example 2

[0093] Please see Figure 2 As shown, the present invention provides a path planning system based on an improved teaching and learning algorithm, comprising:

[0094] The environment modeling module is used for environment modeling: map building and path node constraints;

[0095] 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;

[0096] 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.

[0097] 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;

[0098] 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.

[0099] 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.

[0100] In some embodiments of the present invention, the environment modeling module is specifically used for:

[0101] 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;

[0102] Path node constraints: Path nodes satisfy The spacing between adjacent path nodes satisfies That is, diagonal movement is allowed, where, Indicates the index of the path node.

[0103] 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.

[0104] In some embodiments of the present invention, the algorithm initialization module is specifically used for:

[0105] Parameter definition: The population size for improving the teaching and learning algorithm is... The maximum number of iterations is ;

[0106] 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 ;

[0107] fitness function for: ;

[0108] 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. Grid to path nodes where static obstacles exist The distance; The weighting coefficient represents the total length of a single path. The weighting coefficients representing the smoothness of a single path. Weighting coefficients representing the safe distance;

[0109] 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.

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

[0111] 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.

[0112] In some embodiments of the present invention, the teacher path update module is specifically used for:

[0113] 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. ;

[0114] 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;

[0115] 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.

[0116] Teaching process: For each individual Each path node in Generate a new candidate path node ;

[0117] 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;

[0118] Based on new candidate path nodes Generate new candidate individuals ;

[0119] 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.

[0120] 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).

[0121] In some embodiments of the present invention, the student path update module is specifically used for:

[0122] Student pairing: Two different students are randomly selected from the teacher-stage path update results. and Calculate the fitness function values ​​for both.

[0123] 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.

[0124] 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);

[0125] 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.

[0126] 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.

[0127] 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 teach and learn algorithm, characterized in that, Comprising the following steps: Step S1, map construction and path node constraint; Step S2, improved teacher and student algorithm initialization based on the map and the path node constraint, the improved teacher and student algorithm initialization comprising designing a fitness function of comprehensive path length, turning amplitude and obstacle distance, and generating all initial paths by using a Dijkstra algorithm; specifically comprising: Parameter definition: the group quantity of the improved teaching and learning algorithm is N , and the maximum iteration quantity is ; Path encoding: a single path is represented as a sequence of nodes where L is the number of nodes, is a coordinate of a node in denotes the th path, denotes the th node in this path, and ; Fitness function is: ; 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. Grid to path nodes where static obstacles exist The distance; a weight coefficient representing the total length of a single path, a weight coefficient representing the smoothness of a single path, a weight coefficient representing the safety distance; Dijkstra algorithm is used to generate the initial path of each individual, the initial path contains L path nodes, the nodes in each initial path which are within 2 grids of static obstacles are randomly offset, the distance between the node and the next node is detected, if the distance does not meet , a node is supplemented between the node and the next node, finally all initial paths are generated, the number of all initial paths is N , each initial path is an individual , an individual is a student, all individuals are a group, the group is expressed as , T represents transposition; Step S3, teacher stage path updating based on all initial paths, to obtain a teacher stage path updating result; Step S4, student stage path updating based on the teacher stage path updating result, to obtain a student stage path updating result; Step S5, judging whether a termination condition is met, if the termination condition is met, taking a path with the largest fitness function value in the student stage path updating result as an optimal path and outputting the optimal path; otherwise, taking the student stage path updating result as all initial paths and repeating the step S3 to the step S5 until the termination condition is met.

2. The path planning method based on the improved teaching and learning algorithm according to claim 1, characterized in that, The step S1 comprises: Constructing a map: a two-dimensional grid map is constructed, the resolution of each grid is 1x1 pixel, the attributes of each grid include free space and static obstacle, the matrix of the overall two-dimensional grid map is denoted as , wherein denotes the number of rows of the two-dimensional grid map, denotes the number of columns of the two-dimensional grid map, denotes the row index of the two-dimensional grid map, denotes the column index of the two-dimensional grid map, denotes the element value of the i-th row and the j-th column, denotes the i-th row, denotes the j-th column, denotes the free space, denotes the static obstacle; Path node constraint: path node satisfies , the distance between adjacent path nodes satisfies wherein, denotes the index of the path node.

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

4. The path planning method based on the improved teaching and learning algorithm according to claim 2, characterized in that, The step S3 comprises: Teacher selection: calculate the fitness function value of each student according to the fitness function, and select a student with the maximum fitness function value as the individual after teacher selection ; Population mean computation: Compute population mean , The expression for the population mean is ; Compute node-level average , The expression for the node-level average is where denotes the th path node of the th individual; Path inequality processing: when the number of path nodes of is less than that of , the temporary path node is generated between and , and the temporary path node is ; the temporary path node is ; the temporary path node is ; the temporary path node is ; the temporary path node is ; the temporary path node is ; the temporary path node is ; the temporary path node is ; the temporary path node is ; the temporary path node is ; wherein, and are the indices of a pair of adjacent path nodes selected at random, represents the path node, and when the temporary path node exceeds the boundary of the two-dimensional grid map or falls on the static obstacle, the temporary path node is projected to the nearest free space.

5. The path planning method based on the improved teaching and learning algorithm according to claim 4, characterized in that, The step S3 further comprises: Teaching process: for each individual in each path node , generate a new candidate path node ; wherein, is a random number between [0, 1]; is a dynamic teaching factor, is expressed as: , is time, is the individual after teacher selection path node of, when goes beyond the boundary of the two-dimensional grid map or falls on a static obstacle, then is projected to the nearest free space; based on the new candidate path node generating a new candidate individual ; Student update: each student chooses and the individual with the greater fitness function value in the population as its own individual, and all students as the teacher phase path update result.

6. The path planning method based on the improved teaching and learning algorithm according to claim 5, characterized in that, The step S4 comprises: Student Pairing: Randomly select two different students from the teacher phase path update results, respectively and , calculate the fitness function value of both; When the number of path nodes of the path is less than the number of path nodes of the path, path inequality processing is adopted; Learning process: students learn from each other, generating a new candidate individual , wherein, is a random number in (0, 1) subject to a uniform distribution. Student update: each student chooses and the individual with the greater fitness function value in the population as its own individual, and all students as the student phase path update result.

7. The path planning method based on the improved teaching and learning algorithm according to claim 2, characterized in that, Step S5 includes: judging whether the iteration number exceeds If the iteration number exceeds , the path with the maximum fitness function value in the student stage path update result is output as the optimal path; otherwise, the student stage path update result is taken as all initial paths and steps S3-S5 are repeated until the iteration number exceeds .

8. A path planning system based on an improved teach and learn algorithm, characterized by, Comprising: An environment modeling module, configured to perform the map construction and the path node constraint; An algorithm initialization module, configured to perform the improved teacher and student algorithm initialization based on the map and the path node constraint, the improved teacher and student algorithm initialization comprising designing a fitness function of comprehensive path length, turning amplitude and obstacle distance, and generating all initial paths by using a Dijkstra algorithm; specifically comprising: Parameter definition: the group quantity of the improved teaching and learning algorithm is N , and the maximum iteration quantity is ; Path encoding: a single path is represented as a sequence of nodes where L is the number of nodes, is a coordinate of a node in denotes the th path, denotes the th node in this path, and ; Fitness function is: ; wherein, represents the length of a single path, ; represents the turning angle at the turning point in radian system, represents the turning amplitude; represents the minimum distance from a single path to the nearest static obstacle, The expression of is: , is the set of grids where the static obstacle exists, is the distance from the grid where the static obstacle exists 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, the nodes in each initial path which are within 2 grids of static obstacles are randomly offset, the distance between the node and the next node is detected, if the distance does not meet , a node is supplemented between the node and the next node, finally all initial paths are generated, the number of all initial paths is N , each initial path is an individual , an individual is a student, all individuals are a group, the group is expressed as , T represents transposition; A teacher path updating module, configured to perform the teacher stage path updating based on all initial paths, to obtain a teacher stage path updating result; A student path updating module, configured to perform the student stage path updating based on the teacher stage path updating result, to obtain a student stage path updating result; A termination judging module, configured to judge whether a termination condition is met, if the termination condition is met, taking a path with the largest fitness function value in the student stage path updating result as an optimal path and outputting the optimal path; otherwise, taking the student stage path updating result as all initial paths and repeating the teacher path updating module to the termination judging module until the termination condition is met.

Citation Information

Patent Citations

  • Model training method, path planning method and related device

    CN119646507A

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

    CN118776583A

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

    CN120593777A