Introduction

During the last decade, China has achieved rural development by building a new countryside in accordance with the strategic plan of the Central Government (Long et al. 2010). Building a new countryside in an intensive, compact and proven way can contribute to reducing farmland loss and the related rural environmental impacts (Xi et al. 2012). Thus, it becomes one of the driving forces for the new urbanization realization in China. However, its method often involves top-down decisions on new construction that require villagers to abandon their farms and dwellings. The traditional model of embedding self-built and detached low-rise residences within rural residents’ original locations is replaced by the construction of multi-storey high-rise settlements at new locations. Most low-income villagers cannot afford the increased costs of these new residences. According to field research, rural settlements have traditionally been characterised by spontaneity, originality and diversification but have gradually shown a tendency towards urbanisation and homogeneity. About 80–100 Chinese rural settlements per day are on the verge of disappearing. The major reasons for this disappearance are the absence of self-organised local participation, villagers’ inability to express their interests and the creative destruction of rural living environment.

Since the 1950s, large numbers of informal construction actions have occurred in the urban settlements of China, using mini structures to extend yards, construct extra buildings on roofs, enlarge balconies and so on. This reflects the strong instinctive demands from residents for the self-built improvement of their settlements. Compared with urban settlements, rural settlements are not only residential space, but also a multifunctional and complex spatial system integrating living, production and ecology. Moreover, villagers living in community-based rural settlements have even higher demands for self-help construction, planting and breeding and so on, because of their behavioral habits. Therefore, the mechanism of spatial organization in rural settlements should be studied by taking into consideration the process of villagers’ creative construction according to individual experience and demands of them. At present, preliminary achievements have been accumulated in basic research on the planning standards for rural settlements and communities of China (Yang 2012). Some designers attempt to plan the rural settlements by using the theories and methods of urban settlements, resulting in part of the new rural settlements losing the inherent local rural style. This phenomenon is more prominent in the North China Plain. The primary reason is that the rural spatial system of China is complex and composed of many elements and levels, with the interrelations hard to describe with simple principles. Consequently, it is hard to establish correlations between the renovation and creative construction of rural settlements and the previously existing self-built spaces so as to represent the sustainable development of rural settlements. This inability to conceptualize the situation leads to a corresponding inability to guide the evolution of disorderly spontaneous construction behavior into orderly self-built construction in the top-down planning space (Ward 1982).

Fundamentally, optimization of the spatial organization mechanism of rural settlements aims to implement the strategy of coordinating urban and rural development by providing equal residential quality rather than the same forms of settlements in rural and urban areas. Against the background mentioned above and based on previous researches, we established an evolution model of compact settlement in rural China. In this model, matching relationships and open systems are set to facilitate the villagers in integrating behaviors and self-built activities into planning spaces, creating coordinated symbiosis while avoiding other disadvantages. Further, evolution rules of planning space and self-built space are extracted, and a proper computer algorithm is designed for the study on dynamic mechanism of spatial evolution in rural settlements with the method of dynamic self-organization. This approach facilitates the fusion of architecture, computer science and technology. Moreover, it conforms to the developmental tendency of architecture and functions as a useful supplement to theoretical research on rural settlements of China.

Literature Review

Organizational Evolution Mechanism of Human Settlements

As a system theory established and developed in the late 1960s, self-organization theory mainly considers how to understand the evolution of a complex system, consisting of a great many comparatively independent units, from disorder to order and autopoiesis to self-adaptation and self-stabilization (Heylighen 2001). Under a specific system mechanism, this process occurs through information sharing, short-range communication, micro-decision making, parallel operations, integral coordination and iterative optimization. As an important means of pursuing breakthroughs in traditional spatial development, the spatial simulation research represented by self-organization theory is used to quantitatively analyse prototypes and models of complex systems, by means of a series of purposeful, conditional computer simulation experiments, generative design-related modeling methods and appropriately programmed algorithms. It takes an open approach to the dynamic spatio-temporal evolution of spatial self-organization, for the purpose of resisting any conventional form or mode imposed in advance by hetero-organization. Accordingly, the related research based on both self-organization and hetero-organization has been increasingly viewed as a dynamic mechanism of spatial system evolution, and represented as the outer social logic and inner spatial logic of space transition.

