# Influence and Effectiveness Analysis of Urban Community Planning on Children’s Play Environment Based on Artificial Intelligence

Authors: Tianzhu Zheng; Haifang Qin
Journal: Journal of Sensors
 (2022)

---

## Abstract

With the development of the times, the progress of science and technology, and the growing needs of people, more and more urban community planning chooses artificial intelligence to replace the traditional urban community planning, at the same time, it also brings new influences and changes to children’s play environment. Firstly, GA, BP, and GA-BP algorithms are explained, and IGA-BP algorithm is proposed. Secondly, the planning and allocation schemes of different communities in children’s environment are planned, and genetic algorithm and BP neural network are used to plan and apply children’s play environment in urban communities. Finally, the experiment compares and predicts the optimal path of the above three algorithms, and the results show that IGA-BP algorithm can wait for the optimal path. Then, GA-BP and IGA-BP algorithms were used to compare the heat of children’s community and other related indicators. IGA-BP algorithm has obvious advantages in heat prediction, absolute error, and relative error.


---

## Body

## 1. Introduction

Artificial intelligence will promote the development of various technologies and create new impetus for economic transformation. By promoting the development of artificial intelligence, it can promote technological breakthroughs in many fields. Of course, it brings us not only the macrolevel but also has slowly entered our lives. Concern and thinking about urban problems have promoted modern urban planning, and the combination of the two is an inevitable trend. The combination of the two makes our urban planning more modern and scientific. Artificial intelligence is becoming more and more popular and is used to solve various problems in different fields as an alternative to traditional technologies or as a component of integrated systems. This technology has fault tolerance and flexibility in solving problems and has the possibility of continuous progress [1]. At present, this technology has been applied to many technical fields to solve many complex problems. Decision-making made by artificial intelligence is related to reasoning, so it is inevitable to understand the relationship between artificial intelligence and decision-making. This paper distinguishes two aspects of decision-making [2]. On the one hand, artificial intelligence has many relationships with diagnosis. On the other hand, artificial intelligence pays insufficient attention to prospective reasoning due to uncertainty and preference. With the continuous development of artificial intelligence technology, it is more widely used in cities, such as transportation. Technology not only brings new choices and experiences but also makes people aware of the problem of information security. Nevertheless, with the support of artificial intelligence technology, urban planning will be upgraded more widely in the future. This paper reviews the development process of urban model under the application of artificial intelligence and also introduces the artificial life computer model [3]. Some features and functions of the simple form of CA (cellular automata) model are understood through a case, which can be self-taught based on its ability and has wide universality. Its ability will have a far-reaching impact on urban planning. Artificial intelligence technology provides a better way to analyze urban development and is the best technology to deal with complex and dynamic problems in urban research [4]. This paper reviews the latest development of urban planning artificial field and explores how to apply artificial technology to urban dynamic planning. Therefore, this paper discusses various uncertain problems in the process of urban evolution and thinks that it is possible to solve the dynamic problems of cities based on artificial intelligence. People are increasingly using knowledge-based or artificial intelligence technology to replace the classical environmental system modeling technology [5]. The technologies covered include case-based reasoning, rule-based systems, artificial neural networks, fuzzy models, genetic algorithms, cellular automata, multiagent systems, swarm intelligence, reinforcement learning, and hybrid systems. The modeling and implementation of various urban planning processes symbolizes an intensive research field [6]. This paper presents a hybrid artificial intelligence system, which uses knowledge-based methods, neural networks, and fuzzy logic and can automatically execute the decision-making process of urban planning. This system integrates a variety of systems and improves on it, which increases the functional breadth of the application program. Through this method, the best technologies are combined to solve complex urban problems. The key aspects of the relationship between artificial intelligence and urban planning development, the breakthrough point of mutual promotion, and the value orientation of future development are discussed [7]. Artificial intelligence will bring about great changes and revolutions in urban research and urban planning. Through the practical application cases of the working group, the author expounds the frontier development of artificial intelligence-assisted urban planning methods, especially in intelligent data collection, intelligent allocation of urban functions, and intelligent urban design. Due to the limitations of artificial intelligence planning tools, urban planning practice faces various open problems and insufficient ability, which limits our ability to perceive the environment and deal with temperament [8]. Therefore, we propose two simple philosophical and systematic causal models to help software engineers understand from the perspective of urban planning. The first model proposes only limited aspects of general intelligence to solve some problems in urban planning. The second model lays a philosophical foundation for responsive artificial super intelligence (ASI). Literature [9] focuses on the influence of games on children’s lifestyles, which is also an essential element of childhood, because it involves cognition, imagination, creativity, emotion, body, and society. The vast majority of students today spend most of their time at school, so the outdoor playgrounds at these centers should be well equipped and designed to ensure their full development. This is especially important for children’s physical development, because most children are active and in a rapid growth stage. When studying the game environment of ECD in Kisumu, Kenya, we found that the amount of game materials provided by most ECD centers is small and unchanged, which indicates that children have limited opportunities for physical development outdoors. The research suggests that teachers and class teachers should prepare sufficient materials and design outdoor environment, so that children can fully participate in games and promote physical development. Children’s participation in development activities, including planning, is still a new method [10]. Urban planning for child participation in development activities has many advantages, such as promoting children’s civic skills, developing children’s perceived problems and needs, and developing children’s self-esteem and self-confidence. At that time, for various reasons, children’s participation in community or national decision-making or activities was not supported. This study studies the feasibility of involving children in community planning in Asunafo South District. In addition, the study revealed interesting information from children. The Great East Japan Earthquake on March 11, 2011, and the subsequent disasters still make the children who have experienced it suffer mentally, physically, and socially [11]. Games are a way to play naturally and help them recover. This paper discusses the role of some games in the health triangle. The triangle solved the psychological, physical, and social problems of children after the disaster, and the children released their stress in the game, and the situation improved. As the nature of children’s games has been continuously improved in the past decade, many outdoor games have been rapidly reduced [12]. This phenomenon is attributed to social changes, parents’ expectations, and children’s own needs. Parents are trying to cope with the positive or negative influences related to it. Specific types of outdoor environment can give children opportunities to develop and grow in many aspects. This paper analyzes and understands the research design structure and steps of seven research precedents in the past ten years and obtains the following research results [13]. Firstly, the relationship between children’s play environment and behavior is tested by qualitative and quantitative methods. Secondly, children’s play environment shows the characteristics of children’s amusement behavior, which is different from the existing residential areas. In addition, the study emphasizes the commonness of common problems and methodologies existing among different disciplines. The results of this study lay a foundation for the future research of children’s play environment. This paper puts forward the concept of environmental autobiography, which is a method to understand children’s views on their living environment more directly [14]. This kind of autobiography may have a deep understanding of children’s environmental behavior, support children’s needs for exploration, imagination, etc., and avoid being ignored. Therefore, children’s play environment will also be affected by urban community planning. In the above research work, the layout of public facilities in smart city communities from the perspective of artificial intelligence, especially in the optimization of children’s environment, many design schemes do not consider the layout and optimization of community children’s environment. It also fails to take into account the sharing of public facilities among different communities, especially the sharing of public facilities for children. Therefore, in the above-mentioned problems, this paper puts forward the scheme of sharing children’s environment in the community and provides a solution to the conflict of community resources.


