Garden Alive: an Emotionally Intelligent Interactive Garden

— In this paper, we introduce the “Garden Alive” system that allows users to interact with an emotionally intelligent virtual garden by manipulating tangible user interfaces. The Garden Alive aims to provide both entertainment and education. The proposed system is composed of three components. In the first module, tangible user interfaces bridge to the garden in a virtual world. In the second module, an artificial intelligent module consists of two sub-modules: an evolution module and an emotion module. The third module is the virtual garden, which displays growth and the reactions of virtual plants. As for the user interfaces, user’s hand gestures are recognized by cameras, the amount of light measured by light detection sensors, and the position of water detected by water detection sensors. Based on this sensed information, the artificial intelligent module determines the evolutionary direction of the plants and changes their emotional state. Our Virtual Garden has adapted the L-system [12] so the virtual plants grow in a similar manner to real plants. In this proposed “Garden Alive” system, there are several kinds of plants and each has different genes that is to individually unique. So we can observe plants evolving for generations by evaluating a proposed fitness function. Finally, we implemented intelligent plants which show emotional reactions according to interaction with the user, instead of simply reacting to stimulus. Therefore, the proposed system is applicable for use to both entertainment and education.


I. INTRODUCTION
Recently, the number of research activities to support seamless interaction between the real world and the virtual world have increased [1,2,3]. The advantage of connecting the real world and the virtual world is that it is possible to get rich and useful resources of the virtual world in the real world. Furthermore we can increase the interest of people by providing an experience that is difficult to get in the real world. The related representative works in the field are "Interactive Plant Growing" [4] and "A-Volve" [5]. In the "Interactive Plant Growing," users can experience the growth of the plants in the virtual world by using hands with touch actions. In the A-Volve, users are able to interact with virtual artificial creatures that live in an aquarium of the real world. These works focus on seamless interaction but are limited by insufficient response: they show the simple reaction of growth, without considering additional properties (e.g. environment conditions, Manuscript Received on December 3, 2006 This research is supported by the UCN Project, the MIC 21C Frontier R&D Program in Korea and ICRC at GIST Both are with GIST U-VR Lab, Gwangju 500-712, S. Korea, {tha, woo}@gist.ac.kr relationships between virtual objects. etc.). Moreover it is necessary to adopt more intuitive and comfortable interfaces to provide more natural and seamless interaction.
To overcome the above problems, we propose the "Garden Alive" system in which users can experience an intelligent garden in the virtual world through various interactions. This system is composed of tangible user interfaces, an artificial intelligent module and the virtual garden. First, we used three kinds of tangible objects: the "watering pot" for supplying water to the plants, the "nutrients supplier" for promoting plant growth and the hand gestures for interaction with the plants as an additional user interface. Second, the intelligent plants adapt to the environment by evaluating a proposed fitness function and through crossover or mutation of superior plants. Also we applied the simplified A-S emotion model to change plants' emotions according to the preference and behavior of the users. Therefore the plants show various reactions to stimuli rather than simply showing fixed reactions. Therefore, the proposed "Garden Alive" has the following advantages. First, we can intuitively interact with the artificial plants of the virtual world using various tangible user interfaces. The use of the watering pot, user's hand and the nutrients supplier make it easier for users to identify the purpose of the interface and the method of control. Second, it can be helpful for educational purposes because users can evaluate what environmental conditions can affect plant growth, since we can observe the response of plants with respect to the user's input. Also we can observe various kinds of plants with different genes growing according to the evolution of generations using a genetic algorithm. Finally, we can see the emotional change of the virtual plants based on user's interaction which maximizes user interest. Moreover, it can also express emotional sympathy to the users. This paper is organized as follows. In Section 2, we introduce the components of the proposed "Garden Alive" system. In Section 3, we explain details of artificial intelligent module. In Section 4, we describe the implementation of each component. In Section 5, we evaluate and discuss the results of our usability test. Finally, we present conclusions and future work.

II. "GARDEN ALIVE" SYSTEM
Our proposed system is composed of a "tangible user interface," an "intelligent module" and a "virtual garden." The intelligent module is divided into two parts. The first part deals with environmental adaptation and evolution, and the second part involves the emotions of the plants and behavior related to emotions.

Garden Alive: an Emotionally Intelligent Interactive Garden
A. User interfaces in the real garden

1) Design of the real garden
The virtual environment is divided into two parts based on the features of the surface, such as the ground and the underground. The surface of the real garden corresponds to the border of the ground and the underground. Users can see how roots are growing in real time by raising the real garden over the surface. This experience is generally difficult to feel in the real environment but it is possible in the virtual world, providing interesting and educational information easily to users.

2) Tangible user interfaces
The tangible user interfaces are easy to use because they allow users to intuitively identify how to use and manipulate the tangible user interface. As shown in Fig. 1, we design the tangible user interfaces as the watering pot, the user's hand and the nutrients supplier in the "Garden Alive" system. Using the "Watering pot," we can water the garden in the real world which creates the same effect in the virtual world garden, promoting root growth. If users cast a shadow by covering the real garden with their hands, then clouds are generated in the virtual garden and the virtual plants under the clouds may continue to grow but cannot make new leaves. The nutrients supplier consists of phosphoric acid as a stem fertilizer, nitric acid as a leaf fertilizer and kali as nutrients for roots. Each nutrient influences growth in different parts of the plant.
3) Hand gestures Furthermore, for more natural interface, users can interact with virtual plants using their hands. We defined the various meanings according to hand gestures. Four kinds of hands gestures can be recognized. For example, the users are grabbing of the nutrients supplier, called the plants to grow. In the second hand gesture, the spread of the hand indicates 'touching' and causes plants to weave. The third gesture is a butterfly shape using two hands. This induces the plants to play with friends. Lastly, holding all fingers together means covering the light from the sun and then plants in the virtual environment will wilt.

B Virtual garden
In terms of time, a day of the virtual garden is set-up based on the system time unit of the computer. During a day, the sun is moving from east to west and the color of the lawn on the ground changes from a bright color to red or a darker color to represent morning, afternoon and evening. For example, the color of the lawn is red in the early evening.
The garden in the virtual world is made of trees and plants as shown in Fig. 8. The three key components are the "environment," the "plants" and the "nutrients." The environment is composed of the sun, water, clouds, rain and a rainbow. Furthermore, there are a fixed number of plants in the population and the same numbers of the plants are reproduced in the next generation. Each plant has three objects: leaves, stems and roots. These three objects reproduce each other continuously according to the rule of "L-system" [12] so it grows like a real plant. Also the properties of each object (e.g. leaves, stems and roots) depend on the gene type of the plant and are influenced by the environment. For example, if leaf nutrient is applied to a specific area, then the plants around that area can have darker colored leaves even though the plants have the gene for light colored leaves. Also, plants decide the growth direction of the stem and the root based on the position of the sun and water. For example, if the sun (e.g. light source) is positioned to the right side of the virtual environment, the stem turns to the right.

III. ARTIFICIAL INTELLIGNET MODULE
Conventional content shows only fixed reactions to stimulus, rather than various reactions. "Garden Alive" provides more interest to users through the various reactions of plants. The intelligent modules are divided into two parts. The first part deals with adaptation and evolution, and the second part involves emotions and behavior.

A. Adaptation and evolution of plants to the environment
In this module, plants adapt and evolve to a given environment. Through this, we can learn directly and understand intuitively the effects of properties (e.g. light, water, nutrients supplier) which influence the growth of the plants. To implement this, our system uses a genetic algorithm [7], which enables plants to adapt and evolve according to the environment. Specifically, the dominant chromosome of each entity is partially combined with genes by crossover. Also new entities have chromosomes which are altered by a mutation process. The entities prosper selectively in the environment according to the degree of adaptation.
A generic algorithm defines the specific number of entities as population. A part of a chromosome is called a gene and it is a minimum unit. In this system, variables represent genotypes of the plants and are expressed by float numbers from x a to x e .
The phenotype is the observed properties of the plants, i.e. the physical representation of the plants. We define the width and the color of the leaf, the growth rate and thickness of the stem, as shown in Fig. 8.
We decide the genotype and the representation of the chromosome, and then we solve "Function Optimization Problem." [8] This is to find the value of variables for a given function which maximizes or minimizes the value of the function. We define the fitness function.
This equation reflects the relationship between the environment and the genotypes of the plants. Each coefficient ranges from 0.0 to 1.0 and the ideal maximum value of the function is 5.0. The descriptions of coefficients and variables are explained in Table I. Each coefficient is the reciprocal of the relative distance to the light source, water, phosphoric acid, nitric acid and kali. This means that if the location of the plants is close to the light source, water, phosphoric acid, nitric acid or kali, then the fitness evaluation value may be higher than before.
For example, the higher value of the "C a " means that the light source is closer to the plants, and as a result they will produce more photosynthate. If both C a and x b are increased, then the fitness evaluation of the plants is also increased since the multiple relation of the variable "C a " and coefficients x a, ( x a, : means the width, colors of leaves).
After evaluating the fitness value of all entities, it is ordered from high value to low value. Individuals in the upper range are superior or dominant individuals. Dominant individuals are able to pass on their genetic information to the next generation continuously. Other individuals continue to process the crossover and mutation of genes. In our research, there are 20 plant objects, with dominant plants making up 20% and mutated plants making up 25%. The next generation is produced through cross-over after regular world time-tick. These new entities are generated around the position of the previous generation (e.g. parent plants) as shown in Fig. 9.

