This paper proposes a hybrid optimization algorithm that fuses multiple methods to address the weak global exploration ability, frequent local optima, and poor engineering adaptability in masonry layout optimization of building infill walls. The method builds a multilayer cooperative framework. It first uses the Genetic Algorithm to create a diverse population. It then applies Simulated Annealing to perform probabilistic jumping optimization. After that, it introduces sparse A search to verify topological feasibility. It finally relies on a cooperative mechanism of Adaptive Whale Optimization and iterative local search to explore the solution space in depth. Experiments on the simultaneous localization and mapping–building information modeling coupled dataset and the building information modeling component multimodal dataset show that the algorithm reaches a standard block utilization rate of 98.76 percent. It also keeps the cutting loss rate as low as 2.79%and achieves a peak stagger-joint compliance rate of 97.11%. In irregular wall scenarios, it reduces cost by up to 33.87%. The results show that this algorithm improves the optimization quality and engineering applicability of masonry layout and provides reliable technical support for precise construction and efficient material use of building infill walls.