## 2. Artificial Intelligence Algorithm Analysis

### 2.1. Environmental Impact of Children’s Games

With the rapid development of cities, children’s play environment has also changed. Different planning communities have different children’s play facilities. However, there are differences in children’s play environment, and the facilities provided by different communities cannot meet the needs of children in different communities. Generally, this kind of resource utilization effect is not ideal. Through the planning of different communities, the sharing and application of children’s play facilities between different communities can be realized. The planning of children’s play facilities in different communities is shown in Figure1.Figure 1
Children’s play environment planning under multicommunity planning.In Figure1, there is a shared children’s play environment among different communities, and there is a distance between different children’s play areas and corresponding communities. Therefore, different communities share the game environment in a common area and uniformly arrange the game environment to realize the optimal allocation and management of public resources in smart cities.


### 2.2. Genetic Algorithm Model

The concept of genetic algorithm is as follows: this is a viewpoint put forward by a scholar according to the theory of biological evolution. Generally speaking, genetic algorithm is to digitally crack the process of biological inheritance in the biological world, so that the algorithm corresponds to it one by one. We regard the living environment of the individual population as the search range of the algorithm. The genetic material (that is, chromosome) possessed by an individual is regarded as the decoding and coding needed in the algorithm. And calculate the fitness value of genetic material of each individual. Genetic material is copied synchronously by copying. The genetic material existing in chromosomes will cross with the cross of chromosomes. Finally, in the process of decoding, the arrangement order of genetic material will be wrong, resulting in variation. In these processes, the best data can be selected according to the adaptation degree of genetic material. The genetic algorithm flow is shown in Figure2.Figure 2
Genetic algorithm flow.Generally speaking, genetic algorithm has six steps, which correspond to the biological point of view one by one, namely, coding, decoding, solving fitness, copying, crossover, and mutation. Let us explain the above nouns one by one.Step 1. Coding.
Many coding methods can be adopted in genetic algorithm. In this paper, we mainly use binary coding.
Here is an example on the Internet:(1)fx=x∗sin10∗π∗x+2x∈−1,2.
Suppose that the accuracy of our solution ise=0.01.
Then, we need to divide the interval ofx into 300 parts.
In this example, we use binary encoding, so the number of encoded bits is greater than 300, and we can get at least 9 bits.
From this, we get that the actual solution accuracy ise=3/512≈0.00586.Step 2. Decoding.
Decoding refers to the data transmitted by translating and encoding the original numbers.
We still use the above example, and we can get000000000=−1 and 11111111=2.
The conversion formula used in the above example is as follows:(2)b0b1⋯b20b212=∑i=021bi∙2i10=xt.
So we get the following decoding formula:(3)111111111into10∗e−1=2,000000000into10∗e−1=−1.Step 3. Replication.
In the process of replication, each individual has different adaptability to the environment. Those who adapt well to the living environment can be left and inherited all the time, while those who adapt poorly will be eliminated and randomly generated by the old population of replication operations. In order to ensure the continuity of replication, it will not be interrupted on an individual, so each individual has an independent random possibility of replication. The stronger the adaptability of individuals, the greater the possibility of being copied and inherited.
This paper introduces two common methods of individual replication probability.
Probability setting method based on fitness(4)pi=fxi∑j=1nfxj,where n represents the total number of individuals in the population and fxi is the fitness value of individual i.
Therefore, the stronger the fitness of an individual, the greater thepi value and vice versa.
Probability setting method based on ranking
Let the population have a total ofk individuals, and when the fitness of each individual is known, it is arranged from large to small according to the fitness. The better the individual, the higher the arrangement.
(5)Pi=e1−ei−1.
In this formula, the greateri−1, the smaller the probability, and vice versa, the greater the probability.
In biological evolution, crossover refers to the interchange of genes of the same part by paired chromosomes for some reason, thus forming two new individuals. The same is true of crossover in genetic algorithm.(6)aij=aij+aij−amax∗fgr>0.5,aij+amin−aij∗fgr≤0.5,where amax is the upper bound and amin is the lower bound [15].
(7)fg=r21−gGmax2,where r2 is a random number, g is the current iteration number, Gmax is the maximum evolution number, and r is a random number between [0, 1].Step 4. Variation.
Generally speaking, the function of mutation in this algorithm is to prevent missing important information, because through mutation operation, the population can ensure the biodiversity of the environment and optimize to the maximum extent.
This is based on the concept of survival of the fittest in the theory of evolution. Individuals with high adaptability to the environment are more competitive in participating in reproduction. Once the competitiveness is improved, more and more offspring will be bred. However, if the fitness is low, it will have the opposite outcome.
This paper still refers to the expression in the example mentioned above, where the fitness corresponds to the result, which isx, and correspondingly, fx is the calculation formula of fitness.
In AG-BP algorithm, it is inevitable to optimize the functionfx, so this function is set up one-to-one correspondence in fx, that is, fitness, which is equivalent to a coordinate point of plane coordinate axis. The following two regulations apply to solving fitness:
(i)
The value of fitness function is not less than zero(ii)
The change direction of objective function is the same as that of fitness function in the process of population evolution
For this reason, genetic algorithms usually use the following formula to transformfx into fx. Cmin is an appropriate smaller number that meets the requirements.
The optimization offxmax can be transformed by the following formula:
(8)fx=fx−Cmax,fx>Cmax,0,fx<Cmax.
The optimization offxmin can be transformed by the following formula:
(9)fx=−fx−Cmin,fx<Cmin,0,fx>Cmin.
For exponential function problems, the general method is(10)Fx=cy;y=fx.


