Path planning method based on fusion cellular genetic algorithm

By combining genetic algorithms and cellular automata and using cellular state matrix to optimize path planning, the problems of slow path planning and poor fitness of genetic algorithms are solved, and more efficient path planning is achieved.

CN119245677APending Publication Date: 2025-01-03BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411342038.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, when path planning is performed based on genetic algorithms, the problem of slow solution speed and poor path planning adaptability.

Method used

A path planning method based on fusion cell genetic algorithm is adopted. By establishing an environmental map and path coding strategy, using raster models and rectangular cell space, the genetic algorithm is combined with cellular automata, and iterating using the cell state matrix. Evolution, optimize the path planning process.

Benefits of technology

It improves the solution speed and fitness of path planning, and can find the best path faster, solving the problem of slow convergence of genetic algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119245677A_ABST
    Figure CN119245677A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of robot autonomous navigation, in particular to a fusion cellular genetic algorithm-based path planning method, which comprises the following steps of: establishing an environment map and a path coding strategy; determining a fitness function; under continuous iteration of the initialized population evolution rule, all path individuals are initialized, and a cellular state matrix storing initial population information is obtained; selecting a solution with high fitness from the population to directly enter the next generation, and performing random pairwise pairing operation on the remaining individuals; iterative evolution is carried out on the cellular state matrix through crossover and variation evolution rules, and the population is updated through fitness ranking; and when starting from a certain generation, the optimal fitness individual in the population does not change for several consecutive generations, terminating the iteration process of the algorithm, and outputting the optimal solution in the population at the moment as a path planning result. The method is high in solving speed and high in path planning fitness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot autonomous navigation, and more specifically to a path planning method based on a fused cellular genetic algorithm. Background Art

[0002] With the increasing intelligence of ground mobile robots, the path planning capability of robots is particularly important and is an important part of autonomous navigation. At present, genetic algorithms are generally used for path planning of robots. Due to the randomness and global search characteristics of genetic algorithms, their convergence speed is relatively slow. This may result in the algorithm being unable to find the optimal solution within a limited time, or the quality of the solution found is not high enough. Summary of the invention

[0003] In view of this, the present invention provides a path planning method based on a fused cellular genetic algorithm, which solves the problems of slow solution speed and poor path planning fitness when performing path planning based on a genetic algorithm in the prior art.

[0004] In order to achieve the above object, the present invention adopts the following technical solution:

[0005] A path planning method based on fusion cellular genetic algorithm includes the following steps:

[0006] Establish an environmental map and path encoding strategy, use a grid model as the environmental map, use a rectangular cell space as the cell space of the cellular automaton, and make a grid in the evolution space of the genetic algorithm correspond to a cell in the cell space;

[0007] Determine the fitness function;

[0008] Under the continuous iteration of the initial population evolution rules, all path individuals are initialized to obtain the cellular state matrix storing the initial population information;

[0009] The top solutions in fitness ranking are selected from the population and directly enter the next generation, and the remaining individuals are randomly paired;

[0010] Iterate the evolution on the cellular state matrix through crossover and mutation evolution rules, and update the population through fitness sorting;

[0011] When the individual with the best fitness in the population does not change for several consecutive generations starting from a certain generation, the iterative process of the algorithm is terminated, and the optimal solution in the population at this time is output as the result of path planning.

[0012] Furthermore, each column in the cell state matrix represents a path, and each row represents a cell state; the cell state of each path includes six state flags, namely: number, next, prev, cross, pass, and obst;

[0013] Among them, number represents the path individual mark;

[0014] Next represents the next cell pointing mark of the current path. If the next state value of a path individual in the cell state is 0, it means that the path does not continue to extend from this cell;

[0015] prev represents the previous cell pointing flag of the current path. If the prev state value of a path individual in the cell state is 0, it means that the path has not entered this cell;

[0016] Cross represents the transfer crossover status flag, which is used to distinguish whether the genes of the corresponding parent individuals need to be exchanged. If cross=0, it means that the path individuals corresponding to the current cell have not been crossed, and if cross=1, it means that the corresponding parent individuals have been crossed.

[0017] Pass represents the flag of the cell that has been passed. If the pass value of path i is 0, it means that path i has not passed the current cell; if the pass value of path i is 1, it means that path i has passed the current cell;

[0018] obst represents the mark for distinguishing obstacles. If the obst value is 0, it means that the current cell is a free grid cell; if the obst value is 1, it means that the current cell is an obstacle cell.

[0019] Furthermore, for the path numbered i, its fitness function is expressed as:

[0020] f i =2mn-D i

[0021] Where D i It represents the length of the path with serial number i, and m and n represent the number of rows and columns of the grid environment map respectively.

[0022] Furthermore, the initialization population evolution rule includes:

[0023] Set the population size to N, set the auxiliary matrix Ball to the same size as the cell space, and equate the path to a small ball. Ball(a) represents an array, which represents the number set of the small balls currently held in the cell with cell number a.

[0024] Initially, according to the grid map information, the obst state corresponding to each cell is updated, and the number state row in each cell is filled with integers increasing from 1 to N, and the other states are set to 0;

[0025] For all cells, check whether there is a neighbor cell of the current cell whose next state corresponding to a certain path number is the cell number and whose pass state is 0. If there is such a neighbor, and the prev value of the path individual corresponding to the center cell is 0, then update the prev state to the corresponding neighbor cell number;

[0026] Select the next direction of the ball. In each step of evolution, all cells check whether Ball(a) corresponding to their cell number a is not empty. If it is not empty, the next position of the ball corresponding to each number in Ball(a) is selected and the value of the next state indicated by the corresponding number is updated.

[0027] Furthermore, when choosing the next direction of the ball, the following factors need to be considered:

[0028] Factor 1: Depending on the relative position relationship between the starting point and the end point in space, the probability of the ball choosing neighbors in different directions in the eight-neighborhood neighborhood of the current cell is also different. When there is an obstacle in the neighborhood, the probability on the obstacle cell is evenly distributed to the remaining non-obstruction cells in proportion;

[0029] Factor 2: Consider the role of the obst state and pass state in the current cell's neighbors. The neighbor cells whose obst state is 0 and whose pass state is also 0 are valid neighbor cells. Depending on the size of the corresponding direction probability of the valid neighbor cells, the next position loci of the ball is selected, and the next state corresponding to the ball number is updated in the current cell state information, and the corresponding pass state is set to 1. At the same time, the ball with the corresponding number in the auxiliary matrix is ​​deleted from the current Ball(i) and added to Ball(loci); if the current cell number is the end number goal, the ball is equivalent to not moving, and the state value no longer changes; when Ball(goal)=[1,2,3,……,N], the evolution stops;

[0030] Factor three: Consider the situation where the path generation process encounters a dead end. When a ball in a cell has no valid neighbors, its next state value is set to its current corresponding prev state value, and the pass value corresponding to the path number is set to 1. The current cell is regarded as a special obstacle, so that subsequent paths will no longer re-enter this cell; this process is repeated until the path continues to extend in a feasible direction.

[0031] Furthermore, the crossover and mutation evolution rules include:

[0032] After determining the intersection position of each pair of parents, starting from the starting cell, in the process of pointing to the next cell according to the next state value of the corresponding path until reaching the corresponding intersection position, the cell state cross of the corresponding path in the cells passed in sequence is set to 1; the next state values ​​of the corresponding parents in the cells at the intersection position are swapped, and the cross state position is 1;

[0033] If the cross state bit of the path number corresponding to the intersection position cell is 1, the evolution rule is: each cell detects the number of its eight-neighborhood neighbor cells with the cross state bit being 1. If the cross state bit of its own corresponding number is 0, the prev and next state values ​​of the path corresponding to the number with cross=1 in the neighbor are swapped, and the cross of its own corresponding number is set to 1.

[0034] Furthermore, in the crossover and mutation evolution, each step of evolution makes the information of cross=1 spread one grid in eight directions, and the maximum evolutionary number MAX is set to:

[0035] MAX=max{m-1,n-1}

[0036] Among them, max represents the maximum value operation, m and n represent the number of rows and columns of the cell space respectively.

[0037] Furthermore, in the crossover and mutation evolution, the mutation operator is a neighborhood mutation operator, so that the change of the path is limited to the eight-neighborhood type of a single mutation point grid; assuming that cell a is the central cell, if the next state bit of path i on cell a is b, if the value of the next state bit of neighbor cell i of b still belongs to one of the Moore neighbor cell numbers of cell a, then the next state value of path i of central cell a is set to the next state value of path i of neighbor cell b, so that this path goes directly from cell a to the successor cell of cell b.

[0038] Furthermore, in the crossover and mutation evolution, cell a is taken as the central cell. The path number is i. If there is a cell that is not passed by path i in the intersection of the eight-neighborhood neighbor set of cell a and the eight-neighborhood neighbor set of cell b pointed to by the next value of path i, then a cell c that meets the conditions is randomly selected, so that the next state value of path i of the central cell a is c, the next state value of path i of cell c is b, and the prev flag of path i of cell b is set to c.

[0039] Furthermore, the population update process includes:

[0040] The number of offspring individuals produced after crossover and mutation is the same as the number of parents after removing the elite individuals; all path individuals in the two-generation population are sorted according to their fitness, and the individuals with fitness values ​​in the top 50% are selected, together with the elite individuals selected in the selection stage, as the population of the next generation, and the new cellular state matrix is ​​filled in according to the information stored in the cellular state matrix. The subsequent crossover and mutation processes are carried out in the updated cellular state matrix.

