The inertia weight is an important parameter of the particle swarm optimization(PSO), which can improve the algorithm’s performance through balance the global search ability and the local search ability. Therefore, an algorithm based on PSO based on reinforcement learning(RPSO) is proposed, in which several different adjusting methods on inertia weight are used and each is mapped into an action. For considering multi-step evolutionary performance, reinforcement learning method is introduced. According to the calculated ?? value, each particle selects the optimal evolutionary strategy, and then changes the inertia weight dynamically. The experimental results show that RPSO is better than the existing algorithms, especially for multimodal function.