Abstract. A challenging problem of Civil Engineering is the protection of buildings against dynamic loads and earthquake impacts. The advanced solutions employ lightweight structures equipped with special damping devices. These devices can be active or passive and their application depends on the investments for the project. The active devices change their properties depending on the structural response and they are the most expensive ones. On the other hand, passive devices are essentially cheaper and, in many cases, require minimal costs of installation and maintenance. Last decades, passive friction dampers are widely used for the earthquake protection of multi-storey buildings. The friction dampers make use of the effect of solid friction to dissipate the mechanical energy and to reduce the amplitude of the vibration of the structure. The friction is developed between two solid bodies sliding in relation to one another. As usual, pairs of metal, polymer or concrete components can be utilized. Determination of the optimal location of the friction dampers inside the building presents a complicated task for the practical design. In this paper, a new approach is developed basing on the method of particle swarm optimization (PSO). The PSO method presents an artificial simulation of the phenomenon of collective intelligence, which is observed in many decentralized biological systems like ant colonies, bee swarms, flocks of birds and even social groups of human individuals. As an illustrative example, the 2D model of a ten-storey concrete frame building is considered. The purpose of the analysis is to minimize the objective function, which is the amplitude of the displacements of the top of the structure in a case of the resonance dynamic load with a frequency of the first normal mode. Non-stationary dynamic analysis is performed by the finite elements method using the program package «LIRA-SAPR» and its module «Dynamic-plus». The software implementation of the PSO procedure is developed using the open-source computer algebra system «Maxima». The optimal placement of friction dampers is determined providing the minimal displacements of the frame. The developed approach can be further extended to various problems of the optimal design of buildings and structures.