[0041] It can be seen from the above technical solution that compared with the prior art, the present invention has the following beneficial effects:

[0042] The present invention organically combines the evolutionary space of the genetic algorithm, the cellular space of the cellular algorithm and the geographic space used for planning. The characteristics of the path can be directly reflected through the cellular state in the cellular neighborhood, so that the population in the genetic algorithm can evolve towards a high adaptability through the evolution of the cellular automaton, thereby solving the optimal path more quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0044] Figure 1 A flow chart of a path planning method based on a fusion cellular genetic algorithm provided by the present invention;

[0045] Figure 2 A substantial schematic diagram of the cellular space boundary provided by the present invention;

[0046] Figure 3 A schematic diagram of a cell state matrix provided by the present invention;

[0047] Figure 4 A schematic diagram of the process of the current point of path 40 provided by the present invention entering cell 6 from cell 5;

[0048] Figure 5 A schematic diagram of the state change of cell No. 5 provided by the present invention;

[0049] Figure 6 A schematic diagram of the direction probability of moving from the current center cell to different neighboring cells provided by the present invention;

[0050] Figure 7 A schematic diagram of a path rollback operation on a certain path provided by the present invention;

[0051] Figure 8 A schematic diagram of the two paths provided by the present invention before and after they intersect;

[0052] Fig. 9 A schematic diagram of the evolution of the crossed state provided by the present invention;

[0053] Fig.10 A schematic diagram of the path variation before and after provided by the present invention;

[0054] Fig.11 This is a schematic diagram of the forward and backward directions of the second type of variation of the path provided by the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] like Figure 1 As shown, the embodiment of the present invention discloses a path planning method based on a fusion cellular genetic algorithm, comprising the following steps:

[0057] S1. Establish an environment map and path encoding strategy, use a grid model as the environment map, use a rectangular cell space as the cell space of the cellular automaton, and make a grid in the evolution space of the genetic algorithm correspond to a cell in the cell space;

[0058] S2, determine the fitness function;

[0059] S3. Under the continuous iteration of the initial population evolution rule, all path individuals are initialized to obtain a cellular state matrix storing the initial population information;

[0060] S4, select the top fitness ranking solutions from the population and directly enter the next generation, and the remaining individuals are randomly paired;

[0061] S5, iteratively evolve on the cellular state matrix through crossover and mutation evolution rules, and update the population through fitness ranking;

[0062] S6. When the individual with the best fitness in the population does not change for several consecutive generations starting from a certain generation, the iterative process of the algorithm is terminated, and the optimal solution in the population at this time is output as the result of path planning.

[0063] The above steps are further described below.

[0064] S1. Use the grid model as the environment model, and the rectangular cell space as the cell space of CA. A grid in the evolution space corresponds to a cell in the cell space, so that the cell space of CA and the evolution space of GA are combined into one, which is conducive to the setting of subsequent evolution rules. Set the cell boundary as a fixed value boundary. Outside the grid environment, it is equivalent to setting a circle of virtual obstacle grids, and its obstacle state is set to 1, such as Figure 2 Considering that the mobile robot can move to the eight neighboring directions around it, the Moore (eight-neighborhood) type neighborhood model is selected.

[0065] The design of cellular states requires comprehensive consideration of the characteristics of the problem. Figure 3 The cell state matrix form is designed. Each state plays a role in different stages of the algorithm. Each column in the cell state matrix represents a path, and each row represents a cell state. The cell state of each path contains six state flags, namely: number, next, prev, cross, pass and obst.

[0066] in:

[0067] 1) number represents the path individual mark; if the genetic algorithm population size is N, the value of number starts from 1 and increases by 1 each time until it is equal to the population size N.

[0068] 2) Next represents the next cell pointing mark of the current path. In the traditional grid model, the path is represented by an ordered sequence number set, while in the fusion cellular genetic algorithm (FCGA) of the present invention, the cell state only records the next point of the current path, which is equivalent to a "pointer". Then a path is equivalent to starting from the starting point, continuously pointing to the next grid through the "pointer" until reaching the end cell, and passing through the cell sequence number set in sequence. If the next state value of a path individual in the cell state is 0, it means that the path does not continue to extend from this cell.

[0069] 3) prev represents the previous cell pointing mark of the current path. If the prev state value of a path individual in the cell state is 0, it means that the path has not entered this cell. In the process of path initialization, in order to avoid a path entering the same cell twice, that is, the occurrence of a "loop", and to be able to handle dead ends, a forward "pointer" is used to record the previous cell of the current cell. When encountering a loop or dead end, it can be backed off by looking for the forward "pointer" until it returns to normal. If the prev state value of a path individual in the cell state is 0, it means that this path has not entered this cell.

