Introduction

Traditional Chinese villages are mostly built spontaneously and without external assistance. The rural residents typically have considerable initiative and decision-making power. They can spontaneously build houses suitable for their own needs according to their family size, income, and other demands. In this type of system, a rural residence is regarded as an organic life form of sorts, and through self-growth, self-organization, self-management, and continuous attempts, it is revised, optimized and coordinated to form an open residential system featuring diversification, harmony without uniformity, and sustainability (Wang et al. 2017). In addition, in China the rural residence is not only a living space, but also a multifunctional space system compatible with life, production and ecology. Therefore, the housing-space demands of rural families are more diverse and complex than those of urban families, and there is considerably heterogeneity arising from differences in the life cycles of different family types and their stages.

In the process of implementing a rural revitalization strategy developed by the Chinese government, the above characteristics of rural housing have not been sufficiently considered by some local architects. In the design process of new villages, architects usually rely on the experience gleaned from urban housing and adopt a conventional, standardized design, ignoring the demands of villagers and their differences and leading to a lack of diversity and excessive monotony in design. In order to implement a rural housing design based on compact footprint, diversity in design and layouts, and low project cost, with high efficiency and quality, it is necessary to address the contradiction between high diversity in design and personalized residential demands. This is the core problem that can be addressed by the scale customization of manufacturing in the so-called Industry 4.0 era. Mass customization cannot only address these challenges in housing design through economies of scale, but also address other issues such as heterogeneous demands and project cost. Therefore, in order to create a better match between demands and design, this paper proposes the method with shape grammar, which can embed a considerable amount of information and thus allow better control of outcomes (Veloso et al. 2018) by establishing a connection and providing a housing design method that takes into account the housing demands of inhabitants and graphic design rules for the northern plain area of China.

Previous Studies on Shape Grammar and Customized Mass Housing Design

Stiny and Gips (1971) invented the concept of shape grammar, and used it for the generative specification of painting and sculpture. Stiny and Mitchell (1978) defined the grammatical rules that constituted Palladio’s architectural style on the basis of his villa plans, and translated them into concrete methods that could be generated with computer programs. A number of different types of shape grammar have been developed to analyze different housing types: bungalows in Buffalo (Downing and Flemming 1981) and Frank Lloyd Wright’s Prairie Houses (Koning and Eizenberg 1981). Ligler and Economou (2018) used shape grammar to analyze the Entelechy I residence, engaged Portman’s architectural philosophy, and constructively assessed his claims of its implicit relationship to his work to date.

Chiou and Krishnamurti (1995) carried out research on the design of folk houses in Taiwan, which was the earliest exploration of the shape grammar of traditional Chinese architecture. Li (2001) used shape grammar to analyze the traditional Chinese architectural language of the Song Dynasty as described in the Yingzao fashi, and took the interaction process between users and grammar into consideration. The existing research indicates that shape grammar is an effective method for analyzing Chinese traditional architectural designs.

The earliest application of customized mass housing design research occurred in the Embryological House experiment led by Lynn (2013). They considered the basic functions, cultural features, and individual demands of users, and carried out non-standard rapid production of industrialized housing through CNC construction technology. Duarte (2001) discussed a customized mass housing design system based on shape grammar during the digital remodel of the Malagueira housing project in Portugal. McLeish (2003), Huang and Krawczyk (2006) and Benros and Duarte (2009) conducted further research on the design systems of customized mass housing. By mimicking the prefabricated component category advertised by Sears Roebuck & Co., a corpus whose rules corresponded to housing components was established to build a digital design model for users to choose from.

Shape grammars have been increasingly used to clarify design rules in the complex requirements of customized mass housing, so as to build a multi-level design corpus. Duarte (2005) defined a discursive grammar for architects, in which programming grammar was utilized to address the relationship between demand and housing form. Kwieciński and Markusiewicz (2018) developed a customized mass housing design tool called ‘Home Planner’, which applied a general grammar analytic based on shape grammar to define meta-design logic, making it possible to generate a common design corpus corresponding to housing-space demands. Veloso et al. (2018) established a layout generation system based on shape grammar to customize apartments on a large scale, with the aim of formulating design rules through two steps: rule definition and shape encoding.

The design of mass customized housing is inseparable from the discussion of housing-space demands. According to Morris and Winter (1975), the main factors in adaptive adjustment for family housing according to demand are housing space, residence duration, construction type, quality of life, and neighborhood location. This finding is also universally applicable in rural China, but the specific forms of housing space demands are different from those of the West. Moreover, there is also a certain regularity between housing-space demand and the process of family formation, development, and disintegration. Sorokin et al. (1931) called this process ‘the family life cycle’. Changes in housing-space demand are linked to key factors including changes in member structure and family economic status due to major events such as weddings, births, departure of adult children from the household, deaths, etc. These family life cycle transitions will influence the family housing-space demand and can be predicted by family life cycle modeling. When housing-space demand to satisfy these transitions is not met, the householders usually decide to change houses or rebuild the house on site (Rossi and Rosenzweig 1955). Therefore, when applying the family life cycle model to analyze housing-space demand, it is necessary to classify and summarize housing-space demand in different life-cycle periods, thereby providing each family with housing products to meet their demands at the moment.

Analysis and Predefinition

Traditional rural housing in the plains of northern China consists of a brick-and-concrete low-rise dwelling of 9–12 m. in length and width. Since the era of economic reforms, rural housing has maintained the traditional courtyard and three-bay architectural form, and has begun to use new building materials and new construction techniques. Rural housing has gradually evolved from single-floor to low-rise (2–3 floors). After 2006, a new form of rural housing for mass industrial production, referred to as well-off housing (a standardized housing type) (Fig. 1) emerged. According to Lampel and Mintzberg (1996), the construction method adopted for well-off housing is usually pure standardization. Although this approach reduces construction costs, it also produces housing that lacks flexibility and is monotonous, which cannot meet the diverse demands of rural residents. In contrast, the design mode proposed in this article is classified as ‘segmented standardization’. We used shape grammar to design different types of serialized room modules for market segments for the purpose of encouraging users to intervene from the supply side and the construction side. In this way, while maintaining low costs, the flexibility of design can also be greatly improved, and the results are more suitable for the current development status of China’s rural residents.

Fig. 1
figure 1

Well-off housing

Since 2015, our team has conducted field investigations in 56 villages in Shandong Province. We chose the typical well-off housing as the starting point, analyzing the design elements with shape grammar. The grammar was defined by three stages of rules: dwelling rules, room rules and transformation rules. The first stage mainly uses the addition strategy to generate a basic layout of the homestead: 1. core housing; 2. north courtyard; 3. south courtyard; 4. termination. The second stage uses the subdivision strategy to generate a classification of room functions: 1. living room, 2. stair, 3. bathroom, 4. kitchen, 5. dining room, 6. bedroom, 7. multi-function room, 8. adjustment. The third stage defined transformation rules to adapt to the residents’ family life cycle demands and industrial demands: 1. layout transformation; 2. Section and elevation transformation. In order to simplify the expression of these rules, the walls are represented by single lines. In the derivation stage of the rules, three-dimensional architectural forms are used to express the changes in residential space and functions. Rules can be defined at the first floor (F1) and second floor (F2). At this time, they are represented by the labels F1 and F2. They can also be defined separately at the F1 or F2. In order to make the customization rules correspond to the industrial module of rural housing (room, part, component, material), all figures in the rules were based on a basic modulus of 300 mm.

Stage 1: Definition of Dwelling Rules

Stage 1.1: Core housing

The main living space of a well-off housing is the core housing, which is usually composed of three or four bays; the function of the room is limited to each bay. This stage defines the initial shape and the generative rules for multiple bays, indicates a label for to each bay, and sets the dimensions of each bay to 5.4 × 3.3 m. The labels i (inside zone) marks the initial inside bay, that is, the bay location of the living room; i′ marks the remaining indoor bays, and o (outside zone) marks the outdoor platform bays on the second floor. The label ▼ indicates positions where rectangular shapes are added. Rules 1–2 introduce the initial shapes of F1 and F2; rules 3–8 add F1 and F2 bays; rules 9–10 define possible second-floor outdoor bays used as a terrace; rule 11 changes labels o into t (terrace); no living room is designed on the second floor, so rule 12 replaces the label i of F2 with i′ (Fig. 2).

Fig. 2
figure 2

Core housing

Stage 1.2: North courtyard

The north courtyard serves lighting and ventilation functions for the north room of the core housing on the first floor. Rule 13 adds a 1.2 m × 3.3 m rectangle on the north side of a core housing bay and marks it as o. Considering that the space on the north side of the roadside homestead is used as an external industrial space, rule 14 adds the label ▼ to the rectangle facing outward, which means this rectangle can be expanded (Fig. 3).

Fig. 3
figure 3

North courtyard

Stage 1.3: South Courtyard

The south courtyard contains an indoor auxiliary room and an outdoor courtyard space. In order to meet lighting demands, rules 15–18 add a rectangular south courtyard adjacent to the core housing. Each rectangle has a size of 3.3 × 3.3 m. and is labeled with either o or i′. Rules 19–23 generate the remaining rectangular south courtyard marked as o or i′ and control its outline. The second floor of the storage space of the south courtyard is usually used as a terrace. Rule 24 replaces the label i′ of F2 with t. Rule 25 combines a bay of F1 core housing with an indoor space in the south courtyard. At this time, the living space in core housing extends to the storage space in the south courtyard. Rule 26 adds a rectangle to the north side of the north courtyard and marks it as i′ (Fig. 4).

Fig. 4
figure 4

South courtyard

Stage 1.3: Termination

In this stage, the spaces in the south courtyard and the north courtyard with the same label are merged, and putative front gate positions are marked. Rules 27–28 merge the rectangles marked with o in the north courtyard and the south courtyard; rules 29–30 merge the rectangles marked in i′ and t in the south courtyard. Meanwhile, rules 31–32 illustrate the front gate, marked g (Fig. 5).

Fig. 5
figure 5

Termination

The derivation of the dwelling-rules in the first stage is shown in Fig. 6. The processes to generate a three-bay room and a four-bay room were selected for expression, and the corresponding changes in space were expressed through the graphical representation of changes in the three-dimensional form following the derivation process of the rule; × n represents the number of times the rule is used.

Fig. 6
figure 6

Derivation of Stage 1

Stage 2: Definition of Room Rules

In the second stage, functions are divided and labels are assigned to each bay of the core housing. Based on surveys of various room sizes in rural residences, the sizes of some of the spaces (living room, dining room, kitchen, bedroom, bathroom, stairs, multi-function room and corridor) are defined first. Meanwhile the corresponding function labels or labels i and i′ are assigned according to the classification of space. Shapes labeled with i or i′ are further subdivided or replaced with functional labels (li, st, ba, ki, di, be, mu, co), and the generation of rules stops when there are no labels i and i′ remaining (Fig. 7).

Fig. 7
figure 7

Labels of rooms

Stage 2.1: Living Room (li)

The living room is located in the bay labeled i in F1. Rule 33 replaces the entire bay as the living room and label i is changed into label li. Rule 34 subdivides a smaller living room with the remaining shape labeled i (Fig. 8).

Fig. 8
figure 8

Living room

Stage 2.2: Stair (st)

The stair run through F1 and F2. The position of the stair in F1 is determined first. Rule 35 regards the label i area in the bay where li is located as a stair (st); rules 36–40 divide different positions of the rectangle into stairs; rule 41 copies the label and shape of the stair of F1 to the corresponding area of F2 (Fig. 9).

Fig. 9
figure 9

Stair

Stage 2.3: Bathroom (ba)

The bathroom is usually set adjacent to the stairs. Rules 42–50 subdivide the bathroom at the adjacent position of the F1 stair; rule 51 copies the label and shape of the F1 bathroom to the corresponding area of F2 (Fig. 10).

Fig. 10
figure 10

Bathroom

Stage 2.4: Kitchen (ki)

The kitchen is always located at the end of the F1 bay, and rules 52–57 control its subdivision (Fig. 11).

Fig. 11
figure 11

Kitchen

tage 2.5: Dining Room (di)

The dining room is usually set adjacent to the kitchen or can be combined with the living room without a separate dining room. Rules 58–61 control the generation of dining room (Fig. 12).

Fig. 12
figure 12

Dining room

Stage 2.6: Bedroom (be)

Rules 62–67 control the subdivision of bedrooms. Bedrooms can be set in both F1 and F2, and the south or north side needs to be used for natural lighting (Fig. 13).

Fig. 13
figure 13

Bedroom

Stage 2.7: Multi-Function Room (mu)

After all of the above functional rooms are divided, the remaining areas of the core housing will be used as multi-function rooms. A multi-function room can be used as an activity room, sun room, tea room, balcony, storage room, study room, etc. Users can customize use with flexibility. Rules 68–70 control the label i′ to be replaced with mu; rule 71 controls the subdivision of i′ areas into multi-function rooms (Fig. 14).

Fig. 14
figure 14

Multi-function room

Stage 2.8: Adjustment for Corridors and Kitchen Ventilation

Stages 2.1 to 2.7 subdivide the basic functional positions, and Stage 2.8 adjusts the corridor and kitchen ventilation. Rules 72–74 subdivide the bathroom corridor and stair corridor; rule 75 meets the opening requirements of the kitchen door; rule 76 meets the ventilation requirement of the kitchen; rule 77 subdivides the kitchen corridor; rules 78–81 subdivide the bedroom corridor; rules 82–85 subdivide multi-function room corridor; finally, connected corridor spaces are merged. For example, rule 86 merges the two rectangles and marks them with the label co (Fig. 15).

Fig. 15
figure 15

Adjustments for corridor and kitchen ventilation

The derivation of room rules in the second stage is shown in Fig. 16. The above-mentioned three-bay plan is selected for rule derivation, and the subdivision of the functional space during the rule derivation process is expressed through the 3-D profile form of each bay (Fig. 16).

Fig. 16
figure 16

Derivation of Stage 2

Stage 3: Definition of Transformation Rules

The rules defined in the third stage correspond to the different stages of the family life cycle and the housing-space demands of different types of rural families.

Basis of Rules

Due to genetic connections and family ties, the life cycle of the Chinese rural family is considerably different from that of the Western family. Their development processes are open and interrelated, reflecting the characteristics of inheritances and continuous development passed on from generation to generation. Mainstream research on China’s rural household life cycle model reveals that these cycles are generally divided into six stages (Xu et al. 2020): Starting period, Rearing period, Burden period, Stable period, Maintenance period and Empty Nest period. Non-core family factors and aging problems are also to be taken into consideration. This classification standard clarifies our understanding of the situation of most rural families.

Chinese rural residents are now classified into five types, including traditional resident, migrant resident, plowland-dissociated resident, endogenous new resident and exogenous new resident. Because their dwelling conditions are investigated in the study of family units, the classification of rural family types follows a similar approach.

Considering the suburban Z village in Shandong as an example, we distributed 203 electronic questionnaires to rural residents on their basic economic situation, current dwelling conditions, and housing-space demands in November–December 2018. According to the survey results, we concluded that two key factors affect rural housing-space demands: the main family industry or the occupation of family members (corresponding to the five types of rural families), and changes in the number of family members (corresponding to the family life cycle). Among them, the type of rural resident has a direct relationship to the layout of houses, and each stage of the life cycle of a rural household can correspond to the size and number of different residences.

Through radar chart analysis, we separately analyzed and graphically expressed the housing-space demands of five types of rural families at various stages. After comprehensive consideration of the data obtained from the survey and related literature, we selected six indicators of rural housing-space demands: bedrooms (number), multi-function rooms (number), auxiliary rooms (number), living room (area), dining room (area), and courtyard (area). These six indicators correspond to each axis of the radar chart. The weights of all indicators are consistent, and their value ranges are 1–5 bedrooms; 1–5 multi-function rooms; 1–8 auxiliary rooms; living room: 10–20 m2; dining room: 0–20 m2; and courtyard: 20–80 m2. The parameters of each index are connected in the radar chart to form a hexagon, and its area is positively correlated with that of the entire housing construction area.

Apart from the difference in dimensions, these indexes affect each other at the same time. Therefore, in order to visually distinguish the housing-space demand characteristics of different rural families at different stages from the radar chart, the data requires standardization to create an equal interval of change. The value interval of each indicator is defined as 0–10. Considering 1–5 bedrooms as an example, one bedroom needs to be set as 2 points, and ≥ 5 bedrooms are set as 10 points. The other five indicators can also be standardized in this way. Thus, we converted them into their corresponding scores of 0–10, which are used to express rural housing-space demands. Therefore, the results of the radar chart analysis are the basis for defining conversion rules (Fig. 17).

Fig. 17
figure 17

Radar maps of housing-space demand

Stage 3.1: Transformation of Layout

In order to expand the living space, rule 87 transforms the second-story terrace into an indoor space. In order to meet the needs of the industry, rules 88–91 control the expansion of auxiliary rooms and the reduction of courtyards. For the sake of meeting the needs of setting up a residence on a four-bay homestead, rules 92–93 divide the courtyard into two smaller homesteads on the left and right. Rule 94 transforms the F2 area corresponding to the auxiliary room of F1 into a terrace. Rules 95–96 recombine the auxiliary rooms, multi-function room, and the north courtyard located on the same side into a single industrial space. For the small dining area included in the living room bay, rule 97 merges it into the living room. Rules 98–116 realize the mutual conversion between bedrooms and multi-function rooms to meet quantitative bedroom requirements in different family life cycles. Rules 117–122 extend a 3.3 m × 0.9 m rectangle to serve as a sun room on the south side to meet the demands of the elderly for sunlight (Fig. 18).

Fig. 18
figure 18

Transformation of layout

Stage 3.2: Transformation of Section and Elevation

Based on the above rules, we defined the rules that control the section and elevation and built a corpus of rules to meet the needs of users for appearance. As shown in Fig. 19, column f is the prototype represented by the 3D shape in the derivation of the mentioned rule. The prototype can be replaced by other corresponding shapes according to space requirements. Labels 12 indicate the type of section corresponding to auxiliary rooms. Roof types include flat and sloped roofs. The shape changes include downsizing, the addition of exterior stairs, the addition of a sun room, etc. Labels 36 depict sections in core housing 1F. Roof types include flat roofs and three types of sloped roofs (according to the location of the ridge). Shape changes include the addition of a sun room, balcony, etc. Labels 79 indicate core housing 2F, where the roof type again includes three types of sloped roofs (according to the location of the ridge), and the shape changes again include the addition of a sun room, balcony, etc. In addition, the preceding 2D rules (Stage 1 & Stage 2) can correspond to a variety of 3D sectional shapes. For example, the south area of a bedroom can be rezoned as a sun room inward, or as a sun room or balcony outward. These adjustments do not affect the basic layout of the room.

Fig. 19
figure 19

Transformation of section and elevation

The derivation of transformation rules in the third stage are shown in Fig. 20 (using a traditional rural family as an example). According to the different variants generated in phases 1 and 2, layout transformation rules are applied to adapt to changes in family life cycles and in industrial demands. At the same time, the appearance changes flexibly after the application of these transformation rules to the section and elevation. The derivation of the other four types of rural families is shown in Fig. 21.

Fig. 20
figure 20

Derivation of traditonal resident family

Fig. 21
figure 21

Derivation of other rural families

Conclusion and Future Work

Our research indicates that shape rules can provide an effective means to match the heterogeneous housing-space demands of inhabitants. However, our current research only focuses on rural housing in the northern plains of China, and there is less research on other additional conditions, such as housing in extreme climates, mountainous areas, waterfront areas, etc.

Based on the above research, we propose a customized mass housing design system as future work (Fig. 22). As the specific housing-space demands of users will be involved in the process, the customized mass housing design system and the corpus of its rules increases in complexity. Moreover, most users are non-professionals. Therefore, the implementation of these rules focuses on simplifying the design process as much as possible to improve user satisfaction.

Fig. 22
figure 22

Schematic process of planning, designing and constructing customized mass housing

In the stage of customized mass housing design, researchers clarify the potential and diversity of housing-space demands; architects on the other hand use shape grammar to formulate dwelling rules and room rules, thereby establishing a corpus of customized mass housing rules. At the same time, it is also necessary to consider the assembly, transportation, and construction of industrial housing modules, and all the defined rules should follow the predefined basic modulus. In addition, to effectively respond to the intervention of demands, each sample in the corpus of rules should be given additional attributes to facilitate the retrieval and recommendation of the design system. There are mainly four types of attributes: layout (not covered in this paper); dwelling; Room-2D; and Room-3D. Regarding the interaction of users and design systems:

  1. (1)

    In the layout, an appropriate location and type of homestead is first selected, followed by input of personal information (housing-space demands) into the system.

  2. (2)

    The system can automatically identify and match information related to family types, family life cycle stages, etc., retrieve it in the corpus, and then recommend a series of housing design plans that can meet certain users’ housing-space demands.

  3. (3)

    If the users are still not satisfied with the recommended solutions, they can choose and adjust the configuration as required.

In the stage of customized mass housing construction, architects first need to optimize the users’ self-configuration solutions, then transfer the determined solution from the design system to the construction system, and finally output the construction blueprints. At the same time, a GUI (graphical user interface) can be used to provide further levels of customization to housing solutions, including decoration style and furniture layout, allowing users a more intuitive understanding of professional housing solutions. With the continuous supplementation and a finer-grained definition of various building elements, a complete and updated list of housing building materials can be generated; this will help to estimate the total cost of housing construction. Because housing solutions are based on modular design, it is suitable for mass standard production and customization of various building components. At an appropriate scale, these modular components can be accommodated by medium-sized trucks.