The basic tool in the analytic hierarchy process (AHP) is the complete judgment matrix. To address the weakness of the AHP in determining weight in the comprehensive evaluation system, the particle swarm optimization (PSO)-AHP model proposed in this paper is based on the PSO in the meta-heuristic algorithm. The model was used to solve the indicator weights in the evaluation system of AI education in primary and secondary schools in Fujian Province and was compared with the genetic algorithm and war strategy optimization algorithm. From the comparison results, the PSO-AHP optimization is more effective among the three algorithms, and the indicator consistency can be improved by about 30%. They are both effective in solving the problem that once the judgment matrix is given in the AHP, the weights and indicator consistency cannot be improved. Finally, the results were tested by Friedman statistics to prove the viability of the proposed algorithm.