[0070] 4) cross represents the flag for transferring the crossover status. Since the evolutionary rules are restricted to the Moore neighborhood, one step of evolution can only change one gene code. The crossover process is equivalent to starting from the intersection and spreading outward in circles. Therefore, in order to record the crossover information of the individuals on the two paths, it is necessary to set the crossover flag shown in the fourth row of the cell state matrix to distinguish whether the genes of the corresponding parent individuals need to be exchanged. cross = 0, indicating that the individuals on the path corresponding to the current cell have not yet crossed, and cross = 1, indicating that the corresponding parent individuals have crossed.

[0071] 5) pass represents the flag of the cell that has been passed. The passed cells should be marked and try not to enter the passed cells again. If the pass value of path i is 0, it means that path i has not passed the current cell; if the pass value of path i is 1, it means that path i has passed the current cell; this information can be used to determine whether a path will pass the same cell twice, that is, a "loop" occurs.

[0072] 6) obst represents the distinguishing mark of obstacles. In a cell, all path individuals share the same obstacle information, so only one obstacle state mark can be set, recorded as obst. It is stipulated that if the obst value is 0, it means that the current cell is a free grid cell; if the obst value is 1, it means that the current cell is an obstacle cell.

[0073] In FCGA, all the information of individuals in the population is stored in the cell state, and each column of the state matrix represents the information of a path in this cell. Figure 3 Taking the dotted box in the middle as an example, assuming that the sequence number of this cell is 22, the following information can be obtained from the cell state value: the obst value is 0, indicating that this cell is a free cell and the path can pass through it; number=2, prev=2, next=23, cross=0, pass=1 means that the path individual with sequence number 2 comes from cell No. 2 on this cell, passes through cell No. 22, and goes to cell No. 23, and path No. 2 has not yet intersected with its paired path, and path No. 2 has passed through cell No. 22 once.

[0074] S2. Determine the fitness function.

[0075] Since the optimization goal of the optimization problem of the present invention is to find the minimum value of the objective function, a linear transformation is performed on the objective function. For the path numbered i, its fitness function is expressed as:

[0076] f i =2mn-D i

[0077] Where D i It represents the length of the path with serial number i, and m and n represent the number of rows and columns of the grid environment map respectively.

[0078] S3. Initialize the population. By continuously iterating the evolution rules of the initialized population, a cell state matrix storing the initial population information is obtained.

[0079] Initializing the population is an important step in solving problems with genetic algorithms. Due to the high parallelism of cellular automata, the present invention can initialize all path individuals and complete the initialization task under the continuous iteration of the evolution rules of the initialized population.

[0080] This evolution rule is based on a "ball / grid distribution" mechanism. Suppose there are some small balls representing the current location of the path, which can move in adjacent cell grids. While the ball moves between grids, the information of the path represented by the ball can be recorded in the cell state. When all the balls reach the end point from the starting point, all the path information is recorded in the cell state. Suppose the numbering value of the ball starts from 1 and increases by 1 each time until the population size N, and different numbers represent different paths. Each ball can only be in one cell at any time, and at each step of evolution, the ball can only walk into one of its Moore neighbors. While the ball is "moving", the current position information of the ball with a specific number and the position information of the next step are recorded in the column with the corresponding serial number of the corresponding cell state. For example Figure 4 As shown in , assume that the ball numbered 40 is in cell 5 at time T = t. If it enters cell 6 according to a certain rule at the next moment, then this rule must also record the information that "ball number 40 enters cell 6 from cell 5" into the cell state, as shown in Figure 5 As shown. From the overall effect, when the ball moves from the starting point to the end point, it continuously updates the state of all cells according to the cell number information of each cell it passes through in sequence, and finally fills all the information of the path corresponding to the ball number into the cell state, completing the initialization of the path corresponding to this numbered ball. The termination condition of the evolution is set as: detecting the state value of the prev row of the cell at the end point of the path planning. When the N values ​​of the prev state row are not 0, that is, the N balls (N paths) have entered the end point, the evolution stops. At this time, the information of all path individuals is recorded in the cell state, waiting for the next operation.

[0081] Specifically, the initialization population evolution rules include:

[0082] 1) Set the population size to N, set the auxiliary matrix Ball to the same size as the cell space, and equate the path to a ball. Ball(a) represents an array, which indicates the set of ball numbers currently held in the cell with cell number a. For example, if Ball(45) = [2,5,16,33], it means that balls 2, 5, 16, and 33 are currently in cell 45. At the initial moment, set Ball(begin) = [1,2,3,…,N] corresponding to the starting number begin, that is, all balls are initially at the starting point. The end number is recorded as goal.

[0083] 2) Initially, according to the grid map information, the obst state corresponding to each cell is updated, and the number state row in each cell is filled with integers increasing from 1 to N, and the other states are set to 0, that is, there is no path information in the cell state initially.

[0084] 3) For all cells, check whether there is a neighbor cell of the current cell whose next state corresponding to a path number is the cell number and whose pass state is 0. If there is such a neighbor, and the prev value of the path individual corresponding to the center cell is 0, then update the prev state to the corresponding neighbor cell number;

[0085] 4) Select the next direction of the ball. In each step of evolution, all cells check whether Ball(a) corresponding to their cell number a is not empty. If it is not empty, the next position of the ball corresponding to each number in Ball(a) is selected and the value of the next state indicated by the corresponding number is updated.

[0086] Here we introduce a heuristic idea, that is, according to the different relative position relationship between the starting point and the end point in space, the probability of the ball choosing neighbors in different directions in the Moore neighborhood of the current cell is also different. Assuming that the starting point of the path planning is in the upper left corner of the map and the end point is in the lower right corner of the map, then in the absence of obstacles, the optimal path must be a straight line from the upper left to the lower right. From this special case, it can be seen that the probability of each cell choosing its Moore neighbor in the lower right corner is close to 1, and the probabilities of the other directions are close to 0. In the general case where there are obstacles, this method of assigning probabilities of different directions according to the location information of the end point can also improve the efficiency of the ball reaching the end point, thereby reducing the total evolution time. For example Figure 6 As shown in the figure, the probability values ​​of the path moving from the center cell to its neighbor cells are filled in each neighbor cell. The probability of the path moving to the neighbor cells below and to the right is higher, while the probability of moving to the upper left and other directions is lower, so that the path can extend to the lower right faster. When encountering obstacles in the neighborhood, the probability on the obstacle cell is evenly distributed to the remaining non-obstruction cells in proportion, ensuring that the proportion of the probability of selecting the remaining feasible cells remains unchanged.

[0087] When selecting the next position of each ball, not only the influence of the direction probability value should be considered, but also the role of the obst state and pass state in the current cell neighborhood. If the obst state of a neighbor is 1, it means that it is an obstacle cell, and the ball will definitely not choose to enter this cell. If the pass state value of the corresponding ball number in a neighbor is 1, the ball should also avoid entering this cell to cause a "loop". In general, neighbor cells with an obst state of 0 and a pass state of 0 are valid neighbor cells. Depending on the size of the corresponding direction probability of the valid neighbor cells, the next position loci of the ball is selected, and the next state corresponding to the ball number is updated in the current cell state information, and the corresponding pass state is set to 1. At the same time, the ball with the corresponding serial number in the auxiliary matrix is ​​deleted from the current Ball(i) and added to Ball(loci); if the current cell serial number is the end point serial number goal, the ball is equivalent to not moving, and the state value no longer changes; when Ball(goal)=[1,2,3,……,N], the evolution stops;

[0088] Consider the case where the path generation process encounters a dead end. When a ball in a cell has no valid neighbors, such as Figure 7 In the case of a "dead end" as shown, its next state value is set to its current corresponding prev state value, and the pass value corresponding to the path number is set to 1, and the current cell is regarded as a special obstacle, so that the subsequent path will no longer re-enter this cell, resulting in the continuous occurrence of the "dead end" phenomenon. This type of "special obstacle", that is, the state of pass = 1, is related to the specific path number, so that the pass state of a path on a certain cell will not affect other paths entering this cell. Repeat this process until the path continues to extend in a feasible direction. This process simulates the stack popping process, realizes the path retraction operation, and effectively avoids the abnormal evolution of the cell state caused by encountering a dead end. At the same time, since each cell can only be passed once at most in the process of generating the path, the efficiency of the algorithm is indirectly guaranteed.

[0089] S4. Determine the selection method.

[0090] In the cellular automaton model, a single cell cannot reflect the global state of the system, and the local cell does not store complete path information. The selection stage needs to rely on the fitness of the path individuals and needs to combine the information in all cells. Therefore, the selection stage of FCGA is difficult to implement using local evolutionary rules. Since the crossover and mutation operators of FCGA are continuously iterated on the cellular state by the cellular rules, in order to make full use of the information in the cellular state, the present invention sets a special selection method. According to the elite retention strategy, a small number of solutions with the best fitness are first selected from the population, which do not participate in the crossover and mutation process and directly enter the next generation; while the remaining individuals in the population are randomly paired with each other, and the information of the paired parents is recorded.

[0091] S5. Determine the crossover and mutation methods. The crossover and mutation evolution rules are used to continuously iterate the evolution on the cellular state information matrix, and finally a cellular state matrix storing the information of the evolved new offspring individuals is obtained.

