PSO (Particle Swarm Optimization)is a new optimization technique originating from artificial life and evolutionary computation. The algorithm completes the optimization through following the personal best solution of each particle and the global best value of the whole swarm. To avoids the local minimum problems and to improve convergent speed, a new probability of PSO algorithm was proposed. Different solving methods and test functions have been designed for unconstrained and constrained optimization problems, and to do research for solving multi objective optimization problems with PSO. Numerical experiments have shown the feasibility and effectiveness of the proposed algorithm.