I recommend you to see “Fundamentals of Computational Swarm Intelligence” by Andries P. Engelbrecht (PSO and ACO). In the evolutionary area, read “Multi-objective Optimization using Evolutionary Algorithms” by Kalyanmoy Deb. I am reading them and I like so much. These books are well complete, having many pseudocodes.
When I was asking about a text for metaheuristics, the Talbi book was a clear winner. It has a good section on swarm intelligence, but it of course spends much more time on other frameworks.
The book titled "Particle Swarm Optimization" by 'Maurice Clerc' is my suggestion. You can find some useful programming codes regarding PSO in this book.
However, nowadays you can easily find so many useful papers and books about PSO and other meta-heuristic methods on the Internet. Their m-files are available too.
Here is the application of swarm intelligence to American elections.
TechRepublic's 'swarm AI' predicts tight election, gives edge to Clinton!
TechRepublic and Unanimous A.I. conducted a final real-time 'swarm' to determine which candidate will be stronger on economic and technology issues and who will win the US presidency. See the results...
To gauge opinions about the candidates, TechRepublic has teamed up with Unanimous A.I. to conduct three "swarm AI" sessions—in which a group of voters meet up online to make a real-time prediction. The swarm works via an online platform called UNU, which harnesses artificial intelligence to help a group come to a decision together. They gather on individual computers to "pull" a virtual magnet toward an answer—for instance, who will win the male lead at the Oscars?...
Great intro is given online at http://www.scholarpedia.org/Swarm_intelligence. There is an exhaustive list of the literature, among which is alsoa book of prof. Theraulaz.
Swarm Intelligence: Innovation, New Algorithms and Methods
Swarm Intelligence (SI) is one of the most important and challenging paradigms under the umbrella of computational intelligence. It focuses on the research of collective behaviours of a swarm in nature and/or social phenomenon to solve complicated and difficult problems which cannot be handled by traditional approaches...
"Swarm Intelligence Optimization: Algorithms and Applications" by Abhishek Kumar, Pramod Singh Rathore, and Vicente Garcia Diaz. is one of the best books in your request.