This study proposes an improved genetic algorithm (GA) to derive solutions for facility layouts that are to have inner walls and passages. The proposed algorithm models the layout of facilities on gene structures. These gene structures consist of a four-segmented chromosome. Improved solutions are produced by employing genetic operations known as selection, crossover, inversion, mutation, and refinement of these genes for successive generations. All relationships between the facilities and passages are represented as an adjacency graph. The shortest path and distance between two facilities is calculated using Dijkstra's algorithm of graph theory. Comparative testing shows that the proposed algorithm performs better than other existing algorithms for the optimal facility layout design. Finally, the proposed algorithm is applied to ship compartment layout problems with the computational results compared with an actual ship compartment layout. Scope and purpose Facility layout problems (FLPs) concerning space layout optimization have been investigated in depth by researchers in many fields, such as industrial engineering, management science, and architecture, and various algorithms have been proposed to solve FLPs. However, these algorithms for the FLP cannot consider inner structure walls and passages within the block plan (or available area). They are also limited to a rectangular boundary shape of the block plan. Therefore, these algorithms could not be directly applied to problems having the curved boundary shape such as ship compartment layout, and an innovative algorithm which can treat such problems is needed. In this study, an improved genetic algorithm (GA) is proposed for solving problems having the inner structure walls and passages within an available area of a curved boundary. A comparative test of the proposed algorithm was performed to evaluate its efficiency. Finally, the proposed algorithm is applied to ship compartment layout problems with the computational results compared with an actual ship compartment layout. From the comparative test and the preliminary applications made to the ship's compartment layout, we demonstrate that the proposed algorithm has the ability to solve the FLPs having the inner structure walls and passages within the available area of the curved boundary.