### 2.3. BP Neural Network

BP neural network is a multilayer feedforward neural network trained according to error back propagation algorithm, and it is the most widely used neural network. It can solve the learning problem of hidden layer connection weight of multilayer neural network systematically and give a complete derivation in mathematics. In addition, it also has excellent pattern classification ability and excellent multidimensional function mapping ability. Structurally speaking, BP network has input layer, hidden layer, and output layer. In essence, BP algorithm takes the square of network error as the objective function and uses gradient descent method to calculate the minimum value of the objective function.The BP neural network model is shown in Figure3.Figure 3
BP neural network model.


#### 2.3.1. Activation Function

Generally, it can be expressed by the following formula:(11)fx=11+e−x,1−e−x1+e−x.Under normal circumstances:(12)fx=A1+e−x/B.Its derivative is defined:(13)yk=∑i=0IWik∗Xi+Bk.


#### 2.3.2. Forward Propagation

In BP neural network, according to the above model diagram, we can see that the output value of any node is not determined by only one condition but considers many factors: the activation function used by the algorithm, all the output values and weights of the upper node, and the weights and thresholds of the current node. Therefore, we can use the following formula as a reference.(14)Yk=fyk,yk=∑k=0HWkj∗Yi+Bj,Yj=fyj.


#### 2.3.3. Back Propagation

At the output layer of the network, we can judge the error between the standard result and the output result according to the following formula:(15)E=12∑j=0OSj−Yj2.The so-called back propagation refers to the reverse propagation of the error signal obtained from the experiment, so that the value of the error signal function can be reduced and better optimized. With the decrease of the function value, the advantages of back propagation can also be reflected. In order to minimize the error function, gradient descent is one of the methods used to correct weights and thresholds, and the following formula is obtained by this method:(16)∆Wkj=−a∂E∂Wkj.Then, the above formula is derived to make(17)δkj=∑j=0OSj−YjYj1−Yj.∆Wkj=δkj∗∑k=0HYkAlso forBj are
(18)∆Bkj=−a∂E∂Bkj.By derivationOrder:δkj=∑j=0OSj−YjYj1−Yj.Then:∆Bkj=δkj.


## 2.1. Environmental Impact of Children’s Games

With the rapid development of cities, children’s play environment has also changed. Different planning communities have different children’s play facilities. However, there are differences in children’s play environment, and the facilities provided by different communities cannot meet the needs of children in different communities. Generally, this kind of resource utilization effect is not ideal. Through the planning of different communities, the sharing and application of children’s play facilities between different communities can be realized. The planning of children’s play facilities in different communities is shown in Figure1.Figure 1
Children’s play environment planning under multicommunity planning.In Figure1, there is a shared children’s play environment among different communities, and there is a distance between different children’s play areas and corresponding communities. Therefore, different communities share the game environment in a common area and uniformly arrange the game environment to realize the optimal allocation and management of public resources in smart cities.


## 2.2. Genetic Algorithm Model

The concept of genetic algorithm is as follows: this is a viewpoint put forward by a scholar according to the theory of biological evolution. Generally speaking, genetic algorithm is to digitally crack the process of biological inheritance in the biological world, so that the algorithm corresponds to it one by one. We regard the living environment of the individual population as the search range of the algorithm. The genetic material (that is, chromosome) possessed by an individual is regarded as the decoding and coding needed in the algorithm. And calculate the fitness value of genetic material of each individual. Genetic material is copied synchronously by copying. The genetic material existing in chromosomes will cross with the cross of chromosomes. Finally, in the process of decoding, the arrangement order of genetic material will be wrong, resulting in variation. In these processes, the best data can be selected according to the adaptation degree of genetic material. The genetic algorithm flow is shown in Figure2.Figure 2
Genetic algorithm flow.Generally speaking, genetic algorithm has six steps, which correspond to the biological point of view one by one, namely, coding, decoding, solving fitness, copying, crossover, and mutation. Let us explain the above nouns one by one.Step 1. Coding.
Many coding methods can be adopted in genetic algorithm. In this paper, we mainly use binary coding.
Here is an example on the Internet:(1)fx=x∗sin10∗π∗x+2x∈−1,2.
Suppose that the accuracy of our solution ise=0.01.
Then, we need to divide the interval ofx into 300 parts.
In this example, we use binary encoding, so the number of encoded bits is greater than 300, and we can get at least 9 bits.
From this, we get that the actual solution accuracy ise=3/512≈0.00586.Step 2. Decoding.
Decoding refers to the data transmitted by translating and encoding the original numbers.
We still use the above example, and we can get000000000=−1 and 11111111=2.
The conversion formula used in the above example is as follows:(2)b0b1⋯b20b212=∑i=021bi∙2i10=xt.
So we get the following decoding formula:(3)111111111into10∗e−1=2,000000000into10∗e−1=−1.Step 3. Replication.
In the process of replication, each individual has different adaptability to the environment. Those who adapt well to the living environment can be left and inherited all the time, while those who adapt poorly will be eliminated and randomly generated by the old population of replication operations. In order to ensure the continuity of replication, it will not be interrupted on an individual, so each individual has an independent random possibility of replication. The stronger the adaptability of individuals, the greater the possibility of being copied and inherited.
This paper introduces two common methods of individual replication probability.
Probability setting method based on fitness(4)pi=fxi∑j=1nfxj,where n represents the total number of individuals in the population and fxi is the fitness value of individual i.
Therefore, the stronger the fitness of an individual, the greater thepi value and vice versa.
Probability setting method based on ranking
Let the population have a total ofk individuals, and when the fitness of each individual is known, it is arranged from large to small according to the fitness. The better the individual, the higher the arrangement.
(5)Pi=e1−ei−1.
In this formula, the greateri−1, the smaller the probability, and vice versa, the greater the probability.
In biological evolution, crossover refers to the interchange of genes of the same part by paired chromosomes for some reason, thus forming two new individuals. The same is true of crossover in genetic algorithm.(6)aij=aij+aij−amax∗fgr>0.5,aij+amin−aij∗fgr≤0.5,where amax is the upper bound and amin is the lower bound [15].
(7)fg=r21−gGmax2,where r2 is a random number, g is the current iteration number, Gmax is the maximum evolution number, and r is a random number between [0, 1].Step 4. Variation.
Generally speaking, the function of mutation in this algorithm is to prevent missing important information, because through mutation operation, the population can ensure the biodiversity of the environment and optimize to the maximum extent.
This is based on the concept of survival of the fittest in the theory of evolution. Individuals with high adaptability to the environment are more competitive in participating in reproduction. Once the competitiveness is improved, more and more offspring will be bred. However, if the fitness is low, it will have the opposite outcome.
This paper still refers to the expression in the example mentioned above, where the fitness corresponds to the result, which isx, and correspondingly, fx is the calculation formula of fitness.
In AG-BP algorithm, it is inevitable to optimize the functionfx, so this function is set up one-to-one correspondence in fx, that is, fitness, which is equivalent to a coordinate point of plane coordinate axis. The following two regulations apply to solving fitness:
(i)
The value of fitness function is not less than zero(ii)
The change direction of objective function is the same as that of fitness function in the process of population evolution
For this reason, genetic algorithms usually use the following formula to transformfx into fx. Cmin is an appropriate smaller number that meets the requirements.
The optimization offxmax can be transformed by the following formula:
(8)fx=fx−Cmax,fx>Cmax,0,fx<Cmax.
The optimization offxmin can be transformed by the following formula:
(9)fx=−fx−Cmin,fx<Cmin,0,fx>Cmin.
For exponential function problems, the general method is(10)Fx=cy;y=fx.


## 2.3. BP Neural Network

BP neural network is a multilayer feedforward neural network trained according to error back propagation algorithm, and it is the most widely used neural network. It can solve the learning problem of hidden layer connection weight of multilayer neural network systematically and give a complete derivation in mathematics. In addition, it also has excellent pattern classification ability and excellent multidimensional function mapping ability. Structurally speaking, BP network has input layer, hidden layer, and output layer. In essence, BP algorithm takes the square of network error as the objective function and uses gradient descent method to calculate the minimum value of the objective function.The BP neural network model is shown in Figure3.Figure 3
BP neural network model.


### 2.3.1. Activation Function

Generally, it can be expressed by the following formula:(11)fx=11+e−x,1−e−x1+e−x.Under normal circumstances:(12)fx=A1+e−x/B.Its derivative is defined:(13)yk=∑i=0IWik∗Xi+Bk.


### 2.3.2. Forward Propagation

In BP neural network, according to the above model diagram, we can see that the output value of any node is not determined by only one condition but considers many factors: the activation function used by the algorithm, all the output values and weights of the upper node, and the weights and thresholds of the current node. Therefore, we can use the following formula as a reference.(14)Yk=fyk,yk=∑k=0HWkj∗Yi+Bj,Yj=fyj.


### 2.3.3. Back Propagation

At the output layer of the network, we can judge the error between the standard result and the output result according to the following formula:(15)E=12∑j=0OSj−Yj2.The so-called back propagation refers to the reverse propagation of the error signal obtained from the experiment, so that the value of the error signal function can be reduced and better optimized. With the decrease of the function value, the advantages of back propagation can also be reflected. In order to minimize the error function, gradient descent is one of the methods used to correct weights and thresholds, and the following formula is obtained by this method:(16)∆Wkj=−a∂E∂Wkj.Then, the above formula is derived to make(17)δkj=∑j=0OSj−YjYj1−Yj.∆Wkj=δkj∗∑k=0HYkAlso forBj are
(18)∆Bkj=−a∂E∂Bkj.By derivationOrder:δkj=∑j=0OSj−YjYj1−Yj.Then:∆Bkj=δkj.


## 2.3.1. Activation Function

Generally, it can be expressed by the following formula:(11)fx=11+e−x,1−e−x1+e−x.Under normal circumstances:(12)fx=A1+e−x/B.Its derivative is defined:(13)yk=∑i=0IWik∗Xi+Bk.


## 2.3.2. Forward Propagation

In BP neural network, according to the above model diagram, we can see that the output value of any node is not determined by only one condition but considers many factors: the activation function used by the algorithm, all the output values and weights of the upper node, and the weights and thresholds of the current node. Therefore, we can use the following formula as a reference.(14)Yk=fyk,yk=∑k=0HWkj∗Yi+Bj,Yj=fyj.


## 2.3.3. Back Propagation

At the output layer of the network, we can judge the error between the standard result and the output result according to the following formula:(15)E=12∑j=0OSj−Yj2.The so-called back propagation refers to the reverse propagation of the error signal obtained from the experiment, so that the value of the error signal function can be reduced and better optimized. With the decrease of the function value, the advantages of back propagation can also be reflected. In order to minimize the error function, gradient descent is one of the methods used to correct weights and thresholds, and the following formula is obtained by this method:(16)∆Wkj=−a∂E∂Wkj.Then, the above formula is derived to make(17)δkj=∑j=0OSj−YjYj1−Yj.∆Wkj=δkj∗∑k=0HYkAlso forBj are
(18)∆Bkj=−a∂E∂Bkj.By derivationOrder:δkj=∑j=0OSj−YjYj1−Yj.Then:∆Bkj=δkj.


## 3. Optimizing BP Network Model Based on Genetic Algorithm

### 3.1. Model Description

This section can be divided into three parts: BP neural network structure determination, genetic algorithm optimization, and BP neural network prediction.The BP neural structure is determined by two important parameters in the fitting function, and the length of individual genetic algorithm is also obtained. The optimization of genetic algorithm refers to the AG-BP algorithm, through which all thresholds and ownership values in the network can be optimized. As long as there is an entity in the population, it is used for the ownership value and threshold of the network. Genetic algorithm finds out the optimal individual through three important operations (selection, crossover, and mutation) and then uses BP neural network to predict. Genetic algorithm is used to get the optimal individual to assign the initial weight and threshold value of the network and predict the output of the function [16]. The specific model is shown in Figure 4.Figure 4
AG-BP algorithm flow.


### 3.2. Implementation of Genetic Algorithm

#### 3.2.1. Population Initialization

A group of individuals constitutes a population, and each individual is a single subset of the population that will not be repeated. In the process of initialization, we should pay attention to expand the scope of the search problem space to avoid the occurrence of local minima.


#### 3.2.2. Fitness Function

First of all, there is an initial data, that is, the weights and thresholds of individuals in BP neural network. In order to calculate the fitness of individuals, this paper chooses BP algorithm to get data first and then takes the expectation obtained by prediction and the absolute error of output as the application data in the formula, as shown in the following formula:(19)F=k∑i=1nabsyi−oi,where n is the number of network output nodes, oi is the actual output of the i-th node, K is the coefficient, and yi is the expected output of the i-th node of BP neural network.


#### 3.2.3. Select the Action

There are many methods for genetic algorithm selection operation, such as roulette. When choosing roulette, that is, the selection strategy based on fitness ratio, the selection probabilitypi of each individual i is
(20)fi=kFi;pi=fi∑j=1nfj,where K is the coefficient and N is the number of individuals in the population. Fi is the fitness value of individual i, and the smaller the better.


#### 3.2.4. Crossover Operation

The crossover operation formula is as follows:(21)akj=akj1−b+balj,alj=alj1−b+bakj.Formula (21) means that chromosome K and chromosome 1 are interchanged at the same site J, and B is a random number between [0, 1].


## 3.1. Model Description

This section can be divided into three parts: BP neural network structure determination, genetic algorithm optimization, and BP neural network prediction.The BP neural structure is determined by two important parameters in the fitting function, and the length of individual genetic algorithm is also obtained. The optimization of genetic algorithm refers to the AG-BP algorithm, through which all thresholds and ownership values in the network can be optimized. As long as there is an entity in the population, it is used for the ownership value and threshold of the network. Genetic algorithm finds out the optimal individual through three important operations (selection, crossover, and mutation) and then uses BP neural network to predict. Genetic algorithm is used to get the optimal individual to assign the initial weight and threshold value of the network and predict the output of the function [16]. The specific model is shown in Figure 4.Figure 4
AG-BP algorithm flow.


## 3.2. Implementation of Genetic Algorithm

### 3.2.1. Population Initialization

A group of individuals constitutes a population, and each individual is a single subset of the population that will not be repeated. In the process of initialization, we should pay attention to expand the scope of the search problem space to avoid the occurrence of local minima.


### 3.2.2. Fitness Function

First of all, there is an initial data, that is, the weights and thresholds of individuals in BP neural network. In order to calculate the fitness of individuals, this paper chooses BP algorithm to get data first and then takes the expectation obtained by prediction and the absolute error of output as the application data in the formula, as shown in the following formula:(19)F=k∑i=1nabsyi−oi,where n is the number of network output nodes, oi is the actual output of the i-th node, K is the coefficient, and yi is the expected output of the i-th node of BP neural network.


### 3.2.3. Select the Action

There are many methods for genetic algorithm selection operation, such as roulette. When choosing roulette, that is, the selection strategy based on fitness ratio, the selection probabilitypi of each individual i is
(20)fi=kFi;pi=fi∑j=1nfj,where K is the coefficient and N is the number of individuals in the population. Fi is the fitness value of individual i, and the smaller the better.


### 3.2.4. Crossover Operation

The crossover operation formula is as follows:(21)akj=akj1−b+balj,alj=alj1−b+bakj.Formula (21) means that chromosome K and chromosome 1 are interchanged at the same site J, and B is a random number between [0, 1].


## 3.2.1. Population Initialization

A group of individuals constitutes a population, and each individual is a single subset of the population that will not be repeated. In the process of initialization, we should pay attention to expand the scope of the search problem space to avoid the occurrence of local minima.


## 3.2.2. Fitness Function

First of all, there is an initial data, that is, the weights and thresholds of individuals in BP neural network. In order to calculate the fitness of individuals, this paper chooses BP algorithm to get data first and then takes the expectation obtained by prediction and the absolute error of output as the application data in the formula, as shown in the following formula:(19)F=k∑i=1nabsyi−oi,where n is the number of network output nodes, oi is the actual output of the i-th node, K is the coefficient, and yi is the expected output of the i-th node of BP neural network.


## 3.2.3. Select the Action

There are many methods for genetic algorithm selection operation, such as roulette. When choosing roulette, that is, the selection strategy based on fitness ratio, the selection probabilitypi of each individual i is
(20)fi=kFi;pi=fi∑j=1nfj,where K is the coefficient and N is the number of individuals in the population. Fi is the fitness value of individual i, and the smaller the better.


## 3.2.4. Crossover Operation

The crossover operation formula is as follows:(21)akj=akj1−b+balj,alj=alj1−b+bakj.Formula (21) means that chromosome K and chromosome 1 are interchanged at the same site J, and B is a random number between [0, 1].


## 4. Experimental Simulation Based on IGA-BP

In order to better verify the superiority of this algorithm and the help of the optimized algorithm to urban community planning, this study selects three examples of optimization effect compared with other algorithms.


### 4.1. Performance Comparison between IGA-BP and Other Models

First of all, I found the following optimization schemes from the community and compared them with different routes under each algorithm, as shown in Figure5.Figure 5
Optimal path optimization model.In order to better show the performance of IGA-BP global algorithm, the experimental part gives three global optimal algorithms for children’s game path selection in different communities in Figure5. The comparison of path selection performance of these three algorithms is intuitively shown, as shown in Figure 6.Figure 6
Path comparison under different algorithms.As can be seen from Table1, compared with BP algorithm and GA-BP algorithm, IGA-BP algorithm has obvious advantages in the whole position distance. Especially in time, the advantage is more obvious.Table 1
Comparison of distance under different communities.
AlgorithmBest (m)Worst (m)Avg (km)Time (ms)BP2015235421041354GA-BP1824204118571028IGA-BP157419311698895


### 4.2. Application of IGA-BP Network to Prediction of Children’s Play Environment

In this study, the data of the district central heating system in a community in China in the past few years were collected as training and prediction samples. Taking days as a unit, dozens of data were collected, and the middle segment function of Sigmoid activation function was selected and adopted, and these data were normalized, as shown in Table2.Table 2
Child environmental index in community area.
DataAverage wind speed (m/s)Average temperature (°C)Sunshine time (h)Environmental heat in the first three days (MJ/h)Environmental heat in the first two days (MJ/h)The environmental heat of the previous day (MJ/h)Ambient heat (MJ/h)15.5-75.77503.67461.27375.17283.521.9-96.37461.27375.27283.57046.432.4-8.56.47435.27283.67046.56837.141.5-76.172883.57046.56837.16720.452.2-66.47046.66837.16723.46657.762.5-5.566837.26720.56657.76578.171.8-55.46720.36657.66578.16687.280.9-24.36657.86578.16687.26234.792.2-74.86687.36234.86438.46782.1Because this paper adopts the intelligent optimization algorithm combined with BP neural network, the advantage is that it does not need historical data, and it needs the data of the first three days to predict the recent value. Therefore, in Table2, the environmental data of the first three days are listed.Next, the sample data is trained, and the BP algorithm and GA-BP algorithm are compared, and the following comparison charts are obtained, as shown in Figures7–10, respectively.Figure 7
Fitness of GA-BP network.Figure 8
Actual and predicted values of environmental heat of different algorithms.Figure 9
Comparison of absolute errors of different algorithms.Figure 10
Comparison of relative errors of different algorithms.It can be intuitively seen that the BP network algorithm optimized by improved genetic algorithm is smaller than the average relative error and average absolute error of a single BP network neural algorithm, so we can get that BP-AG algorithm has higher prediction accuracy than BP neural algorithm.


### 4.3. Analysis of Positional Relationship in Children’s Environment with IGA-BP Application

In this comparative experiment, different children’s game environments are set in different communities, so as to achieve the optimal value of environmental heat in different areas. Below, choose different community children’s play facilities environment as shown in Table3.Table 3
Overview of datasets.
CommunityAmbient heat (kW)Wind speed (m•s-1)Theoretical heat (kW • h)Wind direction (°)1380.04785.3113416.3289259.99492453.76925.6272519.9171268.64113306.37655.216390.9272.5647The parameters are described in Table3 such as wind speed and energy, which mainly evaluate the children’s environment effectively, so as to put forward relevant requirements for the setting and layout of children’s environment more effectively.On the basis of the data, we make a comparison between the two algorithms. First of all, we use BP algorithm to train and predict children’s environmental heat for many times, and the prediction effect is shown in Table4. Next, we use IAG-BP algorithm to predict, and the prediction results are shown in Table 5. Finally, we compare the prediction errors obtained by these two algorithms and get the prediction data in Table 6.Table 4
Prediction results of GA-BP neural network.
Serial numberTraining mean square errorPrediction average errorMinimum prediction errorMaximum error of prediction10.07130.15620.003680.317420.08240.22370.000281.060730.0640.15760.002980.7585Table 5
Prediction results of IGA-BP algorithm.
Serial numberTraining mean square errorPrediction average errorMinimum prediction errorMaximum error of prediction10.002240.06460.001240.130620.002250.06760.004670.136130.002280.05490.001050.1151Table 6
Comparison of algorithm prediction results.
Algorithm typeAverage time spent (s)Mean square errorAverage errorMinimum errorMaximum errorGA-BP4.370.062670.17620.006310.8296IGA-BP27.140.002260.06240.002310.1225According to the data in the above four different tables, compared with GA-BP algorithm, IGA-BP neural network prediction algorithm based on genetic algorithm has a significant improvement in prediction accuracy, and the maximum error is close to 0, which obviously proves that the optimized GA-BP model has absolute advantages in children’s environmental heat prediction. At the same time, the algorithm effectively improves the stability of the algorithm and reduces the fluctuation of prediction.


## 4.1. Performance Comparison between IGA-BP and Other Models