[0092] The scope of the cellular automaton evolution rules is within the cell neighborhood, and the task of determining whether two paths have intersections and then randomly selecting intersections requires knowing the overall information of the paths. Therefore, before using the evolution rules for intersection, a preprocessing stage is required to determine the intersection points of the paired parents after the selection process. From the cell state information of each cell, the information of each path can be conveniently extracted through the next state bit and recorded in the array structure shown in the following formula:

[0093] P i =[v i1 ,v i2 ,…,v ik ]

[0094] Where P i represents the path individual numbered i, v ij represents the number of the jth cell that the path individual numbered i passes through, v ik represents the end cell number. Let r and s represent the numbers of two paths, P r With P s The set of common points of two paths is denoted as SP r,s (SamePoints), defined as follows:

[0095] SP r,s =SP s,r =P s ∩P r

[0096] The present invention adopts the form of single-point crossover, so from SP r,sA cell number other than the starting point and the end point is randomly selected as the intersection position of the two paired paths, denoted as CP r,s (CrossPoint), whose value is equal to the selected cell number. If there is no such number, then CP r,s =0, which means that there is no crossover point for this pair of parents and they do not participate in crossover. This should be distinguished in the evolutionary rules.

[0097] Specifically, the crossover and mutation evolution rules include:

[0098] Since the evolution rules act within the cellular neighborhood, the cellular state cross is needed to convey the information of "whether a crossing has occurred". When cross is 0, it means that the path has not crossed on this cellular grid, and when cross is 1, it means that the path has crossed on this cell. Therefore, the cross state can be understood as a state that indicates whether a crossing has occurred. Figure 8 The figure shows a visualization of the intersection of the path numbered 1 and the path numbered 9. The figure shows the law of the intersection operation, that is, in the path cells before the intersection cell, the cell state of the corresponding path does not change; in the intersection cell, the next state values ​​of the two paired parent paths are exchanged; and in the cells passed by the path after the intersection, the prev state value and the next state value of the two paired parent paths are exchanged, that is, the evolutionary dynamics of the path cells before the intersection cell, the intersection cell, and the path cells after the intersection are inconsistent.

[0099] In order to solve this problem, after determining the intersection position of each pair of parents, the present invention starts from the starting cell, and in the process of pointing to the next cell according to the next state value of the corresponding path until reaching the corresponding intersection position (CP), the cell state cross of the corresponding path in the cells passed in sequence is set to 1; the next state values ​​of the corresponding parents in the cells at the intersection position are swapped, and the cross state position is 1; then in the subsequent evolution process, the cell state before the intersection and the intersection itself will no longer change, thereby simplifying the design of subsequent rules.

[0100] If the cross state bit of the path number corresponding to the intersection position cell is 1, the evolution rule is: each cell detects the number of its eight-neighborhood neighbor cells with the cross state bit being 1. If the cross state bit of its own corresponding number is 0, the prev and next state values ​​of the path corresponding to the number with cross=1 in the neighbor are swapped, and the cross of its own corresponding number is set to 1.

[0101] like Fig. 9As shown, since each evolution step of the cellular automaton model of the present invention makes the information of cross=1 "diffuse" one grid in eight directions, the maximum evolution generation MAX is set as the following formula, where max represents the maximum value operation, and m and n represent the number of rows and columns of the cellular space respectively. The cellular state information after the crossover evolution rule iterates MAX generations must reflect the influence of the crossover operation, and the crossover operation is completed.

[0102] MAX=max{m-1,n-1}.

[0103] Since the cellular automaton evolution rules act within the neighborhood, the mutation operator of the present invention is a neighborhood mutation operator, that is, the change of the path is limited to the Moore neighborhood of a single mutation point grid. Assuming that cell a is the central cell, if the next state bit of path i on cell a is b, and if the value of the next state bit of neighbor cell i of b still belongs to one of the Moore neighbor cell numbers of cell a, then the next state value of path i of central cell a is set to the next state value of path i of neighbor cell b, so that this path goes directly from cell a to the successor cell of cell b.

[0104] like Fig.10 (a) in the figure shows the direction of the path numbered i around cell 5. Assuming that cell 5 satisfies the mutation probability, cell 5 is used as the central cell for mutation. The next state bit of path number i on cell 5 is 6. If the value of the next state bit of neighbor cell number i of cell 6 still belongs to one of the Moore neighbor cell numbers of cell 5, then the next state value of path number i of central cell 5 is set to the next state value of path number i of neighbor cell 6, as shown in the following example: Fig.10 As shown in (b) in the figure, the effect is that this path goes directly from cell 5 to the successor cell of cell 6. This is the basic idea of ​​neighborhood mutation design.