B. Emotions and behavior of plants
Up to this point, we have focused on explaining the adaptation and evolution of the plants to the environment. Now we will describe the complex and interesting reactions of intelligent plants to artificial emotion. The overall process is shown in Fig. 10.
The intelligent plants are equipped with an artificial emotion module which represents various reactions based on the relationship between the performer's preference and behavior preference in the home environment. Firstly, assuming the concept of tension (perception distance), the shorter distance between the performer and the garden, the performer's preference is closer to the preset value. This preference value is computed through the distance from the current user's location to the garden in the home environment. The performer's preference ranges from 0.0 to 6.0. For example, if the user is standing in front of a door, then it can be the farthest distance. It is assumed that plants can not perceive the performer, and in that case the performer's preference is set to 3.0 because it is mid value of performer's preference ranges. If the user approaches to the plants and he or she interacts with plants, the performer's preference is updated by how the user treats the plants. Secondly, behavior preference is calculated when the user interacts with the garden in front of it. For example, if several nutrients and enough water are supplied to plants, then the behavior preference gets higher. Simultaneously, the performer's preference is updated based on the current behavior preference. These two kinds of preference are input using fuzzy logic to infer the emotion of the plants. There are 5 types of inferred emotions (very bad, little bad, normal, little good, very good) and the highest emotion value (membership value) among them is selected. By using fuzzy logic, we can define various emotion statuses rather than a simple good/bad status. This paper suggests membership functions as shown in Fig. 11. Fig. 11 (a) is the behavior preference and Fig. 11 (b) is the performer's preference, and then a fuzzy associative matrix (rule) is defined as in Table 2.
We have defined set (membership function) and rule (fuzzy associative matrix). Then the degree of membership should be defined to reflect the relation of the two variables. The degree of membership is defined as following Equation (2).
If behavior preference is 2.3 and performer's preference is 3.8 in the Fig. 11, each value is contained in two triangles. Considering two sets (e.g. behavior preference and performer's preference), there are four kinds of degree of membership that can be obtained, as shown in Table III. This step is called the inference process.   Bp () is the behavior preference, and Pp () is performer's preference and I() is inference result. In each case, the degree of membership is obtained by computing the minimum value (intersection) of two sets.
Next, we can obtain the final value of emotion by a composition process. However the behavior of the plants can sometimes be unnatural because the selected emotion is inferred for a short period of time and differences of value might be irregular. To compensate for this, the results are applied to the emotion model [9], and we simplify and refine this to have 2 dimensions and 29 kinds of emotion.
This emotional state transition diagram is represented in two axes. Strong and weak emotion are represented on x axis and good and bad emotion are represented on y axis. Also transmission methodology [10] enables the gradual transition of the current emotional state, which reflects irregular or sensational emotional variation.
The gradual emotional transmission model is composed of "emotion," "mood," and "personality." The mood is computed from the emotion: if this mood lasts some time then the personality is formed by the mood. Finally, the behavior of the plants is determined according to the current feeling value of the plants. If the plants feel better, the leaves lift and get brighter, as shown in Fig. 12 (a). Otherwise, leaves fade and get darker, as shown in Fig. 12 (b). The display device is used to represent the garden in the virtual world. The real garden is set in front of the display device.
We attached the light detection sensors on each side of the garden in the real world. These sensors can identify where the intensity of radiation is focused by using a photoconductive cell.
This photoconductive cell has low resistance under sufficient lighting conditions, and low voltage is obtained under insufficient intensity of lighting. Also we arranged water detection sensors in the bottom of the real garden, and detected where water is currently distributed. These water detection sensors exploit the property that electric currents flow well in water.
If water flows into the real garden, then water is gathered quickly in a funnel. At that time, high voltage value is detected in the signal line. Then, we converted the analog data (e.g. 0.0V~5.0V) of sensors to the digital data using a microcontroller named ATMEGA8 [13]. This microprocessor converts the data of 10bit data shift to 8bit in order to facilitate serial communication. If the central computer sends the sensor ID to the micro controller then the micro controller sends the sensor value. Also, in order to detect the position of the nutrients supplier for the growth of the plant, we assigned a specific color patch to each nutrients supplier.
Firstly, we received the RGB signals from a USB camera attached to the top of the display device, then color segmentation is processed through the double thresholds operation and the labeling processing (e.g. flood fill algorithm [14]) only in the ROI (Region Of Interest). The ROI is set to contain the entire garden (e.g. green color) in order to reduce the redundant image processing. Finally we locate the center position of the object by calculating moments [14].
The method of hand object segmentation from the real garden is referenced from the paper [15]. In order to recognize the hand postures, our method uses the invariant feature values of the hand object moment. For this, the general geometric moments are recalculated to the central geometric moments in order to get the invariant property with respect to the coordinates, and then the central geometric moments are converted to the 7 invariant moments (e.g. Hu moments) which are suggested by Hu [16]. The hand objects are invariant on the translation, rotation and scaling so the feature values are represented well. In the current frame, the Euclidian distance of the invariant moments between the hand objects and each template objects is computed and obtain the summation of these moments. If the value is below the specific value, then the hand postures are recognized. The data obtained from the sensors and the image processing is used to change the positions of clouds, water and nutrients supplier of the garden in the virtual world.
We implemented the virtual garden using a "Flash action script [17]" and connected "Flash active X component" for communication between the flash program and the window program which are running independently. It is enabled by the OLE (Object Linking Embedded) format. The messages are birth, growth, death, position change and property change of the plants. These messages are parsed every 10ms and then the corresponding action function is called by using the flash action script.

