| To apply the thermal comfort into the optimization of building arrangement, a variables design method based on Kmeans clustering was proposed. Then, it was combined with numerical simulation, genetic algorithm and universal thermal climate index(UTCI) to implement the building arrangement optimization on Matlab. Finally, the building arrangements with centralized type, decentralized type and edge flow type water displacement were optimized respectively. The results showed that after optimizing, a reduction of 0.1~0.6°C of UTCI was observed. It is alsoconcluded that in the moderate heat stress, the increasing of wind speed is the key of thermal comfort improvement.