[0105] The above mutation process can also have the opposite performance. In the crossover and mutation evolution, cell a is taken as the central cell. The path number is i. If there is a cell that is not passed by path i in the intersection of the eight-neighborhood neighbor set of cell a and the eight-neighborhood neighbor set of cell b pointed to by the next value of path i, then a cell c that meets the conditions is randomly selected, so that the next state value of path i of the central cell a is c, and the next state value of path i of cell c is b, and the prev flag of path i of cell b is set to c.

[0106] like Fig.11 As shown in (a), cell 5 is still the central cell, and the path number is still set to i. If the intersection of the Moore neighbor set of cell 5 and the Moore neighbor set of cell 9 pointed to by the next value of path i (such as Fig.11 In (b), if there are cells that path i has not passed through, a cell that meets the conditions is randomly selected (number 6 is selected in the figure), so that the next state value of path i of center cell 5 is 6, and the next state value of path i of cell 6 is 9. At the same time, the prev flag of path i of cell 9 is set to 6, which means that the second type of mutation process is realized. The significance of this type of mutation is that after a certain path mutates, it passes through cells that have not been passed before, making it possible for it to intersect with other paths that originally had no intersections, which can improve population diversity and alleviate premature convergence; at the same time, due to the fitness sorting selection mechanism of this method, individuals with longer path lengths after mutation will not affect individuals with shorter path lengths before mutation from entering the next generation, and will not cause the loss of better solutions in the current population.

[0107] The population update process includes:

[0108] The number of offspring individuals produced after crossover and mutation is the same as the number of parents after removing the elite individuals; all path individuals in the two-generation population are sorted according to their fitness, and the individuals with fitness values ​​in the top 50% are selected, together with the elite individuals selected in the selection stage, as the population of the next generation, and the new cellular state matrix is ​​filled in according to the information stored in the cellular state matrix. The subsequent crossover and mutation processes are carried out in the updated cellular state matrix.

[0109] S6. Determine the iterative termination condition. Set the iterative process of the algorithm to terminate when the best fitness individual in the population does not change for several consecutive generations starting from a certain generation, and output the optimal solution in the population at this time as the result of path planning.

[0110] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0111] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A path planning method based on fusion cellular genetic algorithm, characterized in that: The following steps are involved: Establish an environmental map and path encoding strategy, use a grid model as the environmental map, use a rectangular cell space as the cell space of the cellular automaton, and make a grid in the evolution space of the genetic algorithm correspond to a cell in the cell space; Determine the fitness function; Under the continuous iteration of the initial population evolution rules, all path individuals are initialized to obtain the cellular state matrix storing the initial population information; The top solutions in fitness ranking are selected from the population and directly enter the next generation, and the remaining individuals are randomly paired; Iterate the evolution on the cellular state matrix through crossover and mutation evolution rules, and update the population through fitness sorting; When the individual with the best fitness in the population does not change for several consecutive generations starting from a certain generation, the iterative process of the algorithm is terminated, and the optimal solution in the population at this time is output as the result of path planning.

2. The path planning method based on fusion cellular genetic algorithm according to claim 1 is characterized in that: Each column in the cell state matrix represents a path, and each row represents a cell state; the cell state of each path includes six state flags, namely: number, next, prev, cross, pass, and obst; Among them, number represents the path individual mark; Next represents the next cell pointing mark of the current path. If the next state value of a path individual in the cell state is 0, it means that the path does not continue to extend from this cell; prev represents the previous cell pointing flag of the current path. If the prev state value of a path individual in the cell state is 0, it means that the path has not entered this cell; Cross represents the transfer crossover status flag, which is used to distinguish whether the genes of the corresponding parent individuals need to be exchanged. If cross=0, it means that the path individuals corresponding to the current cell have not been crossed, and if cross=1, it means that the corresponding parent individuals have been crossed. Pass represents the flag of the cell that has been passed. If the pass value of path i is 0, it means that path i has not passed the current cell; if the pass value of path i is 1, it means that path i has passed the current cell; obst represents the mark for distinguishing obstacles. If the obst value is 0, it means that the current cell is a free grid cell; if the obst value is 1, it means that the current cell is an obstacle cell.

3. The path planning method based on fusion cellular genetic algorithm according to claim 1 is characterized in that: For the path numbered i, its fitness function is expressed as: f i =2mn-D i Where D i It represents the length of the path with serial number i, and m and n represent the number of rows and columns of the grid environment map respectively.

