This paper presents a novel system of evaluating the block quality in order to obtain the optimal block. Two algorithms for an automatic optimal block decomposition for complex geometries with arbitrary profiles based on genetic algorithm theory are proposed. One is serial optimization, which decomposes the domain according to a certain sequence. The other is global optimization, performed by optimizing all blocks simultaneously. The results will be demonstrated with an example of the basin of a turbine blade to indicate that two proposed optimization algorithms are capable of decomposing complex domains into a series of optimal structured blocks automatically in a matter of seconds. Compared to some commercial programs, the two optimization approaches not only significantly alleviate the difficulties of decomposing those domains, but also ensure the generated meshes with high quality. The quality among the blocks divided by serial optimization algorithm has a wider range. However, the global optimization algorithm can more efficiently give a decomposition scheme, in which the blocks have more even qualities.