First of all, I found the following optimization schemes from the community and compared them with different routes under each algorithm, as shown in Figure5.Figure 5
Optimal path optimization model.In order to better show the performance of IGA-BP global algorithm, the experimental part gives three global optimal algorithms for children’s game path selection in different communities in Figure5. The comparison of path selection performance of these three algorithms is intuitively shown, as shown in Figure 6.Figure 6
Path comparison under different algorithms.As can be seen from Table1, compared with BP algorithm and GA-BP algorithm, IGA-BP algorithm has obvious advantages in the whole position distance. Especially in time, the advantage is more obvious.Table 1
Comparison of distance under different communities.
AlgorithmBest (m)Worst (m)Avg (km)Time (ms)BP2015235421041354GA-BP1824204118571028IGA-BP157419311698895


## 4.2. Application of IGA-BP Network to Prediction of Children’s Play Environment

In this study, the data of the district central heating system in a community in China in the past few years were collected as training and prediction samples. Taking days as a unit, dozens of data were collected, and the middle segment function of Sigmoid activation function was selected and adopted, and these data were normalized, as shown in Table2.Table 2
Child environmental index in community area.
DataAverage wind speed (m/s)Average temperature (°C)Sunshine time (h)Environmental heat in the first three days (MJ/h)Environmental heat in the first two days (MJ/h)The environmental heat of the previous day (MJ/h)Ambient heat (MJ/h)15.5-75.77503.67461.27375.17283.521.9-96.37461.27375.27283.57046.432.4-8.56.47435.27283.67046.56837.141.5-76.172883.57046.56837.16720.452.2-66.47046.66837.16723.46657.762.5-5.566837.26720.56657.76578.171.8-55.46720.36657.66578.16687.280.9-24.36657.86578.16687.26234.792.2-74.86687.36234.86438.46782.1Because this paper adopts the intelligent optimization algorithm combined with BP neural network, the advantage is that it does not need historical data, and it needs the data of the first three days to predict the recent value. Therefore, in Table2, the environmental data of the first three days are listed.Next, the sample data is trained, and the BP algorithm and GA-BP algorithm are compared, and the following comparison charts are obtained, as shown in Figures7–10, respectively.Figure 7
Fitness of GA-BP network.Figure 8
Actual and predicted values of environmental heat of different algorithms.Figure 9
Comparison of absolute errors of different algorithms.Figure 10
Comparison of relative errors of different algorithms.It can be intuitively seen that the BP network algorithm optimized by improved genetic algorithm is smaller than the average relative error and average absolute error of a single BP network neural algorithm, so we can get that BP-AG algorithm has higher prediction accuracy than BP neural algorithm.


## 4.3. Analysis of Positional Relationship in Children’s Environment with IGA-BP Application

In this comparative experiment, different children’s game environments are set in different communities, so as to achieve the optimal value of environmental heat in different areas. Below, choose different community children’s play facilities environment as shown in Table3.Table 3
Overview of datasets.
CommunityAmbient heat (kW)Wind speed (m•s-1)Theoretical heat (kW • h)Wind direction (°)1380.04785.3113416.3289259.99492453.76925.6272519.9171268.64113306.37655.216390.9272.5647The parameters are described in Table3 such as wind speed and energy, which mainly evaluate the children’s environment effectively, so as to put forward relevant requirements for the setting and layout of children’s environment more effectively.On the basis of the data, we make a comparison between the two algorithms. First of all, we use BP algorithm to train and predict children’s environmental heat for many times, and the prediction effect is shown in Table4. Next, we use IAG-BP algorithm to predict, and the prediction results are shown in Table 5. Finally, we compare the prediction errors obtained by these two algorithms and get the prediction data in Table 6.Table 4
Prediction results of GA-BP neural network.
Serial numberTraining mean square errorPrediction average errorMinimum prediction errorMaximum error of prediction10.07130.15620.003680.317420.08240.22370.000281.060730.0640.15760.002980.7585Table 5
Prediction results of IGA-BP algorithm.
Serial numberTraining mean square errorPrediction average errorMinimum prediction errorMaximum error of prediction10.002240.06460.001240.130620.002250.06760.004670.136130.002280.05490.001050.1151Table 6
Comparison of algorithm prediction results.
Algorithm typeAverage time spent (s)Mean square errorAverage errorMinimum errorMaximum errorGA-BP4.370.062670.17620.006310.8296IGA-BP27.140.002260.06240.002310.1225According to the data in the above four different tables, compared with GA-BP algorithm, IGA-BP neural network prediction algorithm based on genetic algorithm has a significant improvement in prediction accuracy, and the maximum error is close to 0, which obviously proves that the optimized GA-BP model has absolute advantages in children’s environmental heat prediction. At the same time, the algorithm effectively improves the stability of the algorithm and reduces the fluctuation of prediction.


## 5. Conclusion

After understanding the functions of these algorithms, the improved BP neural network based on genetic algorithm proposed in this paper is more superior to other algorithms and can make urban construction planning more reasonable in many aspects, such as climate prediction and power grid planning. According to the above three experimental simulation results, the AG-BP algorithm is more powerful and has achieved good results in practical application. Nevertheless, artificial intelligence is still not very flexible, so there are still many problems that need further improvement, so we will not repeat them in this study, but I believe that in the near future, the algorithm will get better development.



---

*Source: 6283481-2022-04-30.xml*