With regard to the research on unified will and public participation, sociology emphasizes planning a space with universal rights at the core, replacing the homogenized capitalist space that stresses exchange value with the differentiated socialist space that underlines use value. This approach also aims to rebuild the bottom-up decision-making space and to realize stakeholders’ self-management of social space in a democratic form (Lefebvre 1991). For problems related to rural China, it places emphasis, on the one hand, on issues resulting from the collapse of the rural self-organization system and the loss of self-organizational ability. On the other hand, it points out that self-organizational factors serve as internal driving forces for the construction of New Socialist Countryside (Bray 2013). In research on homogeneous and heterogeneous space, geography holds that there should be some areas whose development runs contrary to and is heterogeneous relative to the dominant logic in each urban system, since the existence of such contrary areas is essential for the sustainability of the dominant logic. Heterogeneous space has a polycentric structure, wherein one can see not only an overall organizational structure reflecting the overarching system at a more local level but also an opposite specification which can help to maintain the stability and development of a city (Shane 2005). Research on top-down and bottom-up urban and rural planning processes has observed that a spatial organization of settlements should comprise an endogenous self-organization that represents the strength of spatial development and system evolution, as well as an exogenous, accessory hetero-organization (Lotto and Popolo 2015). In the research on joint construction and spontaneous construction related to architecture, some cases all embody the mesoscopic and microscopic organizational evolution mechanism of human settlements. These cases are not limited to the vernacular design process of models and adjustments discovered by Amos Rapoport (1969), the self-help strategy advocated by John Turner (1968), the open housing system and supporting technology presented by Habraken (1972), Elemental’s Quinta Monroy in Iquique, Chile, led by Alejandro Aravena (Boano and Perucich 2016), and the post-disaster reconstruction projects led by Ying-Chun Hsieh (Chiu 2015).

Merging top-down planning space with bottom-up self-built space, was first treated as the organizational pattern of settlements and incorporated into a national housing policy in Europe after World War I. To provide housing for large numbers of homeless refugees and demobilized soldiers in a short time, governments built core houses for meeting people’s primary housing needs, while making it possible for residents to enlarge houses in future. Later, this method was mainly adopted by developing countries to provide domestic low-income populations with low-rise, high-density affordable houses, such as in the public low-cost housing policy implemented by Indonesia (Batubara et al. 2002) and South Africa (Napier 1998).

The overwhelming majority of China’s ordinary, traditional rural quadrangles underwent a similar evolutionary process. That is, a core house is first built, including rooms for ancillary facilities, such as production facilities, on villagers’ own homestead, and then the original house is extended by building wing-rooms on both sides in accordance with an increase in the number of family members and other demands. This model gradually became a universally accepted type of village regulation, demonstrating that the traditional driving force for spatial development in rural China has been the real demand of villagers. Such realness contributes not only to the distinctive attribute of each courtyard space, which is known as three in one (production, life and ecology), but also to the overall characteristic scene in the countryside, which is well arranged and well proportioned. However, at present, ordinary villages in some regions have been merged together under the influence of the construction of government-led New Socialist Countryside, pushing most villagers into multi-storey or high-rise community houses in different locations. In this way, the villagers’ residential spatial quality and degree of comfort may improve, but they also lose their land-use rights, including convenient ways of addressing their real needs for cultivation, house building and business. Their behavioral habits, which they have maintained for most of their lives, are also disrupted.

The present situation that self-help construction breaks away from spatial planning and expands compactly without limits in horizontal and vertical spaces is defined as urban informality in the international community (Turner and Fichter 1972). This term has been used to refer to a series of problems related to lifestyle and production patterns in slums, resulting from large-scale migration to the teeming cities of developing countries (Roy 2005). Informal settlements such as slums are often viewed as a synonym for a culture of poverty, typified by dirtiness, noisy disorder and mess (Palmer 1988). However, researches dating back to the Nairobi Conference in 1972 have led more and more scholars to accept the idea of informal space as a logical and canonical organizational system, in the field of informal housing and environmental evolution processes and on the social mechanisms behind them. Informal space offers a new lifestyle that, though simple, is highly efficient and environmentally sustainable (AlSayyad 2004).

Generative Design Approaches

The traditional design flow is composed of idea, design draft, and then programming realization, aiming to represent of the final design form. This approach is often based on single-state design. However, generative design is different, as it makes use of inherent rules defining the forms instead of the design draft defining the overall control, aiding designers in the creation of designs through a systematic rule-based approach. Generative systems are said to precede formation over form, which indicates a fundamental shift from the modeling of a designed object to modeling of the design’s logic (Leach 2009).

Conceptually, generative design approaches mainly include two steps in the application: the definition of rules, and the implementation of rules into software. For the rule definition, typical methods are encoding definition and graphical definition.

Definition of Rules

