During earthquakes, adjacent structures may collide to each other because of insufficient seismic gap. By using tuned mass dampers (TMD), the sway of adjacent buildings be reduced and pounding of structures is prevented. In this case, TMDs must be tuned according to the properties of adjacent structures in order to reduce seismic gap (maximum difference of displacements). Also, adjacent structures with equal properties may collide because live-loads on structures is not constant. Change of live-load affects seismic behavior of structures. In this paper, TMDs for adjacent structures with equal properties are optimized by using harmony search algorithm. The approach is effective to reduce the value of seismic gap needed for protection of structures.