In a two-dimensional environment, the traditional ant colony algorithm path planning is prone to problems, such as many turning points, easily falling into a local minimum, and the path is not smooth. To address these problems, a new improved ant colony algorithm is proposed to improve the path optimization performance. First, according to the position of the current grid relative to the start point and the end point, a non-uniform initial pheromone strategy is proposed, so that the closer the dominant grid is, the higher the pheromone concentration is, avoiding blind search by ants and reducing invalid search, and then the introduction of an angular guidance factor to increase the guidance to the end point and to avoid the probability of path zigzagging due to small differences in adjacent grid pheromones, next the pheromone update strategy with a reward and punishment mechanism, the enhancement and decay factors are introduced to adjust the pheromone values adaptively to improve the convergence of the algorithm, final the improved ant colony algorithm and genetic algorithm are fused, and the path is smoothed using the piecewise B-spline curve strategy. The experimental results show that the improved algorithm has greatly improved both the optimization finding ability and the convergence ability.