With the continuous development of intelligent algorithms, new algorithms emerge one after another, each has its own advantages and disadvantages. At the same time, the performance comparison of different algorithms has become an important work to test the algorithm. In this paper, the problem of travel agent (TSP) is studied by using the visualization and operability of GUI in MATLAB. The simulation of the interface of adjustable parameters is carried out for ant colony algorithm and particle swarm algorithm respectively. Through the running program, it can be concluded that ant colony algorithm has positive feedback of pheromone, particle swarm optimization has fast and global convergence, and the advantages of both can be complementary.