Encoding definition is based on mathematical logic. It includes the code generation process and translation process. For example, L-system is one of encoding definition system, which has been defined by the Hungarian biologist Aristid Lindenmayer (1968) for cellular evolution and plant growth modeling (Teboul 2011). The core is the natural rules of recursion to generate 3D shapes by the iterative method. Code generation process defines the encoding rules by translation character string for visualization. The initial value can be evolved into simple geometry or complex shape unit and multi-step iteratively generate collective shapes as per the translation rules. Furthermore, to model growing structure such as plants, L-systems are very efficient. Even if they can be modified for representing buildings, such geometries do not fit the L-system spirit perfectly. Buildings do not grow in a natural way, but still demonstrate several layers of partitions. Therefore, other grammar-like frameworks, such as shape grammars, are better fitted for representing them (Teboul 2011).

Moreover, graphical definition is a method of using 2D or 3D graphics as the input source to generate formal outcomes, which features initial graphical rules, form evolution engine and processing rules. For instance, shape grammar is a typical graphical definition language to represent procedural geometry (Teboul 2011) that was first introduced by Stiny and Gips (1972) and later formalized by George Stiny (1980). Under normal conditions, the initial form appears as 2D or 3D graphics. They undergo evolution engine for the realization of geometric evolution, such as size evolution, angle evolution and mirror evolution. Then the design outcomes will quickly come into being through different levels of structure outputs. Additionally, this language may also be used for the analysis and study of forms. The main limitation of shape grammars is the matching and selecting of sub-shapes (Teboul 2011). Since it is difficult to match and select the right sub-shape to proceed, shape grammaris practically of little use in computer graphics. That is why experts have proposed simplifications to deal with the complexity of the shape grammar problem. On one hand, the designeris required to solve difficult technical problems linked to shape recognition and rule application, thus making it difficult to implement shape grammars in the computer. On the other hand, he or she has to rely on intuition to develop parametric systems of designs since there is no clear formalism. Moreover, no rational explanation of the categorization and generation of designs is offered in parametric design. Nevertheless, once a parametric model is devised, it is much easier to implement and apply in the computer. Because of the purposefully devised design system with clear rules set by the architect or the practical goals of the current research, it was decided to develop a parametric model instead of a shape grammar (Benrós et al. 2007).

Implementation of Rules into Software

In addition to the rule definition, next step of generative design approaches relies on their compatibility, combined with a variety of design software, to generate the design results. Python is such an object-oriented computer language and can implement into the CAD System. It fully supports inheritance, overloading, derivation, multiple inheritances and it is beneficial to enhance the reusability of source codes and carries a rich and powerful storage. People often refer to it as a ‘glue language’, since it may easily bond various modules produced by other languages. The CAD systems use Python as an internal scripting language, aimed at defining and manipulating geometry. Automatic derivation of a script from the visual definition of a grammar rule using Python would allow for the potential editing of the rule code by designers for enhanced rule definition and customization, especially for the incorporation of constraints. The primary advantages of using a fundamental programming language such as Python lie in flexibility and extensibility.

Flexibility When using a high-level language or grammar like L-systems and shape grammars, designers are not exposed to all the low-level subtleties. This is a positive property in that it makes those low-level details transparent to the designers and hence allows them focus more on the high-level design. However, at the same time, it inevitably makes the low-level manipulations less flexible. On the other hand, using a fundamental programming language like Python would give an evolution model the flexibility to manipulate all the low-level building blocks of research system, which is needed in designing and experimenting with research system.

Extensibility the design approach of Python with CAD may be further substantiated as a real software package in our future research work. Using a fundamental programming language like Python not only makes the already written code more re-usable, but also guarantees us greater potential in adding new features in future work.

Advantages and Disadvantages of Top-Down Planning space and Bottom-Up Self-Built Space

The advantages of top-down planning space lie in the unified layout, unified designs and unified construction of rural settlements. Such residences show high level of consistency in their types and patterns that fully coordinate with the environment and buildings, making it easy to create a uniform and orderly overall environment and impeccable infrastructure, while the process from design to construction to dwelling only consumes a short time; in China, that process can take less than one year. However, its disadvantages are associated with three aspects. Firstly, it is quite hard to compatibly consider all the residence designs. Without taking into account individual housing design, the result is usually uniform and brutal, as we can see in most new rural settlements of North China Plain nowadays. Secondly, it is likely to overlook the individual inhabitant and differences between inhabitants, categorizing them according to group distinctions (Fig. 1). Thirdly, some villagers who cannot pay off the residence construction charges in a single payment may be reduced to heavy debt for a new house.

Fig. 1
figure 1

New Dadun village built in Oct 2010 in Lingshui, Hainan Province of China. 3480 villagers moved into 1029 new houses, which are almost the same style (Simon 2013)

