An intelligent agent of finite state machine in educational game “Flora the Explorer”

Game simulation-based education is designed to simulate the existing problems in order to obtain knowledge that can be used to solve the problem. Simulation games with educational purposes can be used as a medium of education that has the learning patterns of learning by doing. Based on the pattern which is owned by the game, players are required to learn in order to solve existing problems. In making the educational game “Flora the Explorer Introduction to Plant with Android-Based Finite State Machine”. Applications used in making the game is Swish max4 and the shuffle algorithm random expected this game does not become monotonous, and players cannot remember the position of the bubble in the game, then the game agent using the Finite State Machine (FSM), the game agent will give notice to when the players answer wrong or right in the game


Introduction
Game education is very attractive for development. There are several advantages of educational games compared to conventional educational methods. One of the main advantages educational games is a visualization of the real problems [1][2][3]. Simulation-based educational game designed to simulate the existing problems in order to obtain knowledge that can be used to solve the problem [3,4].
Therefore, in this study will apply the educational game "Flora the Explorer" learning to know the types and benefits plants. This study uses a randomization algorithm position (shuffle random). That the game is not monotonous and not easy to guess about the matter will be given later. In this game gaming agent (intelligent agents) will provide an action-reaction, observing, and acting in a condition so it looks like yourself, in this game any action or activity built by agents to meet the environmental conditions. So here the game agent will be implemented by the method of Finite State Machine (FSM), which the FSM is a methodology designed control system that describes the behavior or the working principle of the system [5] using the state, events and action [5,6], Game agent involved in the form of an animated expression and commenting on every move the player. If one of the players step animated expression and remarked in a tone of disappointment, anger, anxiety, and vice versa. Contribution of this research, we combine the AI in the game to make this flora education game more interactive in the process of learning.

Literature Review
Research on games with the same technique has been done before, namely: 1. Appraising Emotional Events During A Real-Time Interactive Game [7] A game that made implementing the method of Finite State Machine into the game agent. FSM method used to describe the expression of facial animation in commenting on the player steps. The research objective is to create an intelligent agent can determine the expression and commentary should be done by an animated face and apply a series of game management "word". A similar study, where AI is used in facial emotional game agent 2.

Fuzzy Coordinator Based Intelligent Agents For Team Coordination Behavior in Close Combat
Games [8] Development of Finite State Machine (FSM) has also been researched done on a different genre game, that action game, where the FSM combined with fuzzy logic, to produce the agents' behavior is not predictable in the game fighting game genre. 3. Implementation of Decision Tree Algorithm on Game Agent of first aid Educational Game [9] This is a research development of drag and drop game type games, designed to provide learning how to heal an injured patients. The shuffle random was applied in this study, with the aim of making the composition of injured patients invariably scramble. They are also using the decision tree modeling method in a game agent characters that will accompany the child to play like a real patient. Whereas in this study, Edugame "Flora the Explorer" Plant Introduction Learning Media with a random shuffle Scrambling Technique and Game Development agent with a model of a finite state machine (FSM). Games that hone the player's ability to think quickly locate the appropriate number of fruit or vegetables a given mission, fruit or object in this game were randomized using a random algorithm random shuffle positions so that the game is not static and boring. Games that will be built also apply finite state machine, child's play will be replaced by the presence of the agent game. Game agent is a funny game character controlled by intelligently using the model finite state machine logic thinking accompany children to play as a playmate

Game Agent (Intelligent Agent)
In artificial intelligence, intelligent agent is an autonomous entity which observes and act on the environment, which requires agents and directs its activities to achieve the goal of rational [10,11]. Intelligent agents can also learn or use knowledge to achieve their goals. Intelligent agents must demonstrate the following characteristics [6,12]: 1. Being able to analyze their own in terms of behavior, error and success. 2. Learn and improve interaction with the environment (embodiment). 3. Learning quickly from large amounts of data.
From these characteristics can be concluded that the agent is a function that can provide an action in such condition that looks like itself in determining a course of action or decision in carrying members of his functions in an autonomous entity which observes and act on the environment [11,13].