4. The path planning method based on fusion cellular genetic algorithm according to claim 2 is characterized in that: The initialization population evolution rules include: Set the population size to N, set the auxiliary matrix Ball to the same size as the cell space, and equate the path to a small ball. Ball(a) represents an array, which represents the number set of the small balls currently held in the cell with cell number a. Initially, according to the grid map information, the obst state corresponding to each cell is updated, and the number state row in each cell is filled with integers increasing from 1 to N, and the other states are set to 0; For all cells, check whether there is a neighbor cell of the current cell whose next state corresponding to a certain path number is the cell number and whose pass state is 0. If there is such a neighbor, and the prev value of the path individual corresponding to the center cell is 0, then update the prev state to the corresponding neighbor cell number; Select the next direction of the ball. In each step of evolution, all cells check whether Ball(a) corresponding to their cell number a is not empty. If it is not empty, the next position of the ball corresponding to each number in Ball(a) is selected and the value of the next state indicated by the corresponding number is updated.

5. The path planning method based on fusion cellular genetic algorithm according to claim 4 is characterized in that: When choosing where the ball should go next, consider the following factors: Factor 1: Depending on the relative position relationship between the starting point and the end point in space, the probability of the ball choosing neighbors in different directions in the eight-neighborhood neighborhood of the current cell is also different. When there is an obstacle in the neighborhood, the probability on the obstacle cell is evenly distributed to the remaining non-obstruction cells in proportion; Factor 2: Consider the role of the obst state and pass state in the current cell's neighbors. The neighbor cells whose obst state is 0 and whose pass state is also 0 are valid neighbor cells. Depending on the size of the corresponding direction probability of the valid neighbor cells, the next position loci of the ball is selected, and the next state corresponding to the ball number is updated in the current cell state information, and the corresponding pass state is set to 1. At the same time, the ball with the corresponding number in the auxiliary matrix is ​​deleted from the current Ball(i) and added to Ball(loci); if the current cell number is the end number goal, the ball is equivalent to not moving, and the state value no longer changes; when Ball(goal)=[1,2,3,……,N], the evolution stops; Factor three: Consider the situation where the path generation process encounters a dead end. When a ball in a cell has no valid neighbors, its next state value is set to its current corresponding prev state value, and the pass value corresponding to the path number is set to 1. The current cell is regarded as a special obstacle, so that subsequent paths will no longer re-enter this cell; this process is repeated until the path continues to extend in a feasible direction.

6. The path planning method based on fusion cellular genetic algorithm according to claim 2 is characterized in that: The crossover and mutation evolution rules include: After determining the intersection position of each pair of parents, starting from the starting cell, in the process of pointing to the next cell according to the next state value of the corresponding path until reaching the corresponding intersection position, the cell state cross of the corresponding path in the cells passed in sequence is set to 1; the next state values ​​of the corresponding parents in the cells at the intersection position are swapped, and the cross state position is 1; If the cross state bit of the path number corresponding to the intersection position cell is 1, the evolution rule is: each cell detects the number of its eight-neighborhood neighbor cells with the cross state bit being 1. If the cross state bit of its own corresponding number is 0, the prev and next state values ​​of the path corresponding to the number with cross=1 in the neighbor are swapped, and the cross of its own corresponding number is set to 1.

7. The path planning method based on fusion cellular genetic algorithm according to claim 6 is characterized in that: In the crossover and mutation evolution, each step of evolution makes the information of cross=1 spread one grid in eight directions, and the maximum evolutionary number MAX is set to: MAX=max{m-1,n-1} Among them, max represents the maximum value operation, m and n represent the number of rows and columns of the cell space respectively.

8. The path planning method based on fusion cellular genetic algorithm according to claim 6 is characterized in that: In the crossover and mutation evolution, the mutation operator is a neighborhood mutation operator, which limits the change of the path to the eight-neighborhood type of a single mutation point grid; assuming that cell a is the central cell, if the next state bit of path i on cell a is b, and if the value of the next state bit of neighbor cell i of b still belongs to one of the Moore neighbor cell numbers of cell a, then the next state value of path i of central cell a is set to the next state value of path i of neighbor cell b, so that this path goes directly from cell a to the successor cell of cell b.

9. The path planning method based on fusion cellular genetic algorithm according to claim 6, characterized in that: In the crossover and mutation evolution, cell a is the central cell. The path number is i. If there is a cell that is not passed by path i in the intersection of the eight-neighborhood neighbor set of cell a and the eight-neighborhood neighbor set of cell b pointed to by the next value of path i, a cell c that meets the conditions is randomly selected, so that the next state value of path i of the central cell a is c, the next state value of path i of cell c is b, and the prev flag of path i of cell b is set to c.

10. The path planning method based on fusion cellular genetic algorithm according to claim 1, characterized in that: The population update process includes: The number of offspring individuals produced after crossover and mutation is the same as the number of parents after removing the elite individuals; all path individuals in the two-generation population are sorted according to their fitness, and the individuals with fitness values ​​in the top 50% are selected, together with the elite individuals selected in the selection stage, as the population of the next generation, and the new cellular state matrix is ​​filled in according to the information stored in the cellular state matrix. The subsequent crossover and mutation processes are carried out in the updated cellular state matrix.