V. APPLICATION SCENARIO AND TEST BED
This work is targeted for the home environment where the typical family members are a father, mother and one child. As suitable content in the mediated reality display of the home, a garden was chosen because it will not display social rejection, but rather provide a feeling of intimacy.
The display device represents a virtual environment in the real environment. From the view point of interaction, the "Real Environment" is the home environment, the " Human" stands for residents in the home, and the " Artificial Life" is the virtual environment in the display device, and in our scenario these three elements interact with each other.
Let's examine how interaction occurs between the residents in the home and the plants in the virtual environment in our scenario.
In the first step, the mother in the family has a positive feeling to the plants, with the value of 5.1, in the range of 0.0(minimum) to 6.0 (maximum). In the beginning, the mother is standing in front of the door. In this case, the behavior preference is mid value 2.0 in the range of 0.0(minimum) to 4.0 (maximum) because the distance is too far for the performer to interact with the plants. Also the mother's preference is 3.10 because we assume that plants cannot perceive the performer because the distance is too far. This value is close to the mid value (e.g. 3.0). In this case, the result of fuzzy inferences is that the normal and emotion state is stable.
In the second step, the mother is now closer to the garden but the distance is not close enough to affect to behave of the plants. Thus, behavior preference is also mid value 2.0 and performer's preference is close to the initial value 5.1 of the preference. In this case, the result of fuzzy inference causes a 'little good' (e.g. positive emotion) result. Also the emotional state is changed to little positive value.
In the third step, finally the mother is in front of the garden. In this case, the preference of behavior is computed. The mother supplies all nutrients suppliers to the real garden. Thus, as the preference of behavior gets higher, the mother's preference is also updated. The result of fuzzy inference is very good; the emotion state is directed to strong positive. Here, if the mother interacts with plants by hand, then plants react according to their own emotions. In this case, the leaves are bright and upward because the plants are in a very positive state In the fourth step, if the mother displays bad intentions by removing the all nutrients suppliers from the real garden, then the behavior preference gets lower and the performer's preference also gets lower. In this case, the result of the fuzzy inference is 'little bad' (e.g. negative emotion) and the leaves fade and get darker.

VI. EXPERIMENT RESULTS
The proposed system was compared to the existing educational program called "Garden with insight" [11] for the usability test. For evaluation of the proposed system, 10 participants aged in their twenties and with sufficient computer skills were selected. Two evaluation criterions were measured: the time taken to learn the program, and the control time. We also evaluated the degree of satisfaction to natural interaction for each system and interactivity of the content. Table V shows the result of comparisons.
Many experiment participants expressed inconvenience about the complex setup and the control steps of the "Garden with insight program" Even though they were familiar with the computer usage, it took 2 to 4 minutes to learn how to use the program and 2 minutes to control the content. However, in the "Garden Alive" case, most subjects could control the content intuitively without reading the manual.
We observe that the satisfaction about interactivity is higher when we used the proposed tangible user interfaces in this system rather than the keyboard or the mouse in the "Garden with insight." Also the existing system mainly focused on showing the content of plant growth and it was difficult to Fig. 13. Emotional state transition diagram experience reactions directly, but the "Garden Alive" system has more interesting content because it incorporates interesting aspects such as the evolution process, and the adaptation to environment and artificial emotion. In this paper, we presented "Garden Alive," the emotional intelligent virtual garden with the tangible user's interfaces. From the presented Garden Alive, users experience excitement and emotional interaction which is difficult to feel in the real garden. Moreover, users can interact naturally with the virtual garden by exploiting the tangible user interfaces. The use of the tangible user interfaces, such as the watering pot, the user's hand and the nutrients supplier made it easier to identify the purpose of usage and method of control. In the virtual garden, we could observe the various kinds of growing plants which have different gene types according to generational evolution. We could also observe changes of emotion reflecting the user's interaction, where the intelligent content can provide emotional feedback to the users. We believe that the proposed system is applicable for both entertainment and education.