This paper proposes an automatic layout method for high-rise residential buildings based on deep deterministic policy gradient descent, combining deep reinforcement learning techniques. Building regulations such as land use boundaries, sunlight requirements, and building spacing—which are key considerations in residential area layout—are extracted and formulated into computer-understandable rules. Multiple constraints and optimization objectives are unified within a single framework. Subsequently, based on the actual scenario, the state space, action space, and reward function are designed to perform automatic optimization of building layout. To efficiently generate optimal layout schemes for residential areas, a generation process based on conditional generative adversarial networks (CGAN) is designed to generate building functional zoning schemes and conduct validation and evaluation. The results indicate that the automatically generated urban spatial building layout design diagrams under this algorithm comply with regulations. Furthermore, this study found that as the amount of data increases, the number of times the model achieves optimal training results decreases significantly. For example, when the data volume is 800, the number of training iterations required for the model to achieve optimal results is reduced by over 50% compared to when the data volume is 200, and the accuracy of the discriminator is also higher and more stable under these conditions. This indicates that the building layout schemes designed in this study meet planning requirements and provide an efficient and intelligent solution for urban spatial planning.