The advantages of bottom-up self-built space lie in the great initiative and decision-making power possessed by the villagers. They may, according to their family situation, income level, lifestyle, interests etc., build the residences that fit their own housing demands. They build their own homes of the type and style of their choice, thus the residences showcase the uniformity and the diversity (Fig. 2). However, its disadvantages involve three aspects. Firstly, without the planning control, the spontaneous result of detached houses will be chaotic and disturbing. Secondly, it may take long periods for the newly-planned rural settlements to constitute an overall environment, and it is difficult to achieve synchronized development of infrastructure and community. Thirdly, it may cause the villagers to blindly compete with each other in order to highlight their own residences. Additionally, on a technical level, without considering the overall built relationship, concerning the self-built parts, some individual elements may conflict with the others, such as lighting cover and noise interference. In this regard, the challenging and key issues are how to deal with the coherent balance between top-down planning space and bottom-up self-built space.

Fig. 2
figure 2

A traditional settlement in Linzhou, Henan Province of China (Kacper 2013)

Therefore, with regard to the compact patterns appropriate for Chinese rural settlements and based on the premise of intensive land utilization, two requirements must be met. First, centrally planning spaces will not only meet villagers’ basic living demands and address their right to adequate housing, but will also enable villagers to secure a residential space essentially as comfortable as those of urban residents. Second, it must be guaranteed that self-built spaces will have a certain capacity for expansion to meet villagers’ various future demands. Technical guidance should be provided in the self-built process consistent with planning spaces, to plan a sustainable rural settlement at the lowest cost.

Method

The approach to the topic of analysis and simulation in these areas has been based on the coupling of two complementary approaches.

First, in order to analyze the patterns of dwelling construction and growth of general rural settlements in the North China Plain, a deep and continuous field survey was performed in ten typical rural settlements in Shandong Province (Fig. 3). Subsequently, virtual globe software systems such as Google Earth was adopted to locate settlement under researches. In addition, twelve detached houses were randomly selected within each rural settlement to perform abstract analysis for their plots and functional configuration, setup and summarize essential data and related images, which serve as the basis for planning space definition and self-space evolution rules.

Fig. 3
figure 3

General layouts of tenrural settlements in Shandong: 1 Yanlou; 2 Ganquan; 3 Xichexiang; 4 Dongchexiang; 5 Nanqiudun; 6 Xihu; 7 Qingquan; 8 Dongzhang; 9 Donglihu; 10 Zhugongquan

The second approach involved the exploration of computational algorithms for the simulation model, including the study and definition of generative rules. Defining the generative rules of planning space and self-built space for compact rural settlements is the basis for studying the logic of transforming the rural housing’s spatial prototype to an evolutionary model. After defining the rules, we designed suitable algorithms and used Python to turn the rules into computer programs, which were used to simulate the spatial–temporal evolution of planning space and self-built space and monitor the changes of PlotDensity on each plot in real time. Finally, the obtained design scheme with the evolutionary process was uploaded to the CAD software in the form of CAD script automatically created by the computer program, so as to realize visualization and make further improvements.

The resulting method uses a series of computational techniques to create a set of complex relational models of simulation, where the factors of different needs are dynamically related to the spatial form of the compact rural settlements. These models allow for an attempt to define a method of operation to understand, foresee and drive the growth of more sustainable and compact rural settlements.

Analysis and Definition

Survey Results

The size and shapes of plots play an influential role in the definition of dwelling density since they finally determine the amount (size, coverage, floor space ratio and orientation) of buildings that can be built up (Lupala 2002). During our survey, 120 homestead form samples (Fig. 4) which are randomly selected can be mainly classified into three categories: those -shaped with a plot ratio between 0.6 and 0.8 (26%); those □-shaped with a length–width ratio between 0.8 and 1.2 (51%); and those -shaped with a length–width ratio between 1.2 and 1.6 (23%). Meanwhile, after analyzing layout form for residential architectural samples, it was found that the proportion occupied by a shape of is 55%, while 30% for , 12% for and 3% for . Through correlation comparison analysis for the above information, plot ratios of both and □ shapes are found to be more common; especially, they have a large face width. It is more likely for plot shapes with a length–width ratio of approximately to 1 to form a courtyard. However, with regard to -shaped homestead with a small face width and a length–width ratio no less than 1.5, settlement of a shape is laid out; this shape, in a condition of identical area, has an advantage of optimal land utilization, and as a result, people are more inclined to employ it. As a homestead of shape belongs to a narrow and long type, the narrower the plots the more they will fit in a particular cluster pattern which is often pre-defined by urban design regulations. Narrow plots impose design and usually imply very narrow houses and narrow rooms with a housing expansion towards the backyard, especially if minimal setbacks to allow circulation, ventilation, light and rainwater catchment are respected (Acioly and Davidson 1996). Hence, a plot that is narrow along the W–E axis and long along the N–S axis is better able to conform to the spatial structuring pattern of low-rise and high-density settlement.

Fig. 4
figure 4