Finite State Machine (FSM)
Formal language can be seen as an abstract entity, is a set of strings particular alphabet symbols. But language can also be seen as abstract entities that can be identified or generated by a computing machine. Machines that can recognize the language of this class is a Finite State Machine [14]. There are several definitions of Finite State Machine (FSM) or often also called Finite State Automata (FSA): 1. FSM is defined as a computing device that has inputs and outputs in the form of a string which is one of two values that can accept and reject. 2. Finite Automata is a mathematical model system with discrete inputs and outputs. The system can be in one of a finite number of internal configuration called a state. FSM is a control system design methodology that describes the behavior or the working principle of the system by using the following three points: state, event and action [5,6]. The system may move or transition to another state if gets feedback or specific events, both coming from external devices or components in the system itself. The state transitions are generally also accompanied by actions taken by the system when responding to input happens. The action taken can be a simple action or involve a relatively complex set of processes.

Research stages
A multimedia development methodology consists of six stages, namely the concept, design, material collecting, assembly, testing, and distribution [15]. Sixth stage cannot be swapped positions. Even so, the concept stage must be the first thing to be done. Multimedia development stages include [16]: Stages concept (concept) is the stage for the purpose and who the users of the program (identification audience). The purpose and the end user effect on the nuances multimedia program as a reflection of the identity of organizations that want information to the end user. User characteristics include the ability of users also need to be considered because it can affect the design.
In addition, this phase will also determine the type of application (presentations, interactive, etc.) and the purpose of the application (entertainment, training, learning, etc.). Basic rules for design are also determined at this stage, such as the size of the application, the target, and others. The output of this stage is usually a narrative document to reveal the project objectives to be achieved.

Design
Design is a specification of the manufacturing phase of the program architecture, style, appearance, and material requirements / materials for the program. Specifications are made as specific as possible so that the next phase of collecting materials and assembly, the new decision makers are no longer needed, simply use decisions that have been determined at this point [17]. However, in practice, project work in the early stages they will often have additional ingredients or the reduction of parts of the application, or other changes.

Materials Collecting
Collecting material is the stage of collecting material that fits the needs done. These materials, such as clip art images, photographs, animations, video, audio, and others that can be obtained free or with reservations to the other party in accordance with the design [16]. This Stage can be done in parallel with the assembly stage. However, in some cases, the stage of collecting materials and assembly phase will be done in a linear and not parallel.

Assembly
Assembly stage is the stage of making all objects or multimedia materials. Making an application based on a design stage, flowcharts, and / or navigation structure.

Testing
Testing stage is performed after completing the stage of manufacture (assembly) to run applications or programs and see if there is a mistake or not [18]. The first stage in this phase is called the alpha testing stage (alpha test) [4] the testing done by the manufacturer or the manufacturer's own environment. Having escaped from alpha testing, beta testing involving the use of the final will be made.

Distribution
At this stage, the application will be stored in a storage medium. If the storage media is not enough to accommodate the application, compress against the application process will be conducted [19,20]. This stage also called the evaluation phase for the development of the finished product in order to become better. The results of this evaluation can be used as fill for the product concept phase hereinafter.

Application Concept
In making the game "Flora the Explorer" all concepts ranging from the concept of educational games flora the explorer's name recognition plants Unified Modeling Language (UML). There are 3 diagrams used in this system is Use Case Diagram, Activity Diagram, Sequence Diagram and up to the design. 1. Use Case Diagram Educational game "Flora The Explorer"Designing a use case diagram will illustrate how the player interacts with the use case in the system. Figure 1 is a description of use case diagrams. To learn more about the process of a system used diagram Activity Diagram. With this diagram Activity diagram can be seen that occur in the application process. 1) Learning Activity Diagram Educational game "Flora The Explorer".
Chronology of the activity that occurs when the player chose the "Learning" in the main menu. Figure 2 shows, when player selects "Learning", then the system will immediately display the scene "Learning" and choose categories of material they want to learn. After that players can begin to learn about the 10 names of plants.  The activity that occurs when players choose "Play" on the main menu. Figure 3 shows, when players select "Play", the system will automatically display a menu of play, if the player chooses started playing, the system will display the first stage game. If a player has won the game's first stage then it will go to the win scene and get 1 star but if not successful will enter the scene to lose and do not get a star. If the player manages to win the first stage game players can choose further at the next stage up to stage 10 and win and get 10 stars, but if not managed to win up to stage 10 players will enter the dining scene lost.  Figure 3. Activity diagram play

Concepts Finite State Machine (FSM)
FSM is a control system design methodology that describes the behavior or the working principle of the system (gaming agent) by three things: the state, events, action. Figure 4 shows design of finite state machine model.   Where: A = Character (gaming agent) Homing "Standby /Waiting". B = Character (gaming agent) "True". C = Character (gaming agent) "Happy". D = Character (gaming agent) "Wrong" E = Character (gaming agent) "Upset" F = Character (gaming agent) "Lost" G = Character (game Agent) "Wins" In figure 4 shows that each of the conditions that exist in the game agent, resulting from the action of the player will cause the displacement state in the FSM. The action given the player will determine what will be done by the agent game.

Result and Discussion
Results of implementation based on the analysis and design are as follows: 1. Assembly Finite State Machine "Flora The Explorer Introduction to Plant FSM is a control system design methodology that describes the behavior or the working principle of the system (game agent) by three things: the state, event, action. Any conditions that exist in the game resulting from the action of the player agent will cause the displacement state in the FSM. The action given the player will determine what will be done by the agent game. Figure 5 shows, In this educational game, there are seven characters FSM, the character homing or silent, true and happy character which will appear when the player answered the game correctly, incorrect character and annoyed that will appear when the players answer wrong game, and character wins   As seen in Figure 6, are the name or title of educational games "Flora The Explorer Know Plant Name". Each scene button on the main menu has the function of each, when we click the button to learn it will display the scene to learn, when we click the play button it will show the scene to play, and when we click the button out then the game will exit the application.

Display Scene Study
In figure 7 Scene Learning is a scene where the player can select a category and learning materials to be studied, making it easier for players to complete missions given in the scene play later.    figure 9 and 10 Scene Play is the scene where players play by completing the mission in accordance with the question before the closing time, the player must complete ten stages with the provisions of the player is not allowed to fail in completing the game on any stage, if it fails then the player must repeat the game from first stage.   Figure 10. Scene play Each stage will provide a mission to find fruits and vegetables at random. Player must be keen on finding a number of fruits and vegetables as instructed missions. These objects will appear alternately at random turns, so the location of the appearance of every object cannot be memorized. This makes the game monotonous and boring

Scene Display Stage
In figure 11 is the Stage scene where the player can start the game from stage 1 or choose the stage when the game resumed.

Scene display Failed
In figure 13 Scene fail scene that will show the final result or outcome of the stages that are already resolved.

CONCLUSION
Educational game concept "flora the explorer" introduction to plant names is a game or educational game that can help children to know the names of plants as well as spelling, which were made educational game that is multimedia. This educational game uses randomization algorithm or a game object's position can be called shuffle random which serves to randomize the object with the aim that the player is unable to remember the location of objects in the game. This educational game implementing game agent (intelligent agents) are using Finite State Machine. With the benefit that the play is not static or boring, and can entertain the user when playing this game. Presenting ¬game agent as a companion character children to play. Finite State Machine is applied to the game agent, make a funny character in the game can interact reason of actions and reactions of the players play style. This makes the game more interactive education of children. We suggest for future work, "flora the explorer" can use another method is like moore machine, neural network, or combination probability with finite state machine to make the game agent more interactive.