'In PSO, do you change r1,r2 for each particle during the iteration, or keep them the same during the iteration?

I have seen both versions. I was just wondering if there is a great difference between them. I always thought that r1,r2 are each a random uniform in (0,1) that gets generated for a specific particle's update. It makes sense to me to have more randomness.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source