Shapes of 120 plots

Local Regulation

In accordance with the Technical Guidance on Making Villages’ Construction and Plans in Shandong Province (Trial Version),Footnote 1 floor area ratio (FAR) per household no less than 0.5 and building area per household no more than 250 m2 should be guaranteed in the first place. Secondly, referring to land utilization target corresponding to the plain area, construction in used area per capita should be controlled within a range of no more than 90 m2; regarding plot area and plot density, they are no more than 166 m2 and 70% respectively. Thirdly, it can be ensured that the plot exposure of each homestead should have no less than 2 directions. In the end, the number of floors under control is limited to two, each 2.9 m high; moreover, the coefficient of the local buildings insulation interval is guaranteed to be 1.3.

Planning Space and Self-built Space Definition

Planning space principally comprise plot configuration and characteristics of the homestead, such as size, coverage, floor space ratio and orientation, as well as its programming general plan, road network system, infrastructure including water, electricity and heating, etc. together with the relevant economic and technical norms, etc. In addition, it also consists of the plane, initial form design of a core house, and its relative position to homestead. Structurally, self-built space is light, variable and can be connected with/dismantled from the core house; in terms of its functions, it is divided into residence, production, rental and business according to actual possible demands generated after the admission of villagers.

Space Gridding

In line with the fundamental principle of domestic building design, basic modulus is determined. A rather economical face width of a residence is 3.0 m for bedroom, 1.5 m for kitchen, 1.5 m for bathroom, 4.0 m for the living room and 2.0 m for the indoor stair, etc. Therefore, 1.5 m is selected as the minimum modulus to construct a residential building floor. By taking the possibility of the form of core house, the optimal ratio of homestead and the expansion elasticity of self-built space into an overall consideration, ideal homestead grid system and a core house form (Fig. 5) containing two bedrooms appropriate for a family of three people can be determined after multiple rounds of comparative analysis.

Fig. 5
figure 5

Floor plans of core house

Thus, plot ratio is defined to be 7:10 (10.5:15 m), and plot area to be 157.5 m2. In addition to satisfy basic residential requirements of villagers, a core house plane ratio is determined to be 4:4 (6:6 m) and a grid system should be constituted by 44 homesteads. The self-built space expands within the corresponding plots according to four possible demands (Fig. 6). At any simulation stage, the plane layout formed by core house and self-built space is defined to have a shape of or .

Fig. 6
figure 6

Typical forms of self-built space based on the need for living, rent, producing and business

Coordinate System Establishment

For the convenience of core house measurement and the measurement of relative location of the self-built space in the corresponding homestead, a set of standard coordinate system and a set of temporary coordinate system are required to be established (Fig. 7). Firstly, temporary coordinate (X, Y, Z) on the upper right corner of core house is defined as (0, 0, 0), self-built space expansion under the guidance and control of rules can be located by regarding this coordinate as the reference. Secondly, when the standard coordinate (x, y, z) on the upper right corner of the homestead should be defined, a relative relation should be established between it and the coordinate system of core house. At this time, it should be considered to increase limiters so as to control some staged achievements caused by inappropriate relative relations; in other words, ineffective expansion of self-built space can be reduced.

Fig. 7
figure 7

Diagram of the coordinate system

Evolution Models

In the process of creating a set of evolutionary models of compact rural settlements, simulation rules of both the planning space and the self-built space are studied; besides, programming language Python is then employed to translate them into computer codes. These two strands have been studied in parallel, constantly feeding the results to each other for mutual complementation. The computer program mainly consists of the following functions. UnifiedCons (plot, location, area) output the planning space results using the plot, location and area of the core house as input. SelfCons (plot, constraints) output the self-built space results using the plot and constraints like maximum plot ratio as input. The function of selfCons (plot, constraints) can be further decomposed into several sub-functions, including extending (directions), which is able to perform one-step self-built in the given direction, and checking consistency (constraints), which allows the program to check if any of the specified constraints has been violated.

Initial Simulation of Planning Space

At this stage, four positional relationships (A1, A2, A3 and A4) between the programming general plan for homestead and the core house take shape (Fig. 8). It is defined that homestead and the core house both coincide on their own right-most boundary. Provided that the core house is assumed to be fixed and its distance from upper and lower boundaries of the homestead to be no less than 2 (a special case is that upper boundaries can coincide), the homestead has four possibilities on the direction of Y axis. In addition, the coordinates of its upper right corner are (0, 0, 0), (0, –2, 0), (0, –3, 0) and (0, –4, 0). On the one hand, coordinate systems of the homestead are respectively combined into self-built space simulation results. On the other hands, all results of the self-built space that exceed the range of this homestead are eliminated. In the end, two sets of coordinate systems are unified into a standard coordinate system; it turns out that the coordinate for the upper right corner of the homestead is (0, 0, 0) and four possible coordinates of the core house are (0, 0, 0), (0, 2, 0), (0, 3, 0) and (0, 4, 0) separately.

Fig. 8
figure 8

Core house’s four kinds of positional relationship

In order to simplify the evolution model, only a plane of one specification is defined by core house. However, considering that monotonous group relations may occur after the completion of planning space, the core house is designed with two facades (Fig. 9). Their differences lie in whether their gable roofs extend to the left for 3 grid cells to form empty space or not. During evolution, two forms of core house occur at a random ratio to facilitate readability of the simulation results of any planning space.

Fig. 9
figure 9

Two forms of core house and its two facades

We define the simulation of planning space with the following code:

figure a

Self-Built Space Expansion Simulation

Simulation rules for the self-built space to expand along the x- and y-axes are defined. At the time of expansion southward, \(0 \le x\left( { y} \right) \le 3\) and \(x\left( y \right) \ne 1,\;Z \le 2\) should be all satisfied simultaneously. In comparison, for expansion northward, \(0 \le x \le 7, \;0 \le y \le 3\) and \(x(y) \ne 1, Z \le 2\) are all guaranteed. During this phase, all possible expansions of the self-built space should be fulfilled centering on the fixed core house and it is temporarily assumed that considerations are not given to constraints from the homestead. This can be defined as:

figure b

Left Horizontal Expansion of Self-built Space

Self-built spaces formed in this stage are defined to be B1 and B2 respectively (Fig. 10). Considering influences from village regulation and agreement of local dwellings and sun exposure, before longitudinal expansion of the self-built space, it should expand horizontally along the direction of x-axis to the left for 2 or 3 grid cells in the first place, together with 1 ≤ z ≤ 2, to extend the developed surface southward of core house. Moreover, residential volume at such a state should give rise to absolute control in the planning space. During expansion, the roof form is randomly defined as double pitch roof or flat roof.

Fig. 10
figure 10

The diagram of B1 and B2

The above can be defined as:

figure c

Southward Longitudinal Expansion of Self-built Space

Self-built spaces formed in this stage are defined as C1, C1a and C1b respectively (Fig. 11). Taking B2 as the reference and considering factors such as lighting, sun exposure and ventilation, etc. of southward rooms in the core house, the expansion width along the x-axis of the self-built space southward close to the core house is defined to be no more than 3, with x ≠ 1. Under such a circumstance, three cases are included:

Fig. 11
figure 11

The diagram of C1, C1a and C1b

  1. 1.

    The lower left corner of B2 is treated as the fixed point for upper left corner of C1, it expands 2–3 grid cells along the x-axis and 2–4 grid cells on the direction of the y-axis, so as to form a rectangular self-built space.

  2. 2.

    If the lower right corner of B2 is treated as the fixed point for upper right corner of C1, it expands 2–3 grid cells along the x-axis and 2–4 grid cells along the y-axis, so as to form a rectangular self-built space.

  3. 3.

    In the case that lower left and right corners of B2 are deemed as upper left and right corners of self-built space C1a and C1b, it expands 2 grid cells along the x-axis and 2–4 grid cells along the y-axis, so as to form a rectangular self-built space. Similarly, the typical self-built space of B1 can be obtained in accordance with the above principles.

The above can be defined as:

figure d

Northward Longitudinal Expansion of Self-built Space

Self-built space formed in this stage is defined as C2, C2a and C2b respectively (Fig. 12). Taking B1 as the reference and considering that reserve voids on the core house plane is designed on a position of X = 2 (for the convenience of indoor relation implementation with the self-built space), the position of C2 is realized based on left upward expansion of upper right core B1 which serves as the lower right corner of C2. Along the x-axis, C2 expands by 2–7 grid cells and 2–3 grid cells along the y-axis. At this moment, the self-built space is allowed to expand simultaneously on left and right sides of the x-axis on the premise of no less than 3 and x ≠ 1. Similarly, the typical self-built space of B2 can be achieved according to above rules; the corresponding difference with B1 lies in the fact that when positioning of C2 is performed by regarding the upper left corner of B2 as its lower right corner, the maximum expansion length along the x-axis to the left is 6.

Fig. 12
figure 12

The diagram of C2, C2a and C2b

The above can be defined as:

figure e

Longitudinal Expansion of Self-built Space in a Form of Detached Body

Detached body refers to self-built space which shares no boundaries with core house with a mutual distance no less than 1 cell (Fig. 13). As for the definition of detached body, one of the major reasons is that, due to possibilities of self-built spaces serving as production functions such as aquaculture and plantation, their influences on the core house should be reduced to the greatest extent and an appropriate distance should be maintained from it. Under a condition of no uniform limiters, there are three cases related to the detached body:

Fig. 13
figure 13

The diagram of D2a1, D2a2, D2b1 and D2b2

  1. 1.

    The detached body occurs on a location on the north of B with a distance of 2 grid cells; its width along the y-axis is 2, and along the x-axis is 2–7 (D1).

  2. 2.

    The detached body occurs on a location southern of B with a distance of 2 grid cells; its width along the y-axis is 2 or 4, and along the x-axis is 2–7 (D2a1, D2a2).

  3. 3.

    When D2b1 and D2b2 exist independently or simultaneously, the expansion should be guaranteed to start from X = 0 or X = 7 with a mutual distance no less than 2 cells.

This part of the definition of the rules is similar to southward and northward longitudinal expansion of self-built space.

Constraints of Lighting Standard

According to simulation results generated by the above two-stage processes, limitations for lighting coefficients are increased to obtain the final simulation results. According to the Guidance (see note 1), a house shall consist of at least one living room or bedroom that meets the standard of 2-h day lighting on the Great Cold Day (the 24th solar term), and local buildings’ insulation interval is 1.3. Considering the fact that the simulation of spatio-temporal evolution is multi-stage, this standard is only applied in two stages:

  1. 1.

    The stage of planning space, in which the south core house is expected not to shadow the south-facing rooms of north core house (Fig. 14a).

    Fig. 14
    figure 14

    The diagram of constraints of the day lighting standard

  2. 2.

    The initial stage of self-built space, in which the self-built space on the south plot is expected not to shadow the north core house (Fig. 14b). There is an exceptional circumstance where, if the core house is shadowed by the self-built space on the same plot, the south self-built space’s influence on the core house on the north plot can be omitted.

This can be defined as:

figure f

Discussions

Through virtual constructions (Fig. 15a) and the creation of simulation rules as well as the design of appropriate computerized algorithms, programming language Python is adopted to write computer programs and the codes are utilized to complete inputs of initialization information and rules relevant to the base. Subsequently, plot density is deemed as the key data for staged control during spatio-temporal evolution so that spatial data automatically generated by programs can be output to CAD in a form of CAD script. Then, any result that conforms to plot density standard is selected randomly to carry out design researches on adaptability generation of living space by virtue of computer-assisted design. Moreover, both the scientificity and the feasibility of the evolution model are probed into.

Fig. 15
figure 15

The phase of spatial evolution and visualization based on plot density

Phase 1 This phase refers to generation of the planning space for the core house (Fig. 15b). The planned core house is designed to meet most basic needs for production and living of the general household. In this phase the plot density is 22.9%, and the FAR is close to 0.5, which indicated that the housings are in a loose state, and there is great space for them to extend.

Phase 2 This is a phase in which self-built space starts to grow. When the self-built space is directed to concentrate on the left side of the core house, the plot density and the FAR rise to 37.7% and 0.7 respectively (Fig. 15c). After that, the self-built space will be randomly carried out, with the above generation rules followed to form the x-shaped patterns. The plot densities of the two patterns are 40% (Fig. 15d) and 50% (Fig. 15e) respectively and spatial changes are distinguished by the difference.

Phase 3 Due to limitations imposed by the previously generated rules, simulation results indicate that the gross plot density of a residential area can be up to a maximum of 62.4% (Fig. 15f), which still satisfies the condition of no more than 70%. At this stage, villagers’ various needs for living, such as doing business and producing could be almost met, so that the expansion of self-built space nearly ceases.

In this evolution model, the interrelation of planning space and self-built space show co-symbiotic features. The definition of planning space keeps to the principles of compact land use, infrastructure standard enhancement and simulation convenience, and is combined with local regulation and field survey results, with its main contents including: to set plots of the regulated quantity, to finish the design of core house, and to make their planes suitable for the same minimum modulus. The definition of self-built space is given four kinds of properties in accordance with villagers’ demands. In addition, the relative locations of the plane and core house of every space type are all suitable for the pre-set modulus in its growing process. To avoid the rigidity of planning space and obtain multiple planning schemes before the involvement of self-built space, the locations of core houses in plot are primarily offered four appropriate variables. This definition almost excludes some of the schemes brought by unfavorable locations of core houses resulting in hard development of self-built space. In co-evolution process, the development beginning of each self-built space is the leftward horizontal expanding of its core house along the x-axis. This definition aims to extend the southward-developed surface of each core house. Besides, the developed self-built space can be also connected with the core house to meet villagers’ living demands, and can be divided privately and publicly from core house to meet villagers’ living, business and rental demands. The dynamical effects of self-built space on planning space also reflects the fact that all of its motions take the location of core house as the base point, and the space self-organizational development at each stage should have: efficiency—taking full use of its plot; fairness—hardly affecting other users’ life; restraint—monitoring with plot density.

