CN114491772A - Household layout generation method and device - Google Patents

Household layout generation method and device Download PDF

Info

Publication number
CN114491772A
CN114491772A CN202210290430.6A CN202210290430A CN114491772A CN 114491772 A CN114491772 A CN 114491772A CN 202210290430 A CN202210290430 A CN 202210290430A CN 114491772 A CN114491772 A CN 114491772A
Authority
CN
China
Prior art keywords
room
information
deployed
rooms
house type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210290430.6A
Other languages
Chinese (zh)
Other versions
CN114491772B (en
Inventor
刘念雄
闫树睿
苏航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN202210290430.6A priority Critical patent/CN114491772B/en
Publication of CN114491772A publication Critical patent/CN114491772A/en
Application granted granted Critical
Publication of CN114491772B publication Critical patent/CN114491772B/en
Priority to US18/158,375 priority patent/US20230306165A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/06Multi-objective optimisation, e.g. Pareto optimisation using simulated annealing [SA], ant colony algorithms or genetic algorithms [GA]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Architecture (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a house type layout generation method and device. The method comprises the following steps: acquiring a current house type state; room information of one or more rooms to be deployed is obtained through a particle swarm algorithm, wherein the room information comprises the length and the width of the room; each particle in the particle swarm represents size information of a room to be deployed; performing multiple Monte Carlo tree searches according to the room information to obtain coordinate information of the one or more rooms to be deployed; comprehensively scoring the room information and the coordinate information through an evaluation function to obtain a scoring result; and calculating the rated times, and deploying the one or more rooms to be deployed according to the highest scoring result in the scoring results. By the method provided by the invention, the quality of the generated result can be ensured, diversified design conditions can be met, the calculation time is saved, and the efficiency is greatly improved.

Description

Household layout generation method and device
Technical Field
The invention relates to the technical field of intelligent design, in particular to a house type layout generation method and device.
Background
House design is a relatively professional and complex task, and usually requires a designer to receive years of design training and a certain accumulation of experience, and a floor layout design needs to be performed by combining self professional knowledge and design experience. During the design process, the designer needs to manually draw the room areas, such as the shape and position relationship of the areas of a restaurant, a living room, a bedroom, a toilet and the like in a house-type map, so that a method is needed to assist the designer or non-professional person in the automatic house-type room arrangement.
In recent years, many studies have been made to generate a residential dwelling plane through a generative countermeasure network in deep learning. Generative confrontation networks were proposed by Goodfellow in 2014. In 2017 Isola P et al proposed pixel2 pixels, and GAN was used to create building facades. Huang et al used GAN to generate flat pictures of residential housing in 2018. Subsequently, Nautata N et al propose House GAN and House GAN + +, and generate a House type layout with the room relationship "graph" as the generation condition.
The GAN is mainly structured by two neural networks, a generator network (generator) and a discriminant network (discriminator). The generation network is responsible for generating target data, and the discrimination network is responsible for distinguishing the generated data from the real data. The training process is to enable the generation network and the discrimination network to play games, the optimization goal of the generation network is to enable the generation data distribution to approach the real data distribution continuously, and the optimization goal of the discrimination network is to distinguish the generation data from the real data to the maximum extent. Due to the existence of the discrimination model, the generated network can well learn to approach to the real data distribution on the premise of no large amount of prior knowledge, and finally the generated result achieves the effect of being false or spurious.
However, training of the generative confrontation network often requires a large amount of data, and under the condition of limited data quantity, the generalization capability of the model is often influenced. Meanwhile, the model learns the characteristics of the data, so that the quality of the data determines the training effect of the model to some extent. For residential dwellings, training based solely on these dwellings can affect the quality of the results generated, since the dwellings themselves on the market have a good or bad score. Meanwhile, because the requirements of different regions on the house design are different, the relevant design specifications can be changed along with the change of the times, and the model trained based on specific data is difficult to adapt to the differences and changes.
Therefore, a new method is needed to explore a reasonable residential layout by computer aided designers or non-professionals for automated residential room layout.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for generating a house layout.
In a first aspect, the present application provides a house layout generating method, including:
acquiring a current house type state;
room information of one or more rooms to be deployed is obtained through a particle swarm algorithm, wherein the room information comprises the length and the width of the room; each particle in the particle swarm represents size information of a room to be deployed;
performing multiple Monte Carlo tree searches according to the room information to obtain coordinate information of the one or more rooms to be deployed;
comprehensively scoring the room information and the coordinate information through an evaluation function to obtain a scoring result;
and calculating the rated times, and deploying the one or more rooms to be deployed according to the highest scoring result in the scoring results.
Preferably, the acquiring the current house type state includes:
obtaining design conditions of the house type, wherein the design conditions comprise the boundary range of the house type, the position of a main entrance, a lighting surface and adjacent building information, and determining the current house type state according to the design conditions.
Preferably, the room information further includes spatial information between rooms, the spatial information between the rooms including: and adjacent, separated and intersected, and representing the spatial information between the rooms through a room adjacency matrix.
Preferably, the house type state is expressed in a form of a matrix, which is
Figure BDA0003561625110000031
The method comprises the steps of acquiring a house type condition matrix, acquiring a house type design boundary, acquiring a long size information and a wide size information, wherein env represents the house type condition matrix, e represents the house type design boundary, x represents an x-axis coordinate, y represents a y-axis coordinate, w represents a long size information, and d represents a wide size information.
Preferably, the acquiring, by a particle swarm algorithm, room information of one or more rooms to be deployed includes:
obtaining different sizes of the room through continuous iteration of the particle positions, wherein the j-th particle position is calculated through the following formula
Figure BDA0003561625110000032
Where x denotes the position of the particle, ω denotes the inertia factor, v denotes the velocity of the particle, c1,c2Characterizing the learning factor, rand characterizing random numbers subject to [0,1) uniform distribution,
Figure BDA0003561625110000033
characterizing the historical best position, gbest, of particle i at the j-th calculationiThe global optimal position of the particle i at the j-th calculation is characterized.
Preferably, the performing the plurality of monte carlo tree searches according to the room information includes:
constructing a current search graph according to the current house type state, wherein a node of each search graph represents a deployment condition of a room to be deployed;
and determining room information of a current room to be deployed in the one or more rooms to be deployed, and performing operation on the current search graph for a plurality of times through Monte Carlo tree search to obtain a search result, wherein the search result comprises an optimal node of the current search graph.
Preferably, each of the operations performed on the current search graph by the monte carlo tree search includes:
selecting a node as a root node according to a current search graph, and expanding the root node based on the root node to obtain a plurality of first child nodes;
screening the plurality of first sub-nodes by a pruning method to obtain a plurality of second sub-nodes, wherein the second sub-nodes represent actual expandable nodes after pruning;
performing random search based on the second child node, and evaluating a result obtained after the random search through an evaluation function;
and updating the weight of the relative node in the search graph according to the evaluation function score, wherein the optimal node is the node with the maximum weight.
In a second aspect, the present application provides a house layout generating apparatus, including:
the first acquisition module is used for acquiring the current house type state;
the second acquisition module is used for acquiring room information of one or more rooms to be deployed through a particle swarm algorithm, wherein the room information comprises the length and the width of the room; each particle in the particle swarm represents size information of a room to be deployed;
the third acquisition module is used for carrying out multiple Monte Carlo tree searches according to the room information to obtain the coordinate information of the one or more rooms to be deployed;
the evaluation module is used for carrying out comprehensive scoring on the room information and the coordinate information through an evaluation function to obtain a scoring result;
and the deployment module is used for calculating the rated times and deploying the one or more rooms to be deployed according to the highest scoring result in the scoring results.
In a third aspect, the present application provides a computing device comprising a processor and a memory, wherein the memory has stored therein computer program instructions, which when executed by the processor, perform the method according to any of the embodiments of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium comprising computer-readable instructions which, when read and executed by a computer, cause the computer to perform the method according to any of the embodiments of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of the technical solution provided in the embodiment of the present application;
fig. 2 is a schematic diagram of a house type generation process provided in an embodiment of the present application;
fig. 3 is a schematic flow chart of a house layout generation method according to an embodiment of the present application;
fig. 4 is a schematic step diagram of a house layout generation method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a house-type vectorization method provided in an embodiment of the present application;
FIG. 6 is a schematic view of a house type disassembly according to an embodiment of the present disclosure;
FIG. 7 is a schematic representation of spatial relationship of house types according to an embodiment of the present application;
fig. 8 is a schematic diagram of a house layout generating apparatus according to an embodiment of the present application;
fig. 9 shows a schematic structural diagram of a computer device provided in an embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic view of an application scenario of the technical solution provided in the embodiment of the present application. As shown in figure 1, by the technical scheme of the application, the buildings can be reasonably arranged on a house type plan of the existing buildings. In the present application, the description will be given mainly taking the layout of a house as an example. It will be appreciated that the dwelling may equally be replaced with other spatial arrangements in various possible business scenarios, such as cargo placement, city design, interior design, strategy games, etc.
Fig. 2 is a schematic diagram of a house type generation process provided by an embodiment of the present application, and as shown in fig. 2, under an environmental condition of a given house type, rooms to be deployed in a room are combined in an ideal manner. As can be seen from fig. 2, the method of the present application employs a Particle Swarm Optimization (PSO) and a Monte-Carlo Tree Search (MCTS).
PSO is a biomimetic algorithm that simulates the birds in a flock of birds by means of particles. In the combinatorial optimization problem, different combinations between variables are treated as individual particles, which have two properties: speed and position. In the iteration process, the particles update the position information of the next step according to the speed of the particles. And each particle independently searches an optimal solution in a search space and records the optimal solution as a current individual extreme value, the individual extreme value is shared with other particles in the whole particle swarm, a current global extreme value can be obtained through comparison, and the speed and the position of each particle in the particle swarm are adjusted according to the current individual extreme value found by each particle and the current global extreme value shared by the whole particle swarm. And finally, continuously iterating to realize optimization of variable combinations. The PSO algorithm has the characteristics of simplicity, convergence rate block and capability of parallel computation.
The monte carlo tree search is used to solve the optimal decision problem. Through the Monte Carlo tree search, the optimal decision of the room placement position and size can be realized. The monte carlo tree search may be divided into four steps. Selection, expansion, simulation, and back propagation. First, in the selection phase, a node N that needs to be expanded needs to be selected downward from the root node. Secondly, according to the action which is not expanded in the node N, an N child node is created in the search tree. Third, to get an initial score for the child node. It is necessary to start with the child node and let the game randomly proceed until a game outcome is obtained, which will be used as the initial score for the child node. Finally, after the simulation of the child node is finished, the parent node N and all nodes on the path from the root node to N update the accumulated weight of each child through the UCT equation according to the result of the simulation. The search tree is expanded every iteration, and the scale of the search tree is continuously increased along with the increase of the number of iterations. And when the simulation times reach a set value, stopping simulation, and selecting the best child node under the root node as the decision result.
Referring to fig. 2, the layout of the house type is completed step by step, the size of each room to be deployed in the house type is determined by a particle swarm algorithm, and then the coordinates of the rooms are obtained by the room size through a monte carlo tree search method. And continuously optimizing the house type layout through multiple iterations to obtain the finally optimized house type layout.
Fig. 3 is a schematic flow chart of a house layout generation method according to an embodiment of the present application. As shown in fig. 3, firstly, determining design conditions, determining a house type state according to the design conditions of the house type, then obtaining size information of a room to be deployed through a PSO algorithm, determining coordinates of the room through the size information of the room by an MCTS method, and scoring the size information and the coordinate information of the room through an evaluation function; and if the iteration step number reaches the set iteration step number, deploying the room according to the highest score in the scores to obtain the final house type, and if the iteration step number does not reach the set iteration step number, returning to the PSO method for the next iteration.
Fig. 4 is a schematic step diagram of a house layout generation method according to an embodiment of the present application. Fig. 4 is further explained below in conjunction with fig. 2 and 3. The house type layout generating method of the application can comprise the following steps:
step S401: and acquiring the current house type state.
A single dwelling-type space unit can be divided into two categories, an interior room and an exterior environment. The interior room refers to all closed rooms (such as bedrooms, toilets and the like) and open spaces (such as living rooms, restaurants and the like) except for the aisle. Fig. 5 is a schematic diagram of a house-type vectorization method provided in the embodiment of the present application, and fig. 6 is a schematic diagram of a house-type dismantling provided in the embodiment of the present application. Referring to fig. 5 and 6, as shown in fig. 5a, a house type room includes two types: closed rooms (e.g., bedrooms, toilets, etc.) and open rooms (e.g., living rooms, restaurants, etc.). These room combinations can be abstracted as combinations of rectangles, and the information of the rooms can be described by size and coordinates. As shown in FIG. 6, most rooms are in an "adjacent" relationship, such as rooms A and B in FIG. 6B, but some rooms are in an "intersecting" relationship, such as rooms B and C in FIG. 6B. In an intersecting relationship, as shown in room B of fig. 6a, a partial "intrusion" of one room into another room, where the "intruded" room plane is in the form of a concave polygon, but can still be viewed as a complete rectangle by way of padding. The combination between all rooms in one house-type plane can be regarded as a combination of rectangles. From the abstracted rectangular room, the room form can be quantified, as shown in fig. 5c, which includes room position coordinates and the size of the room, including the width and depth of the room. The size refers to the length and width of each room rectangular unit, and the room is too large or too small to be used.
In the present application, all room unit planes and external environment elements are abstracted to rectangles and are represented by coordinates and dimensions of length and width. Thus, the entire house layout can be described by the set of x-axis, y-axis coordinates and length and width dimensions. It should be noted that abstracting the floor plan to a rectangle is a simplification, and the computational difficulty can be reduced by this simplification. In the case of buildings, although the plane of the rooms in the building has an irregular form, most of the rooms are rectangular planes, so that most of the house layouts can be represented by the method even if all the rooms are simplified into rectangles.
Specifically, the house type state is expressed in the form of a matrix, which is
Figure BDA0003561625110000081
The method comprises the steps of acquiring a house type condition matrix, acquiring a house type design boundary, acquiring a long size information and a wide size information, wherein env represents the house type condition matrix, e represents the house type design boundary, x represents an x-axis coordinate, y represents a y-axis coordinate, w represents a long size information, and d represents a wide size information.
In some more specific embodiments, the obtaining the current house type state includes:
obtaining design conditions of the house type, wherein the design conditions comprise the boundary range of the house type, the position of a main entrance, a lighting surface and adjacent building information, and determining the current house type state according to the design conditions.
The external environment of a house type space unit refers to four aspects of boundary range, lighting surface, entrance and adjacent buildings. A house layout is a combination of room units and room units with the outside environment (house design boundary).
Step S402: acquiring room information of one or more rooms to be deployed through a particle swarm algorithm, wherein the room information comprises the length and the width of the room; each particle in the population of particles includes dimensional information for one room to be deployed.
The constraint condition of the room size is often a continuous integer interval, the constraint condition is less, and the room size particles can be quickly generated through a PSO algorithm.
According to the house type condition matrix, particles containing length and width dimension information of the room to be deployed can be generated, and the room to be deployed is formed by a plurality of pieces of room information to be deployed and is expressed as a room matrix to be deployed
Figure BDA0003561625110000091
The size represents a room matrix to be deployed, r represents a room to be deployed, w represents width information, d represents length information, P is a PSO algorithm, and env represents a house type condition matrix.
In some possible embodiments, the room information further includes spatial information between the rooms, the spatial information between the rooms including: and adjacent, separated and intersected, and representing the spatial information between the rooms through a room adjacency matrix.
Fig. 7 is a schematic diagram illustrating a spatial relationship expression of house types according to an embodiment of the present application. Referring to fig. 7, the spatial relationship of the present application refers to the adjacent relationship between interior rooms, and between interior rooms and the external environment. The original house type is planed into a plane diagram, the room relation of different rooms in the plane diagram forms a room space relation diagram, and the room space relation is described through a room adjacency matrix. The relationship between rooms can be summarized into three relationships of separated, adjacent and crossed.
In some possible embodiments, the obtaining room information of one or more rooms to be deployed by a particle swarm algorithm comprises:
obtaining different sizes of the room through continuous iteration of the particle positions, wherein the j-th particle position is calculated through the following formula
Figure BDA0003561625110000092
Where x denotes the position of the particle, ω denotes the inertia factor, v denotes the velocity of the particle, c1,c2Characterizing the learning factor, rand characterizing random numbers subject to [0,1) uniform distribution,
Figure BDA0003561625110000093
characterizing the historical best position, gbest, of particle i at the j-th calculationiThe global optimal position of the particle i at the j-th calculation is characterized.
In the present application, the house type room size is controlled by modulus, so all room sizes are multiples of one fixed size unit, so the room size is encoded according to discrete integer variables by using a discrete binary particle swarm algorithm.
Since the particle x is a binary vector, the method of updating the particle x in an iterative manner is bit reversal. When the speed of the particle is larger, the difference between the particle and the optimal particle is larger, so that the probability of turning is larger; conversely, the smaller the velocity, the smaller the gap between the representation and the current optimal particle, and therefore the smaller the probability of flipping.
In a more specific example, the bit flip expression is
Figure BDA0003561625110000101
Figure BDA0003561625110000102
Figure BDA0003561625110000103
Wherein x denotes the position of the particle, ω denotes the inertia factor, v denotes the velocity of the particle, c1,c2Characterizing the learning factor, rand characterizing random numbers subject to [0,1) uniform distribution,
Figure BDA0003561625110000104
characterizing the historical best position, gbest, of particle i at the j-th calculationiThe global best position of the token particle i at the j-th calculation, k token index,
Figure BDA0003561625110000105
the mapped value of the position velocity of k index at step j for particle i,
Figure BDA0003561625110000106
is the value of the index position k of particle i at step j.
Step S403: and performing multiple Monte Carlo tree searches according to the room information to obtain the coordinate information of the one or more rooms to be deployed.
After the room size is determined, in order to eliminate a large number of useless solutions and compress a search space, the room coordinates need to be screened more finely, so that the coordinates are more suitable for pruning through an MCTS algorithm, and the advantage of tree search accuracy is exerted. And simultaneously, in the MCTS searching stage, parallel calculation is carried out by taking the particles generated by the PSO as units so as to further save time.
After the room size is determined, the deployment position of the internal room is searched through MCTS, and a room matrix composed of x-axis and y-axis coordinates is obtained and is represented as
Figure BDA0003561625110000107
Wherein coords represents a room matrix, r represents a room, x represents an x-axis coordinate, y represents a y-axis coordinate, M is an MCTS method, env represents a house type condition matrix, and size represents a room matrix.
In some more specific embodiments, performing multiple monte carlo tree searches according to the room information includes:
and constructing a current search graph according to the current house type state, wherein the node of each search graph represents a deployment condition of a room to be deployed.
Specifically, the current house type state is determined according to the obtained boundary range, entrance position, lighting surface and adjacent building information of the current house type, and a search graph is constructed according to the current house type state.
And determining room information of a current room to be deployed in the one or more rooms to be deployed, and performing operation on the current search graph for a plurality of times through Monte Carlo tree search to obtain a search result, wherein the search result comprises an optimal node of the current search graph.
In some more specific embodiments, each of the plurality of operations performed on the current search graph by the monte carlo tree search comprises:
step A: selecting a node as a root node according to a current search graph, and expanding the root node based on the root node to obtain a plurality of first child nodes;
specifically, each room to be deployed has a size interval (width interval and length interval), all combinations of the sizes and the coordinates are obtained according to the coordinates of each room, and each node corresponds to a possible deployment situation of one room to be deployed, that is, each node corresponds to a combination of a set of sizes and coordinates of one room to be deployed. For example, the room to be deployed currently is the master bedroom, and meanwhile, the layout of the current house type is not started, so that the current house type state is the root node. And starting to layout the master bedroom based on the current house type state, so that the house type states of a plurality of layout master bedrooms can be obtained, and each state in the house type states of the plurality of layout master bedrooms is a first node.
And B: screening the plurality of first sub-nodes by a pruning method to obtain a plurality of second sub-nodes, wherein the second sub-nodes represent actual expandable nodes after pruning;
in a more specific example, the screening of the first plurality of child nodes by pruning includes position pruning and size pruning.
In order to eliminate unnecessary options, the exploration space is compressed, and the family search graph needs to be pruned. It will be appreciated that pruning can compress the exploration space by excluding some obviously unsuitable room forms.
For example, if the current house type state when the current house type does not start to be laid out is selected as a root node, and the layout is expanded, the house type state of the deployed master bedroom is a first child node, in some layout situations, the layout of the master bedroom cannot well meet normal use requirements, the layout which does not meet the use requirements is screened out, and a plurality of actual extensible house type states after pruning are obtained and are second child nodes. If one layout in the plurality of pruned actual expandable house type states is selected as a root node, the layout is expanded, namely, a next room to be deployed, such as a guest bedroom, is deployed to obtain a plurality of guest bedroom layout states after the host bedroom is deployed, the guest bedroom layout states are taken as first child nodes, the guest bedroom layout states after the host bedroom is deployed are pruned, and the obtained result is taken as second child nodes.
In the present invention, all room forms are represented by rectangles. Although the plane of the building room has an irregular form, most rooms are rectangular planes, so that representing all rooms in the house type by rectangles can realize description of most of the layout of the building plane, and simultaneously simplifies the calculation difficulty, so that the model is balanced in generalization capability and calculation efficiency.
Position pruning requires defining spatial relationships (e.g., intersection, adjacency) between each room first, and pruning according to the spatial relationships. And the size pruning is to judge whether the area interval is met or not and prune the unsatisfied branch. The position pruning can eliminate unnecessary coordinate points for placing the room, and the size pruning can further control the size of the room on the premise of determining the position of the room. All feasible situations of next room placement under a specific house type state can be obtained through pruning.
In a more specific example, the specific formula for position pruning is:
Figure BDA0003561625110000121
in the formula (I), the compound is shown in the specification,
Figure BDA0003561625110000122
characterize the set of coordinates in which the ith room can be placed,
Figure BDA0003561625110000123
characterize placeable points of rooms adjacent to the ith room,
Figure BDA0003561625110000124
the remaining empty area when characterizing the ith room placement can place points,
Figure BDA0003561625110000125
characterizing placeable point x-axis and y-axis coordinates that require rooms adjacent to the ith room,
Figure BDA0003561625110000126
x-axis and y-axis coordinates of placeable points that characterize the remaining empty area at the time of the ith room placement.
Because the relationship between the rooms is defined in advance, all the deployment conditions of the rooms to be deployed with proper position information can be obtained through the intersection of the blank area when the rooms to be deployed are placed and the placeable points of the rooms adjacent to the rooms to be deployed.
For example, as shown in fig. 6, it is defined in advance that the B room and the C room intersect, and a plurality of possible deployment situations of the B room can be determined according to the intersection of the previously defined spatial relationship and the points of the non-arranged areas inside the current house.
In a more specific example, the specific formula for size pruning is:
Figure BDA0003561625110000131
in the formula (I), the compound is shown in the specification,
Figure BDA0003561625110000132
characterize the set of rooms in which the ith room can be placed,
Figure BDA0003561625110000133
characterize the set of coordinates in which the ith room can be placed,
Figure BDA0003561625110000134
a set of widths characterizing the ith room,
Figure BDA0003561625110000135
the depth set of the ith room is characterized.
And multiplying the coordinate set and the size set of the room to be deployed to obtain a room set with a proper size of the room to be deployed.
And C: and performing random search based on the second child node, and evaluating a result obtained after the random search through an evaluation function.
In some possible embodiments, the evaluating the result obtained after the random search by the evaluation function includes evaluating the number of rooms, evaluating the intersection area, evaluating the aisle, wherein the aisle evaluation includes evaluating the aisle area, evaluating the aisle and the room adjacent condition, and evaluating the aisle width.
Pruning is a strong constraint on the house type feasible solution, while the merit function is a weak constraint on the feasible solution. By scoring each final result and updating the weight of each node of the search graph according to the score, the evaluation function can guide the algorithm to search towards the optimal strategy direction.
In a more specific example, the specific formula of the evaluation function is:
max Score=Sn+So+SP
in the formula, Score represents the house type total Score, SnCharacterizing the number of rooms score, SoCharacterization intersection area score, SPThe aisle score is characterized.
In a more specific example, the specific formula for the room number score is:
Figure BDA0003561625110000136
in the formula, ndCharacterizing the number of rooms already deployed, ntThe total number of rooms in the planned deployment is characterized.
The specific formula of the intersection area score is as follows:
Figure BDA0003561625110000137
in the formula (I), the compound is shown in the specification,
Figure BDA0003561625110000138
the total area of all the rooms that have been deployed is characterized,
Figure BDA0003561625110000139
characterizing the total area, s, of the intersection of all deployed room shapesbThe boundary extent area is characterized.
The specific formula of the aisle score is as follows:
SP=Po+Pw+Pa
in the formula, PwCharacterizing aisle width score, PaCharacterizing aisle area score, PdThe characterization aisle and room adjacency score.
In a more specific example, the aisle width score is expressed as:
Figure BDA0003561625110000141
in the formula, wstdThe target minimum width of the aisle is characterized, and w represents the current minimum width of the aisle.
The aisle area score is expressed as:
Figure BDA0003561625110000142
in the formula, astdCharacterizing the minimum area of the aisle target, and a characterizing the current area of the aisle.
The aisle-to-room adjacency score is expressed as:
Figure BDA0003561625110000143
in the formula (d)iThe distance of the crossing from the ith room is characterized.
Step D: and updating the weight of the relative node in the search graph according to the evaluation function score, wherein the optimal node is the node with the maximum weight.
In a more specific example, a specific formula for updating the weights of the relative nodes in the search graph is as follows:
Figure BDA0003561625110000144
wherein W represents the weight of a node, njCharacterizing the number of times a child node is accessed, qjThe sub-nodes are characterized in that,
Figure BDA0003561625110000145
characterizing child nodes qjThe value in the i simulations, i represents the simulation times, n represents the total number of times the root node is visited, and c represents the hyper-parameter.
Wherein the hyperparameter c is a constant and the theoretical value is
Figure BDA0003561625110000146
The larger the c value, the more preferable the breadth search, and the smaller the c value, the more preferable the depth search.
Step S404: comprehensively scoring the room information and the coordinate information through an evaluation function to obtain a scoring result;
and after the room deployment is finished, calculating the house type fitness through the evaluation function E. Finally, the optimal size and coordinate combination sizes of the internal room are obtained by updating the fitness of the maximized sizes and coords of the sizes parameters*,coords*Is shown as
Figure BDA0003561625110000151
Wherein size denotes the optimal size combination (matrix), coords denotes the optimal coordinate combination (matrix), arg denotes the function, E denotes the rating function.
Step S405: and calculating the rated times, and deploying the one or more rooms to be deployed according to the highest scoring result in the scoring results.
And if the iteration step number reaches the set iteration step number, deploying the room according to the highest score in the scores to obtain the final house type, and if the iteration step number does not reach the set iteration step number, returning to the PSO method for the next iteration.
The Monte Carlo tree search and particle swarm optimization are combined, the method is used for automatic design of residential house layout, design assistance is provided for architects, and non-professional personnel can be helped to achieve design intention or design evaluation. In the combined optimization process of the house type rooms, the model can prune the nodes through an MCTS algorithm to compress a search space, so that an ideal house type layout result is obtained while the generalization capability of the model is ensured. Meanwhile, the calculation time is saved by utilizing the characteristics of high convergence speed and parallel calculation of the PSO algorithm, and the effect and the efficiency are considered. Experimental results show that the results of generating the layout of the user type by the PSO-MCTS are superior to those of the single MCTS and PSO algorithms, and the calculation efficiency is well balanced. The method can deal with diversified design conditions while ensuring the quality of the generated result, is not limited by case data compared with a deep learning method, can obtain a result superior to the case data, and can save the calculation time and greatly improve the efficiency compared with a simple MCTS method.
Based on the house type layout generating method provided in the above embodiments, a house type layout generating device is provided in this embodiment, and specifically, fig. 8 shows an alternative structural block diagram of the house type layout generating device, the device is divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors, so as to complete the present invention. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the layout generation than the program itself, and the following description will specifically describe the functions of each program module in this embodiment. The device specifically includes:
the first acquisition module is used for acquiring the current house type state.
The second acquisition module is used for acquiring room information of one or more rooms to be deployed through a particle swarm algorithm, wherein the room information comprises the length and the width of the room; each particle in the population of particles characterizes dimensional information of one room to be deployed.
And the third acquisition module is used for carrying out multiple Monte Carlo tree searches according to the room information to obtain the coordinate information of the one or more rooms to be deployed.
And the evaluation module is used for carrying out comprehensive scoring on the room information and the coordinate information through an evaluation function to obtain a scoring result.
And the deployment module is used for calculating the rated times and deploying the one or more rooms to be deployed according to the highest scoring result in the scoring results.
Fig. 9 shows a schematic structural diagram of a computer device provided in an embodiment of the present specification, where the computer device may include: a processor 910, a memory 920, an input/output interface 930, a communication interface 940, and a bus 950. Wherein the processor 910, the memory 920, the input/output interface 930, and the communication interface 940 are communicatively coupled to each other within the device via a bus 950. The computer device may be configured to perform the method illustrated in fig. 2, as previously described.
The processor 910 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 920 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 920 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 920 and called by the processor 910 to be executed.
The input/output interface 930 is used for connecting an input/output module to realize information input and output. The i/o modules may be provided as components within the device (not shown) or may be external to the device to provide corresponding functionality. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 940 is used for connecting a communication module (not shown in the figure) to implement communication interaction between the present device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 950 includes a pathway to transfer information between various components of the device, such as processor 910, memory 920, input/output interface 930, and communication interface 940.
It should be noted that although the above-mentioned device only shows the processor 910, the memory 920, the input/output interface 930, the communication interface 940 and the bus 950, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A house type layout generation method is characterized by comprising the following steps:
acquiring a current house type state;
acquiring room information of one or more rooms to be deployed through a particle swarm algorithm, wherein the room information comprises the length and the width of the room; each particle in the particle swarm represents size information of a room to be deployed;
performing multiple Monte Carlo tree searches according to the room information to obtain coordinate information of the one or more rooms to be deployed;
comprehensively scoring the room information and the coordinate information through an evaluation function to obtain a scoring result;
and calculating the rated times, and deploying the one or more rooms to be deployed according to the highest scoring result in the scoring results.
2. The method of claim 1, wherein obtaining the current subscriber type status comprises:
obtaining design conditions of the house type, wherein the design conditions comprise the boundary range of the house type, the position of a main entrance, a lighting surface and adjacent building information, and determining the current house type state according to the design conditions.
3. The method of claim 1, wherein the room information further comprises inter-room spatial information, the inter-room spatial information comprising: and adjacent, separated and intersected, and representing the spatial information between the rooms through a room adjacency matrix.
4. The method of claim 1, wherein the house type state is represented in a matrix form as
Figure FDA0003561625100000011
The method comprises the steps of acquiring a house type condition matrix, acquiring a house type design boundary, acquiring a long size information and a wide size information, wherein env represents the house type condition matrix, e represents the house type design boundary, x represents an x-axis coordinate, y represents a y-axis coordinate, w represents a long size information, and d represents a wide size information.
5. The method according to claim 1, wherein the obtaining room information of one or more rooms to be deployed by a particle swarm algorithm comprises:
obtaining different sizes of the room through continuous iteration of the particle positions, wherein the j-th particle position is calculated through the following formula
Figure FDA0003561625100000021
Where x denotes the position of the particle, ω denotes the inertia factor, v denotes the velocity of the particle, c1,c2Characterizing the learning factor, rand characterizing random numbers subject to [0,1) uniform distribution,
Figure FDA0003561625100000022
characterizing the historical best position, gbest, of particle i at the j-th calculationiThe global optimal position of the particle i at the j-th calculation is characterized.
6. The method of claim 1, wherein performing a plurality of monte carlo tree searches based on the room information comprises:
constructing a current search graph according to the current house type state, wherein the node of each search graph represents a deployment situation of a room to be deployed;
and determining room information of a current room to be deployed in the one or more rooms to be deployed, and performing operation on the current search graph for a plurality of times through Monte Carlo tree search to obtain a search result, wherein the search result comprises an optimal node of the current search graph.
7. The method of claim 6, wherein each of the operations performed on the current search graph by the Monte Carlo tree search comprises:
selecting a node as a root node according to a current search graph, and expanding the root node based on the root node to obtain a plurality of first child nodes;
screening the plurality of first sub-nodes by a pruning method to obtain a plurality of second sub-nodes, wherein the second sub-nodes represent actual expandable nodes after pruning;
performing random search based on the second child node, and evaluating a result obtained after the random search through an evaluation function;
and updating the weight of the relative node in the search graph according to the evaluation function score, wherein the optimal node is the node with the maximum weight.
8. A house layout generating apparatus, comprising:
the first acquisition module is used for acquiring the current house type state;
the second acquisition module is used for acquiring room information of one or more rooms to be deployed through a particle swarm algorithm, wherein the room information comprises the length and the width of the room; each particle in the particle swarm represents size information of a room to be deployed;
the third acquisition module is used for carrying out multiple Monte Carlo tree searches according to the room information to obtain the coordinate information of the one or more rooms to be deployed;
the evaluation module is used for carrying out comprehensive scoring on the room information and the coordinate information through an evaluation function to obtain a scoring result;
and the deployment module is used for calculating the rated times and deploying the one or more rooms to be deployed according to the highest scoring result in the scoring results.
9. A computing device comprising a processor and a memory, wherein the memory has stored therein computer program instructions which, when executed by the processor, perform the method of any of claims 1-7.
10. A computer readable storage medium comprising computer readable instructions which, when read and executed by a computer, cause the computer to perform the method of any one of claims 1-7.
CN202210290430.6A 2022-03-23 2022-03-23 Household layout generation method and device Active CN114491772B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210290430.6A CN114491772B (en) 2022-03-23 2022-03-23 Household layout generation method and device
US18/158,375 US20230306165A1 (en) 2022-03-23 2023-01-23 Method and device for floorplan generation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210290430.6A CN114491772B (en) 2022-03-23 2022-03-23 Household layout generation method and device

Publications (2)

Publication Number Publication Date
CN114491772A true CN114491772A (en) 2022-05-13
CN114491772B CN114491772B (en) 2022-09-13

Family

ID=81488942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210290430.6A Active CN114491772B (en) 2022-03-23 2022-03-23 Household layout generation method and device

Country Status (2)

Country Link
US (1) US20230306165A1 (en)
CN (1) CN114491772B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115114713A (en) * 2022-07-26 2022-09-27 江西少科智能建造科技有限公司 Automatic air disc arrangement method, system, storage medium and equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142934A (en) * 1999-11-18 2001-05-25 Matsushita Electric Ind Co Ltd Element layout method
US20180268220A1 (en) * 2017-03-17 2018-09-20 Magic Leap, Inc. Room layout estimation methods and techniques
CN108765556A (en) * 2018-05-21 2018-11-06 福州大学 A kind of dynamic 3D Real-time modeling set methods based on improvement particle cluster algorithm
WO2019018590A1 (en) * 2017-07-20 2019-01-24 Carrier Corporation Implementation of fiber high-sensitivity smoke detector system utilizing a building information model
CN109740237A (en) * 2018-12-28 2019-05-10 乔丽莉 A kind of building electromechanics point position arranging method based on Monte Carlo
CN110363853A (en) * 2019-07-15 2019-10-22 贝壳技术有限公司 Furniture puts scheme generation method, device and equipment, storage medium
CN111597616A (en) * 2020-05-18 2020-08-28 程若尘 Digital indoor design method, device, equipment and readable storage medium
CN112365076A (en) * 2020-11-19 2021-02-12 西安建筑科技大学 Parallel connection cold machine load distribution optimization method, storage medium and computing device
CN113705111A (en) * 2021-09-22 2021-11-26 百安居信息技术(上海)有限公司 Fitment furniture automatic layout method and system based on deep learning

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142934A (en) * 1999-11-18 2001-05-25 Matsushita Electric Ind Co Ltd Element layout method
US20180268220A1 (en) * 2017-03-17 2018-09-20 Magic Leap, Inc. Room layout estimation methods and techniques
WO2019018590A1 (en) * 2017-07-20 2019-01-24 Carrier Corporation Implementation of fiber high-sensitivity smoke detector system utilizing a building information model
CN108765556A (en) * 2018-05-21 2018-11-06 福州大学 A kind of dynamic 3D Real-time modeling set methods based on improvement particle cluster algorithm
CN109740237A (en) * 2018-12-28 2019-05-10 乔丽莉 A kind of building electromechanics point position arranging method based on Monte Carlo
CN110363853A (en) * 2019-07-15 2019-10-22 贝壳技术有限公司 Furniture puts scheme generation method, device and equipment, storage medium
CN111597616A (en) * 2020-05-18 2020-08-28 程若尘 Digital indoor design method, device, equipment and readable storage medium
CN112365076A (en) * 2020-11-19 2021-02-12 西安建筑科技大学 Parallel connection cold machine load distribution optimization method, storage medium and computing device
CN113705111A (en) * 2021-09-22 2021-11-26 百安居信息技术(上海)有限公司 Fitment furniture automatic layout method and system based on deep learning

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘倩: "基于粒子群算法的建筑空间利用率优化方法研究", 《电子设计工程》 *
周驰,高亮,高海兵: "基于粒子群优化算法的约束布局优化", 《控制与决策》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115114713A (en) * 2022-07-26 2022-09-27 江西少科智能建造科技有限公司 Automatic air disc arrangement method, system, storage medium and equipment
CN115114713B (en) * 2022-07-26 2022-11-15 江西少科智能建造科技有限公司 Automatic air disc arrangement method, system, storage medium and equipment

Also Published As

Publication number Publication date
CN114491772B (en) 2022-09-13
US20230306165A1 (en) 2023-09-28

Similar Documents

Publication Publication Date Title
Lopes et al. A constrained growth method for procedural floor plan generation
Shi et al. Addressing adjacency constraints in rectangular floor plans using Monte-Carlo Tree Search
Koenig et al. Comparing two evolutionary algorithm based methods for layout generation: Dense packing versus subdivision
CN111437603A (en) Method and system for generating map of electronic game
CN114491772B (en) Household layout generation method and device
Green et al. Organic building generation in minecraft
Kitchley et al. Generative methods and the design process: A design tool for conceptual settlement planning
Psarra et al. Just around the corner from where you are: Probabilistic isovist fields, inference and embodied projection
CN114626129B (en) Household layout generation method and device
US9043742B1 (en) Methods, systems, and articles of manufacture for implementing physical design using force models with custom connectivity
Taborda et al. Shaper-GA: Automatic shape generation for modular house design
Zandavali Cellular automata: a bridge between building variability and urban form control
Xie et al. An interactive approach for generating spatial architecture layout based on graph theory
CN114139244A (en) Automatic generation method for building group layout design
Cheddadi et al. Reinterpreting self-organizing urban tissues by designing a generative model
Chia et al. Automated design of architectural layouts using a multi-objective evolutionary algorithm
Hegselmann et al. Cellular Automata as a Modelling Tool: Solidarity and Opinion Formation
CN115496876B (en) Building modeling method, map rendering method, device and equipment
US20240104256A1 (en) Modular generation and optimization of building designs
CN117010051B (en) Intelligent community intelligent design method and device based on digital twinning
US20240104257A1 (en) Multi-scale generative design for modular construction
US20210365603A1 (en) Artificial intelligence systems and methods for interior furnishing
JP2003346071A (en) Apparatus, method and program for simulating behavior, and recording medium recording the program
CN117763647A (en) Proxy-based multi-building site layout optimization
US20240104255A1 (en) Agent-based optimization of multi-building site layouts

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant