A Rule-Based Expert System for Pest Control in Maize Plant

Maize crop ( Zea Mays ), also known as corn, is the most widely cultivated plant and popular cereal grains in Nigeria that had found its usage in every home either as food for human beings or feed for animals, and importantly, raw material for food processing industries. It grows across a range of agro-ecological zones in Nigeria. The incidence of crop pest had been one of the major challenges faced by the farmers, resulting in low yield of crop production, both in quality and quantity. Another major challenge is that majority of farmers lack key knowledge in identifying plant diseases. Awkwardly, such knowledge typically resides within a few experts and is not easily accessible to farmers. Farmers initially necessitate to useful advices for diagnosing the various pests and diseases confronting the crops, before being able to implement a suitable treatment or control measures. To make this knowledge more widely available, a rule-based Expert System (ES) was designed and implemented in this paper. The ES comprises of a diagnosis system that detects pest in maize plant; an information system that gives facts about maize and pests, with their control measures; and finally an expert advice on maize plant cultivation. To make the system more user-friendly, an image database was integrated with it. The system was developed using HTML, CSS, JavaScript, PHP and Bootstrap. The application can supply information on 17 pests that affect maize plant in Nigeria, and their respective treatments.


Introduction
The agricultural sector plays a crucial role in the overall development of any nation. In Nigeria particularly, majority of the population is dependent on this sector. According to Financial watch, Nigeria, this sector contributes about 24.18 percent of Gross Domestic Product (GDP) and has reduced the unemployment rate of the economy of Nigeria (Financialwatchngr.com, 2016).
Maize crop (Zea Mays), also known as corn, is the most widely cultivated plants, popular cereal grains in Nigeria that had found its usage in every home, either as food for human beings or feed for animals and importantly, as raw material for food processing industries. It grows across a range of agro-ecological zones, although it is grown slightly more in the Northern part of the country. Two types of maize are grown in Nigeria; the yellow and white varieties. Due to its rate of adaptability, maize is not a seasonal product. Some of the major producing states in Nigeria includes, Bauchi, Borno, Yobe, Gombe, Kebbi, *Corresponding author: +2348034300543 Email address: basiratabdusalam@gmail.com Jigawa, Adamawa, Taraba, Plateau, Sokoto, Katsina, Nasarawa, Niger and Zamfara. According to the report from the World total cereal production in 2012, maize was the first, important cereal in Nigeria, followed by Sorghum and Rice (Adesoji, Abubakar and Labe, 2016). Africa produced 7.9% of the world's total from 34.7 million ha. Nigeria which came second after South Africa in Africa produced 8.7 million ha from 5.7 million ha which represented 1% of the world's total in 2012. Nigeria's production is very low compared with 273.8 million tonnes produced by USA in 2012 (Adesoji, Abubakar and Labe, 2016). The study in Savanna zone of Nigeria showed that over 70% of the maize production in the country has been from the Savanna region (Uyovbisere, Elemo and Tarfa, 2001).
However, maize production is constrained by susceptibility to diseases, and attacks from vertebrate pests. These pests are resurging and they cause serious yield losses on maize farms. The reduction in the crop's yield in turn affects returns accruable to the maize farmers. Generally, the incidence of crop pests had been one of the major challenges faced by farmers, and this present a negative impact in the quality and quantity of crop production. The costs of controlling the pests add to the cost of production, thus, reducing the gross margin and the Gross Domestic Product (GDP) of the economy. Moreover, some farmers lack knowledge on how to identify exact disease on crops. In dealing with this, they initially necessitate to useful advices for curbing the menace of crop pests and diseases, before being able to implement a suitable solution. On the other hand, farmers undertake a prolonged period of time to acquire appropriate advice for conducting the suitable treatment or control, due to issues of human resource and knowledge. Besides, with inappropriate and perhaps misleading advice gained by farmers, it might escalate to the use of harmful substances such as pesticides without having regards to the pesticides proper use and protocol and subsequently leading to matters like environmental pollution. The need to address these problems led to the motivation behind this work. So, to fit the basic strategy of "Prevention is better than cure", we try to solve the logic reasoning of Crop disease diagnosis through the use of Computer Technology, and taking this chance, we discussed the problems of realizing the crop disease diagnosis through the use of Expert Systems (ES).
The advancement in technology had made people to embrace computer-based methods. Major initiatives to improve the quality, quantity, and timeliness of agricultural products are improving all over the world with the integration of ES into the agricultural sector. One of the ways this is been achieved is through the application of Artificial Intelligence (AI) techniques. According to Poole et al, (1998), AI is the study and design of intelligent agents; a system that perceives its environment and takes actions that maximizes its chances of success. The advances in the field of this study have led to the emergence of ES; a computer system that performs a task that would otherwise be performed by a human expert (Qu, Tao, and Qui, 2008). ES are designed to solve complex problems in a particular field by reasoning like an expert in that field. While some ES are designed to take the place of human experts, others are designed to aid their work (Abdulsalamiet al, 2015). Up till now, ESs had been used in many areas that require decision making or predicting with expertise. Symptoms of diseases, disorders and pests have different geographical variations. Consequently, there is always the need to develop new ES for different geographical region. As a result, researchers in the field of agriculture are constantly working on new management strategies to promote the agricultural sector. Therefore, the need for this work cannot be overemphasized.
In this paper, a rule-based ES for managing pests and crop diseases in maize plant was proposed. The objective of the system is to provide computerbased support for agricultural specialists or planters. Thus, saving time and efforts required in the identification of crop pests and limiting the cost of getting expert advice. The ES makes diagnosis using the response(s) of the user to the queries related to particular symptoms. The knowledge base of the system contains the symptoms and treatments of seventeen (17) diseases of maize;and the if-then rules, which are fired based on the internal logic of the inference engine.
The goal of this paper is to provide expert knowledge to non-expert, by enabling access, sharing and dissemination of information about major diseases and pests affecting maize plant; their control and preventive measures, through computerbased support. This we hope to the best of our knowledge will in turn enhance the quality and quantity of maize production, thus, leading to rise in the GDP of the economy through income generation. Another goal is to provide a shared terminology which farmers, researchers and students of agriculture can jointly understand and use, thus reducing conceptual and terminological ambiguity.
The paper is organized as follows: Section 2 presents the review of relevant literatures related to this work, Section 3 shows the methodology adopted. Section 4 discusses the result of implementation of the system and the conclusion and future work are presented in Section 5.

Literature Review
The application of ES in agricultural domain had been in existence for more than three decades (Satrio and Jonathan, 2014). Its application has spread into the Crops cultivation management, Horticultural management, Poultry management, Aquaculture activity, Plant protection, Animal breeding, as well as economical decision-making. Researchers in the field of agriculture are continuously working on new management strategies to promote the agricultural sector. So far, a myriad of ES for various crops such as Wheat, Rice, Maize, Cassava, Sunflower, Lime, Tomato, Apple, Orange, Soybean and Cucumber, have been developed.
Fahadet al, (2008), developed a web-based ES for wheat crop in Pakistan. The ES aimed at assisting the farmers, researchers and students. The system provides an efficient and goal-oriented approach for solving common problems of wheat, and it coverstwo mainclasses of problems namely diseases and pests, normally encountered in wheat crop. The ES was implemented using e2gLite TM ES shell which allows a JAVA interface to process its inputs and output sets. The knowledge base of the system shell consists of if-then rules, which are firedbased on the internal logic of inference engine.
Also, Akanbiet al, (2009) designed a web-based ES for managing pests and diseases in Cassava. The work aimed at developing an ES that could be used by farmers and by the experts to train their students. The knowledge was represented using rule-based approach i.e. if-then rules and Unified Modeling Language (UML). Visual PROLOG 7.0 was used to implement the ES and the web interface was developed using Macromedia Dreamweaver.
Furthermore, Milindet al, (2013) designed an ES for Rice crop. The objective of the system was to detect and diagnose rice diseases. Thiswasachieved through analysisof the diseases symptoms. The proposed ES facilitated different components, including decision support module with interactive user interfaces for diagnosis. The system integrated a structured knowledge base that contains knowledge about symptoms and remedies of diseases in the rice plant appearing during their life span. The symptoms of these crops were used to identify the diseases. Thus, the system gives different diagnosis.
In addition, Qu, Tao and Qui, (2008) developed an ES to diagnose pests and diseases in Fruit plants. The Rule-based method was used to store the knowledge from experts and literatures. The control technique used was backward chain. The development of the system was performed using software CorvidExsys developed by Exsys Company.
Also, in 2012, Arowolo, Babalola and Faleye developed an ES for diagnosing Poultry diseases. The domain knowledge was elicited from the domain experts through interview and review of literatures. The knowledge was represented using rule-based approach. The UML was used to describe the design of the system. Visual PROLOG 7.3 was used to develop the ES. The system was tested using Design Criterion and Knowledge Base ES for Stratified Root.
In another work by Awoyelu and Adebisi (2015), a fuzzy ES for predicting cassava plant diseases was developed using Fuzzy tool in MATLAB vs. 9. Thesystem employed 18 rules for the Cassava Mosaic; 27 rules for the Cassava brown streak; and 27 rules for Cassava bacteria blight for the classification and prediction of cassava plant diseases. All the diseases were simulated using the Fuzzy logic inference system of Matrix Laboratory (MATLAB) and implemented using C-Language Integrated Production System (CLIPS); a shell programming variety of PROLOG for developing ESs.

System Methodology
A thorough investigation was carried out to fully comprehend the problems associated with the current processes involved in detecting pests in maize plants. The interview at Lagos State Ministry of Agriculture (LASMA), and with two experts from All Farmers Association of Nigeria (AFAN), Osun State district, revealed the existing method used in detection of pests in maize plant. Usually, when a maize plant is affected by pest, the farmer checks the affected part of the plant, thereafter applies the available pesticide based on past experiences and if it backfires, he looks for experts to consult.
In addition, lack of adequate knowledge on application of the right pesticide in controlling pests and plants diseases is a major impediment. The farmers apply pesticide based on guess or previous knowledge. This at times results to low yield during harvest, or causes total damage to the plant.
Moreover, it is difficult and cost effective to get experts. This discourages farmers in looking for expert to consult whenever the need arises. Besides, the knowledge of an expert is not always sufficient to tackle the pest attack and this makes the farmers adopt self-medication. Table I shows the conversation that ensued between us and one of the experts at All farmers Association of Nigeria (AFAN), Osogbo branch.

Expert
The pest is detected when the plant stop growing well and leaf has holes.

Interviewer
What are the early symptoms that the affected plant shows? Expert The first thing we observe is when the color of the leaf changes. The color may change to yellow or the leaf wilting.

Interviewer
What is the prevention mechanisms carried out to control this pest?

Expert
Applying pesticide and monitor the germination of the plant.

Interviewer
What are the major causes of these pests?

Expert
Lack of adequate water supply, Low rainfall.

Interviewer
How often do we need to check our farmland in order to avoid pest attack?

Expert
Usually it takes a maize plant 8 weeks to fully grow. If the plant is affected by pest, you need to apply the necessary pesticide immediately, then after 4 weeks, apply the pesticide again. Ensure you check your farmland very often.

Interviewer
What advice will you like to give to the farmers?

Expert
The farmers should apply the pesticide as prescribed by the manufacturer. All pesticide has prescription written on the bottle, attention should be given to that. They should make use of proper measuring instrument (e.g. spraying machine cup) and also avoid overdose due to desire for quick yield.

The Maize Expert System
The proposed system as shown in Figure1 comprises of three major components; the knowledge base, inference engine and the user interface. The knowledge base comprises of knowledge of maize crop pests and diseases, with their suitable treatment and effective control. This knowledge was stored in the form of both textual base and pictorial base, via the use of pictures and images relating to the pests and diseases of maize plants. The knowledge base is interconnected with the inference engine. The inference engine performs the task of reasoning during diagnosis and in the search of a suitable treatment or control as an alternative solution to overcome the selected pest. The input from the user is subsequently used for the reasoning processes in the inference engine. The user interface serves as the medium of interaction between the users and the expert system. Following the inputs given by the users, the system will generate the result via the different modules implemented in the system. The modules are maize facts module represented by explanation facility, diagnosis module, treatment module and result module. The explanation module presents knowledge on maize cultivation. It includes general information on maize (scientific names, local names, and soil types), information about the pest and disease such as symptoms, and the suitable treatment or control for each disease or pest attack. These modules are interconnected with the user interface module.

Figure 1: The System architecture
The proposed system accepts user(s) input using a question and answer format and gives solution based on user(s) input, during the consultation exercise as shown in Figure 2.
The system was designed to run as a web application. Hypertext Markup Language (HTML), Cascading Style Sheet (CSS) and JavaScript were used to implement the client side, while Hypertext Preprocessor (PHP) was used for the server side. All data entry and retrieval operation was done via the web interface. Thus, suiting its usefulness for different categories of users.

Implementation and Results
The maize ES as developed in this work, initiates a dialogue where the user answers in response to various questions posed by the system during consultation. Eventually the system provides a diagnosis, gives treatment and provides information about maize plant and pests. To facilitate ease of access, the system was developed as a web application. The system requires information about the affected part of the plant from the user, and answers to the questions posed by the system. The system gives result of the pest that attacks the plant, the treatment for the affected plant, expert advice on general precautions, symptoms with their respective causes, and provides information as applicable. The subsection below shows part of the pages of the system implemented, revealing the screenshots of user's interaction with the system. Figure 3 shows the screenshot of the Home page, it featured images of the maize pests, maize facts. The user begins consultation from this page.  The symptoms page as shown in Figure 5 and 6 shows the various symptoms seen on the part of maize plant affected. The user responds to the questions, and thereafter submits the response. In the treatment module, the user gets treatment to combat or prevent further attack by the pests. It prescribes the type of pesticide to apply viz-a-viz proportion and methods. In addition, it explains other safety measures to adhere to. An instance of such pages is the page for treatment of armyworms, as shown in Figure 9.

System Evaluation Using Domain Expert
The system was evaluated using a questionnaire. Eighty (80) copies of the questionnaire were distributed among domain experts, while providing them access to the system. The system was tested in line with their domain knowledge. Figure 15 below shows the evaluation result using bar chart.

Figure 15: Chart Summary of Evaluation Result
Most of the domain experts agreed that users with no computer skills can interact with the system and the system could be useful to farmers in rural areas, while most of them strongly agreed on the following: Agriculturist and planters can use the system to learn more about pests in maize plants; assist farmers in pests' detection and control in maize plant; saves time in identifying pests in maize plants. The systemcan be recommended to students as a learning tool; the treatment provided by the system is reliable and useful; people can understand the advice provided by the system with average literacy in computer; the system had made expert knowledge available to non-expert; and the system if adopted will significantly improve the economy of the country. Meanwhile, most users stand a neutral ground that the Yoruba version if implemented will successfully breaks the language barrier problem.

Conclusion and Recommendation
So far, ES had been developed to manage pests and diseases in various plants. However, ES for maize plants has not been implemented locally. Thus, the need to design a system that would assist farmers in combating the menace of crop pests and diseases has become highly imperative, and as such it can neither be over emphasized nor neglected. This work presents a rule-based ES, a solution, to help in the detection and management of the pest affecting maize plant using a series of symptoms and also provide useful information, facts and expert advice for farmers. The ES is web application that comprises of a diagnostic system which detects pest in maize plant and suggests appropriate solution(s) to combat the menace. It is an information system that gives facts about pests control in relation to maize cultivation and maintenance. The system essentially evaluates pests affecting various stages of maize cultivation. The ES gives with great amount of accuracy the name of the pest affecting the plant and the control measures to be taken to combat their threats.
Future work can be carried out with respect to multi-lingual version, to enable its usefulness to the indigenous farmers. In addition, the use of machine learning techniques could be adopted to compensate for the incomplete information in the inference engine, which can make the proposed system gravitate into some degree of uncertainty.