The relative location of the core house within the plot and the southward and northward extension rule of self-built space are two key variables in the evolution model, making settlement planning and the simulation results of residence units random, diversified and periodical. At the level of theoretical study, the potential advantage of the residence model lies in providing a suitable open system meeting the living and production demands for RS transformation in China. For a single residence, it can change, grow and have metabolism; for multiple residences with close space properties, they share growing logic, and show similar but not identical features. At the level of practical study, it can provide basis for the feasible practice of China new compact rural settlements under the synergetic driving of planning space and self-built space. When the co-evolution model is used in practice, the residential organization relationship of any homestead chosen from simulation results is feasible (Fig. 16). Further, since the development stages under different restraints can all be clearly presented, there are roles for designers, villagers and community administrators. Specifically, designers not only accomplish uniformly established planning space, but also offer villagers technical advisory service for their self-built construction, and diversified and easily operated extension units for options. Villagers can refer to urban standard designed residence improvements with basic service facilities, and can conduct self-built space construction with certain goals and options under the guidance of designers in accordance with their own demands and economic situations. Community administrators will more often monitor the interactive cooperation between villagers and designers, and control unregulated construction behaviors in the self-built process.

Fig. 16
figure 16figure 16

A residential organization relationship of any homestead chosen from generative results

With regard to the design approach, such a method of adopting computational simulations to study residential space is clearly able to analyze the possibility of self-built space generation and the diversity of the overall scene of planning space based on the scale of single homestead and settlement scale respectively. In addition, it can provide guidance for staged generation design of such sustainable rural settlements. Furthermore, the approach of Python with CAD ensures to make our future research work more scaleable. In real-world applications, we may want to deal with areas consisting of tens of thousands of homesteads, instead of dozens of homesteads as the illustrative case shown in this essay. Although the same simulation can be applied to the scenario of big data, regardless of whether we use a fundamental programming language or a tool with high-level grammar, a fundamental programming language like Python will run much faster than a tool with high-level grammar, hence be more suitable for large-scale simulation scenarios in real applications.

Conclusions

We have defined simulation rules for planning and construction pattern applicable to compact rural settlements in the North China Plain, studying the effective generative approach of merging ‘top-down planning space’ with ‘bottom-up self-built space’ in an evolution model. In other words, in order to redefine the self-built space in traditional rural settlements, it is shaped into the core element and power engine for the transformation of rural settlements in China, to create an evolution model with coupling planning space and centering on the self-built space. In terms of the generative approach, it adopts Python with CAD and combines with definable logic and technical conditions (e.g., lighting, cultivation and plantation) to do modelling output and generative design results. In the meantime, relevant rural policies and regulations, such as density control and diversified demands of villagers, could be input as per coding requirements at any time to control and satisfy the requirements on overall volume and construction of evolution model in an effective way. So a self-built space generation system based on planning space constructed, but operational-oriented integration model and design approaches also come into being. As a result, an open adaptive system and a micro mechanism, which have the capability to accommodate living and production demands, are all explored for rural settlement transformation in China. We have also provided ideas about solutions and improvements for imperfect planning policies of rural construction in China, and call on the government and designers to collectively formulate organic and reasonable planning policies in new compact rural settlements. We call for more emphasis on the construction rights and the traditional rural courtyard economy, rural features formed by each courtyard and real demands of villagers while getting along with the nature. All above represent the ecological wisdom of Chinese civilization and key elements of unity and diversity of rural cultural landscapes in China. Therefore, the creation of the evolution model is designed to be able to integrate top-down planning space and bottom-up self-built space separately driven by government and villagers. It could lead to the definition of an innovative method of planning of compact rural settlements, where the possibility of independent extension produced by villagers is normatively guided, but it is inserted in a complex system of feedbacks with planning space, which become able to drive the diversified growth of compact rural settlements.

In general, the vast majority of design methods or models exist on the basis of certain social issues or regional issues. The evolution model of compact rural settlements in China mentioned herein is a theoretical prototype study based on existing problems requiring urgent improvements in planning and construction of China. The prototype focuses on explanation and discussion of design methods. In addition to that, we will take the transformation from evolution model to enforceable and applicable programs into consideration, show the extension rules of self-built space by prefabricated modules and discuss the structure connection between prefabricated modules and core house. However, this study is limited by evolution model, which only consider spatial extension rather than dismantle of self-built space. Consequently, when the density of such an evolution model reaches its peak value, it enters a state of instability, in which another minor dismantlement and slight expansion coexistence interval is required. Hence, we suggest this approach for future research.