1CHAPTER ONEINTRODUCTION1.0 BACKGROUND TO THE STUDYKnowledge and the way it is managed, according to Jashapara (2011), has been withhumankind since the beginning of time. Knowledge is an asset which does not depleteafter its use rather it grows through transfer or exchange. However, knowledge,if notclosely watched or kept may go extinct. Whether indigenous or modern, knowledge hasbecome the key asset to drive organizational survival and success andas such is an assetwhich should not be allowed to suffer death due toineffective management. Knowledge isconstituted by the ways in which people categorize, code, process, and impute meaning totheir experiences (Studley, 1998).Itshould not be forgotten that indigenous knowledge formed part of humanity‟s commonheritage.Indigenous, Local and Traditional are terms that have been used interchangeablyto describe the peculiarity of arts, beliefs, language, practice orknowledge(the list beingin-exhaustive) to communities.Indigenous Knowledge (IK)has been defined by a numberof authors, though different yet similar in their ideas of what indigenous knowledgeis.The recurring terms in the various definitions of indigenous knowledge are: naturalresources, local, communities, experience and innovation.Kolawole (2001) used the termlocal or indigenous knowledge (IK) to distinguish the knowledge developed by a givencommunity from international knowledge systems or scientific knowledge.The United Nations Environment Programme (UNEP) defined IK as the knowledge thatan indigenous local community accumulates over generations of living in a particular
2environment. UNEP also identified a number of terms that are often used interchangeablyto refer to the concept of indigenous knowledge.These terms include TraditionalKnowledge (TK), Indigenous Technical Knowledge (ITK), Local Knowledge (LK), andIndigenous Knowledge Systems (IKS). Indigenous knowledge (IK) is unique to everyculture and society and it is embedded in community practices, institutions, relationshipsand rituals. It is considered a part of the local knowledge in that it has roots in particularcommunities and is situated within broader cultural traditions.Agricultural indigenous knowledge (AIK) refers to the knowledge through which localcommunities go about their agricultural practice to ensure survival. Indigenousknowledge (IK), and AIK for that matter, is knowledge that has been in existence sincethe existence of man.It is knowledge that evolved as man perceived the only means forsurvival was to adapt to his environment, and by adapting there was need to identifywhich plants and animal were edible, how to cultivate the land around them so as toreproduce these plants, how to protect the plants and animals from diseases and so on. IKis not static. It evolved in response to changing ecological, economic and socialcircumstances based on how creative and innovative members of the community are.AIK has been observed to be a significant asset tocommunities in the area of decisionmaking towards sustainability.Adedipe et.al (2004) testified to the undeniable importanceof IK when they stated that this kind of knowledge , i.e. IK, are evidently related to globalscience traits of Conservation; Biodiversity maintenance; Plant physiological; andEntomological principles of crop protection and Pest management.START (GlobalChange System for Analysis Research and Training) in its flood risk analysis in the
3coastal communities in Nigeria noted that some communities in the Niger Delta haveused indigenous knowledge to forecast floods with some degree of accuracy.Africa is a continent rich in indigenous knowledge andNigeria, by all indication, is amajor contributor to this richness.Nigeria‟s richness in indigenous knowledge (IK) can beattributed to the large number of (divers) ethnic groups in the country.Relevantly isAIK.This varies from indigenous yam production and control of mite in Poultry farmingin the South to control method for pest and disease of cattle in the North, to mention afew. A number of researches have been carried out with the aim of identifying some ofthe indigenous agricultural practices in selected places in Nigeria but this knowledge doesnot exist in any structured form.Based on the researchers inquirythere is no suchcollection or large documentation of indigenous knowledge in Nigeria.It has been shown that organizations that are able to harness knowledge grow strongerand are more competitive.This validates the more a saying about knowledge being power.In the economy today, corporate success can be achieved through an organization‟sability to acquire, codify, and transfer knowledge more effectively and with greater speedthan it competition.Jashapara (2011) considers knowledge as „actionable information‟.Unlike data and information, which are letters and numbers without context and withcontext, respectively, knowledge equips one with a greater ability to predict futureoutcomes.In a more definitive form, knowledge is information plusthe rules for itsapplication.Knowledge is information associated with rules which allow inferencesto bedrawn automatically so that the information can be employed foruseful purposes.
4Knowledgecan be classified into implicit knowledge and explicit knowledge. Explicitknowledge is the knowledge that is documented while implicit knowledge is knowledgein the human brain; it is personal knowledge.Agricultural indigenous knowledge (AIK) can be classified as tacit knowledge. The corefeature of AIK which qualifies it as tacit knowledge is that it is embedded in the farmer‟sbrain. Tacit knowledge is accumulated through study and experience.It is a kind ofknowledge that grows through the practice of trial and error and series of success andfailure experiences.These features are also peculiar with traditional agricultural practices.Knowledge-based systems otherwise known as Expert systems are computer programsthat use knowledge of theapplication domain to solve problems in that domain,obtainingessentially the same solutions that a personwith experience in the same domain wouldobtain.It is a system that tries to solve problems that will normally require human experts.An expert system is designed in a manner in which it imitates human experts‟ thinkingprocess to proffer solution to problems. In order to get the most of an expert system it isimportant to engineer knowledgeappropriately otherwise it would be a case of “garbagein, garbage out”.The same can be said of a medical doctor who has not immersed himself well enough inpractice to diagnose a patient with malaria.He must be equipped with knowledge acquiredthrough studies and experiences which will enable him deliver the right medical servicesfor the right ailments.Thus, designing an expert system requires well pruned processes ofKnowledge acquisition, Knowledge representation and Knowledge validation.
5Expert systems have been noted to assist in a number of fields ranging from medicals(MYCIN), automobile (ALTREX), building and construction (PREDICTE),to mineralresources (PROSPECTOR), to mention a few. Expert systems can be applied to performfunctions such as interpreting and identifying, predicting, diagnosing, designing,planning, monitoring, debugging and testing, instruction and training, and controlling.1.2 Statement of ProblemIn Africa there is limited documented literature in IK. This owes to the fact that IK istransmitted among generations orally or through observation.It is passed unto generationsthrough traditional socialization processes by elders of indigenous communities. Thesemodes of learning are insufficient and unreliable in protecting IK from going intoextinction.According to Msuya (2007), lack of written memory on IK has also led to itsmarginalization. He also pointed out that the new generation folks spend most of the timenowadays in formal education and as such are exposed the more to western education andless to IK.Western education, which brings with itglobal knowledge, no doubt has advantages butglobal knowledge without local knowledge is inefficient.Every knowledge system has itsorigin and functions for which it came into existence. Rather than use a knowledgesystem as a benchmark for other knowledge systems, each knowledge system should berecognized as distinct and unique. Shiva, (2000) as cited by Gall (2009), opined that thevarious knowledge systems should not be reduced to the language and logic of Westernknowledge systems as each of them has its own logic and epistemological foundations.
6Banuri; Apffel-Marglinet al(1993) explained the differences between indigenousknowledge and western knowledge. One of the points they noted as the differencebetween the stated types of knowledge is based on a contextual ground.That is,indigenous knowledge differs from western knowledge because indigenous knowledge ismore deeply rooted in its environment. It is people‟s knowledge. Brokensha et al., 1980,as cited by Agrawal (2004), therefore emphasized that to ignore peoples knowledge isalmost to ensure failure in development.The agriculture professionis one that has been facing intensive marginalization sincethediscovery of oil in Nigeria. There is an increasing demand for white collar jobs whilethe farm work is left for the poor rural farmers. Agriculture is not an area of interest to anaverage Nigerian graduate; even the so called graduates of agricultural sciences abandontheir farming tools for pens.Abebeet alas cited byKolawole (2001)reviewed that farmers have quite a sophisticatedknowledge of agriculture based on insights from several generation and he stressed theneed to document and preserve the knowledge in situ and ex situ.The emphasis, of thispresent project however, is on agricultural indigenous knowledge (AIK) and how its usecan be aided by an expert system. In designing an expert system for AIK, there areaccompanying advantages of protection, preservation, and improvement (in its use) of theknowledge.1.3 Overall Objective
7The overall objective of the study is to develop a knowledge-based system which willmanage indigenous knowledge for crop protection.1.3.1 Specific objectivesThe objectives of this study are to:To elicit domain knowledge on local crop pests and disease;To elicit domain knowledge onlocal pest and disease control ;To elicit domain knowledge on local storage methods;To develop a knowledge-based system that canreason based on the indigenousknowledge provided and proffer solutions to problems in the domain.1.4 Justification of the studyIn the history of humans, people have sustained themselves by using the natural resourcesaround them in a largely suitable manner (Akegbejo-Samsons, 2009). Many of thesesurvival practicesparticularly those that are uniqueto indigenous people around the worldare disappearing. This therefore heavily threatens the existence of indigenous knowledge.Indigenous knowledge in agriculture is only one out of the numerous categories ofindigenous knowledge that suffer the threat of extinction. As the greater part ofagricultural produce in Nigeria comes from rural farmers there is a needto pay attention tothe farmers‟ localknowledge system.Hansen et al(1987) as cited by Bamigboye andKuponiyi (2010) stated that researchers have observed that these indigenous agriculturalpractices are cost-effective and it poses less production risks such as environmental
8degradation.An understanding of indigenous knowledge systems will enableagriculturaliststake advantage of the benefits offered by the age old practices.Warren and Rajasekaran (1993) noted that policy makers and agricultural developmentplanners are beginning to give attention to existingindigenous knowledge systems anddecision-making processes. Indigenous knowledge if built upon will enhance localdevelopment, enhance sustainability and capacity building such as this study provides.This is based on the fact that a clear understanding of a community‟s indigenousknowledge will provide the basis for basic communication with the farmers. Indigenousknowledge should form the foundation for agricultural and food policy initiatives andtechnological interventions.Every phase of this present project is vital but a more significant phase without which thisproject would not be relevant is the knowledge acquisition phase. Knowledge acquisitionrefers to the processes by which knowledge is acquired, either from primary or secondarysources. Primary and secondary sources were considered for the supply of the knowledgerequired for this project but while some of them have yielded the results many of thesesources have not proven to provide sufficient knowledge for the purpose due to someconstraints.The Faculty of Agriculture and Forestry at the University of Ibadan was selected as asource for data needed for this present project. On visitation to some of the departmentsof the faculty (Agricultural Extension and Rural Development department, CropProtection and Environmental Biology department, and Agronomy department) the seniorresearchers whom the researcher interacted could not provide such data. The senior
9researchers stated clearly that there is no such documentation (of indigenous knowledgeused for pest control and disease management in crops). Some of the senior researchersoffered textbooks which they thought could provide some information. In their opinionsuch data can only be elicited from farmers, thus, they suggested that the researcher visitsvarious farming communities in order to acquire such information in details.Based on the recommendation of the senior researchers, the researcher interviewedfarmers in Ijero Ekiti. It was a process which consumed time and financial resources.Some of the farmers were able to provide some information based on the crops theyspecialize in. It was observed that the farmers, being the elderly ones, were graduallyforgetting the indigenous methods. It took some of the farmers significant time toremember the names of pests, the names of leaves or other ingredients used to preparesolutions for treating infested crops. This owes to the fact that they have been introducedto the use of modern pesticides and herbicides which has reduced the use of localpesticides.The researcher proceeded to some research institutes such as International Institute forTropical Agriculture (IITA), National Stored Products Research Institute, and NigerianInstitute of Social and Economic Research (NISER). The researchers spoken with saidthey do not have documented indigenous knowledge. As a matter of fact they stronglybelieve that such information should be available at the Faculty of the Agriculture andForestry at University of Ibadan.The researcher also visited the indigenous knowledge library at Nigerian Institute ofSocial and Economic Research (NISER). The books, periodicals and journals which were
10consulted did not spell out the indigenous knowledge used for pest control and diseasemanagement rather they emphasized the importance of indigenous knowledge fordevelopment. A source at the National Centre for Genetic Resources and Biotechnology(NAGRAB) whom the researcher spoke with said based on his interaction with farmersduring his duties as an extension officer he has no doubt that agricultural indigenousknowledge is invaluable but to his knowledge there is no collection whether in prints or inan electronic database to preserve these elements of knowledge.This demonstrates the urgency of harvesting and documenting of all available indigenousknowledge and the necessity of a much bigger project which could be well organized andfunded by national or international research institutes.Due to time, financial and logistic constraints the project study cannot assume theresponsibility of the proposed bigger project. However, it presents a template and aknowledge-based platform upon which the proposed project can be based.Aknowledge-based system in AIK will reveal the step by step processes that rural farmersapply in their farming processes. It is, thus, capable of providing this information toagricultural researchers and other practitioners in a format easily accessible for use andmodification where, and if, necessary.A knowledge-based system serves beyond documentation but also provides solutions toproblems. Some of the benefits a knowledge-based system for indigenous agriculturalpractices will offer are highlighted below.Preserve and protect agricultural indigenous practices ;
11Provide researchers and scientists with a problem-solving platform which will assistin research;Provide a platform for diffusing and integrating agricultural indigenous knowledgewith scientific knowledge to improve agricultural production;Serve students in their academic work;Serve as a tool for extension workers in their field work.It could also be useful to young farmers who cannot afford expensive pesticides.1.5 Scope of the StudyThe scope of the study is to build an expert system shell which can describe indigenousmethods of crop storage and also be used to identify pests and diseases in selected cropsand proffer indigenous methods of controlling the pests and diseases.The knowledge in the knowledgebase is limited to indigenous/traditional knowledgeusedin agriculture. The expert system provides an interactive user interface through whichusers can interrogate the system.1.6 Definition of TermsArtificial intelligence: it is the study of ways in which computers can perform taskswhich people are better at.Disease:an abnormal condition of an organism which interrupts the normal growthand function of the organism.Expert system: an expert system is a computer system designed to solve problems inspecific narrow domain in the same way human experts will do.
12Indigenous knowledge: indigenous knowledge is local or traditional knowledgeacquired by communities over the years through interactions with their environmentin a bid to survive.Pest:a destructive insect or other animal that attacks plants, crops or animals.Prolog: Programming in LogicCHAPTER TWOLITERATURE REVIEW2.1 Artificial Intelligence
13The name „artificial intelligence‟ dates back to 1955 when McCarthy, Minsky, Rochester,and Shannon at the Dartmouth conference made a proposal to study artificial intelligence.The study, they said,” was to proceed on the basis of the conjecture that every aspect oflearning or any other feature of intelligence can in principle be so precisely describedthat a machine can be made to simulate “ (Rich, 2003).Alan Turing, however, had in 1950 implied the name artificial intelligence in his paper„Computing Machinery and Intelligence‟ when he asked the question “Can machinesthink?” Turing in an attempt to prove the said intelligent behavior of a machine againstthat of a human being, proposed a test which he called the imitation game. In theimitation game, he placed the machine and a human in a room and a second human inanother room. The second human is the interrogator in the game. The interrogator thencommunicates with the human counterpart and the machine in the other room via atextual device. The interrogator through a question and answer session is expected todistinguish the computer from the human based on the responses he gets for thequestionshe poses. If the interrogator is unable to tell the difference, Turing argues, thecomputer can be assumed to be intelligent.Artifice outlined three important features of Turing‟s test. The features are:1. The test attempts to give an objective notion of intelligence, i.e., the behavior of aknown intelligent being in response to a particular set of questions.2. It prevents us from being sidetracked by such confusing and currently unanswerablequestions as whether or not the computer uses the appropriate internal processes orwhether or not the machine is actually conscious of its actions.
143. It eliminates any bias in favor of living organisms by forcing the interrogator to focussolely on the content of the answers to questions. (UVETEJO, 2007)Russel and Norvig noted, however, that a computer must possess some capabilities toenable it pass the test. The computer must be able:To communicate in natural/human language (natural language processing);Store what it knows or hears (knowledge representation);Use the information it stores to provide answers, make inferences and also to drawconclusions(automated reasoning);To adapt to new circumstances and to detect patterns and to further extent theapplication of such patterns (machine learning).The question which evolves at this point is, what is intelligence? There has been a longhistory of debate as to what intelligence is, and despite the decades of research there isstill no single acceptable or standard definition of intelligence. Several definitions ofintelligence have been recorded. Legg and Hutter (2006) noted that there are obviousstrong similarities between the numerous proposed definitions of intelligence. Somedefinitions of intelligence given are as follows:“A person possesses intelligence insofar as he has learned, or can learn to adjusthimself to his environment”. S. S. Colvin“…. the ability to plan and structure one‟s behavior with an end in view” J. P. Das“…in its lowest terms intelligence is present where the individual animal, or humanbeing, is aware, however dimly, of the relevance of his behavior to an objective.Many definitions of what is indefinable have been attempted by psychologists, ofwhich the least unsatisfactory are:
151. The capacity to meet novel situations, or to learn to do so, by new adaptiveresponses and,2. The ability to perform tests or tasks involving the grasping of relationships, thedegree of intelligence being proportional to the complexity, or the abstractness, orboth of the relationship” J. Drever“…adjustment or adaption of the individual to his total environment, or limitedaspects thereof …the capacity to reorganize one‟s behavior patterns so as to act moreeffectively and more appropriately in novel situations …the ability to learn …theextent to which a person is educable …the ability to carry out on abstract thinking…the effective use of concepts and symbols in dealing with a problem to besolved…” W. FreemanAmtar(1976), remarked that the major problem with the several viewpoint is thatintelligence is generally regarded as a uniquely human quality. He stated further that wehumans are yet to understand ourselves, our capabilities, or our origins of thought.Minsky (1991), on the contrary, points out a problem of attempts to unify theories ofintelligence.He assigns blame to lack of clarity in distinguishing between some broadaspects of what constitutes intelligence.Minsky offered the definition of intelligence as“…the ability to solve hard problems”. But there arise a question such as “at what point isa problem regarded as hard?” and “who decides which problem is hard?” A problemremains hard as long as one does not know how to go about solving it and the moment itis solved it becomes easy.Schwartz (2006) therefore regards intelligent any organism or system that is able to makedecisions. Decisions are vital ingredients of survivaland as long as there are goals to be
16achieved decisions must be made in order to achieve them.In his opinion, any proposeddefinition of intelligence should not rely on comparisons to individualorganism.According to Carne (1965), as cited by Schwartz (2006), the basic attribute ofan intelligent organism is its capability to learn to perform various functions within achanging environment so as to survive and to prosper.Several definitions have also been offered for artificial intelligence. Artificial intelligence(AI) is the study of how to make computers do things which, at the moment, people arebetter (Rich, 1983). Artificial intelligence can be referred to as an information-processingprogram, the information-processing element which can be likened to human thinking.Simon (1966), according Frantz (2003), identified three operations that are peculiar tohuman thinking and information-processing programs. He noted that human thinking andinformation-processing programs scan data for patterns, store the patterns in memory, andthen apply the patterns to make inferences or extrapolations.After a thorough examination of some definitions of artificial intelligence Russell andNorvig (2003) observed a pattern along the definitions. The definitions he examineddescribed artificial intelligence along four main dimensions: thinking rationally, actingrationally, thinking humanly, and acting humanlySystems that think like humans“The exciting new effort makes computersthink…machines with minds, in the fulland literal sense.” (Haugeland, 1985)Systems that think rationally“The study of mental faculties through theuse of computational models.” (Chamiakand McDermott, 1985)
17“[the automation of] activities that weassociate with human thinking, activitiessuch as decision-making, problem solving,learning..” (Bellman, 1978)“The study of the computation that make itpossible to perceive, reason, and act.”(Winston, 1992)Systems that act like humans“The art of creating machines that performfunctions that require intelligence whenperformed by people.” (Kurzweil, 1990)“The study of how to make computers dothings at which, at the moment, people arebetter.” (Rich and Knight, 1991)Systems that act rationally“Computational Intelligent is the study ofthe design of intelligent agents.” (Poole etal., 1998)“AI …is concerned with intelligentbehavior in artifacts.” (Nilsson, 1998)Artificial intelligence has roots in a number of disciplines. These disciplines includePhilosophy, Logic/Mathematics, Computation, Psychology/Cognitive Science,Biology/Neuroscience, and Evolution.2.2 Artificial General Intelligence and Narrow IntelligenceThe original notion behind artificial intelligence was to create machines that simulatehuman reasoning in solving problems, that is, a machine that thinks. This attracted the useof the terms “Artificial Intelligence” and “Artificial General Intelligence (AGI)”interchangeably. Attempts were made to develop machines that could solve variety ofcomplex problems in different domains. Some of the AGI systems that were developedare:General Problem SolverFifth Generation Computer SystemsDARPA‟s Strategic ComputingWang (2007) recorded that despite the ambitiousness of the AGI projects, they all failed.Due to these failures, artificial intelligence aim was redirected to solving domain-specificproblems and providing special purpose solutions. Thus, “Narrow Intelligence”.
18Narrow artificial intelligent systems are systems that demonstrate intelligence inspecialized domains.Artificial intelligence has been applied in the following areas:Game: Game Playing is one of the oldest and well-studied domains of artificialintelligence. a basic feature of game in artificial intelligence is its mixture of differentapproaches of representing in intelligence (Wexler, 2002).Natural Language Processing: This area of artificial intelligence tries to take on oneof the inherent capabilities of human beings – Understanding language. In naturallanguage processing machines are made in such a way that they can understandnatural language. A machine that understands natural language carries out thefollowing steps consecutively: speech recognition, syntactic analysis, semanticanalysis and pragmatic analysis.Computer Vision: This is an area of artificial intelligence that deals with theperception of objects through the artificial eyes of an agent, such as a cameraMachine Learning: Machine Learning, as the name implies, involves teachingmachine to complete tasks. It emphasizes automatic methods, that is, the goal ofmachine learning is to device learning algorithms that do the learning automaticallywithout human intervention or assistance.It is an area of artificial intelligence whichintersects broadly with other fields such as statistics, mathematics, physics, and so on.Examples of machine learning problems are Face detection, Spam filtering, and Topicspotting.Neural Networks: a neural network is a massively parallel distributed processor thathas a natural propensity for storing experiential knowledge and making it availablefor use. It is a machine that is designed to model the way in which the brain performsa particular task or function of interest; the neural network is usually implemented
19using electronic components or simulated in software on a digital computer (Hajek,2005).Expert Systems: Expert systems are computer programs that are designed to replicateknowledge and skills of human experts in specific narrow domains.2.3 Expert SystemsExpert systems are computer software which are developed to provide solutions toproblems in narrow domains. The solutions provided by the expert system should be thesame, if not better, as would be provided by the domain-expert if he was to solve suchproblem. Expert system, though takes roots in cognitive science, has been a significantaspect of artificial intelligence research and quite a number of systems have beendeveloped. Expert systems, according to Anjaneyulu (1998), encode human expertise inlimited domains.Armstrong (2002) defines expert system as a program that emulates the interaction a usermight have with a human expert to solve a problem. Expert systems do not makesignificant use of algorithms rather they use rules of thumb (heuristics), as an expertnormally will do.Expert systems are beneficial in a number of ways.Expert systems, unlike human experts, are readily available when needed.Human experts may get tired or forget things but experts systems do not exhibit suchfrailtiesExpert systems canbe used to train experts and pass knowledge to non-expertsDue to the various distractions in the environment human experts may be inconsistentin carry out their task. An expert system is consistent.
20Expert systems are usually the result of the pooling of resources of various experts.Expert systems produce results faster than humansExpert systems, in the long run, are cheap.The process of designing expert systems is called Knowledge Engineering. Theknowledge engineering process consists of sub-processes which are knowledgeacquisition and knowledge representation.2.4 Knowledge Acquisition and RepresentationKnowledge acquisition is a process which involves gathering of knowledge form books,journals, databases and most importantly experts in a domain of expertise. Theknowledge engineer irrespective of whether he has a deep knowledge of the domain ornot is charged with the responsibility of gathering the knowledge required to build aknowledge system. This process is one which needs the elicitors‟ keen attention so as toensure that knowledge is captured in the sense that the expert means it to be. Collectingknowledge from secondary sources may not be as challenging as collecting from primarysources, i.e. the knowledge experts. The major challenges a knowledge engineer mightencounter in this process is either the unwillingness of the experts to share the knowledgeor the lack of awareness. Knowledge engineers should beforehand equip themselves withthe knowledge eliciting skills and general domain awareness before engaging with theexperts, thus, Knowledge Elicitation.Knowledge elicitation, according to Regoczie and Hirst (1992) as cited by Cooke (1999),is a sub process of knowledge acquisition which is further a sub-process of knowledgeengineering. Shadbolt and Murton (1995) refer to knowledge elicitation as a subtask of
21gathering information from experts. Knowledge elicitation asks the question, how do weget experts to say exactly what they do and why?Shadbolt and Burton (1995) expatiated on the different methods of eliciting knowledgefrom experts. Some of the methods of knowledge elicitation are:Structured interview: This is an organized and planned discussion format forknowledge elicitation. The knowledge engineer must have planned the whole session.The advantage of using structured interview is that it provides structured transcriptsthat are easier to analyse. Shadbolt and Borton (1989)Protocol Analysis (PA): In PA the knowledge engineer makes video or audio recordsof the expert. Protocols are made from the records and the knowledge engineer furtherextracts meaningful rules from the protocols. Shadbolt and Borton (1989) Theknowledge engineer could record the expert while he (expert) solves a problem; theexperts in the process will give commentary concurrently describing what he is doingas he solves the problem.This is called On-line PA. When the expert commentsretrospectively on the problem solving session the process is called Off-line PA.Shadbolt and Borton (2006)Concept sorting: The concept sorting method is used to reveal how an expert relatesdifferent concepts in his domain of expertise. The expert is presented with cards onwhich is written different concepts. The cards are shuffled and the expert is told sortthe cards into piles he finds appropriate.Laddered grids: This process requires that the expert and knowledge engineerconstruct a graphical representation of the domain terms of the relations betweendomain elements.
22The choice of which method to use depends on the expert from whom the knowledgewill be elicited and the type of knowledge to be elicited. The knowledge engineer isallowed to use more than one method in the knowledge eliciting process.As earlier stated knowledge representation is one of the processes that a knowledgeengineer must pay keen attention to in designing an expert system. The time and effortthat a knowledge engineer put into eliciting knowledge from experts will not be fullycredited if the knowledge engineer does not represent the knowledge acquired in such away that it enables effective automated reasoning. In an attempt to proffer solution toreal life problems, an expert first observes the problem and then internalizes it in alanguage that will assist his reasoning about the problem. Reasoning is a thought processbased on what the expert has been able to internalize and from which he/she drawsinferences or makes conclusion. The computer program is also expected to work in thissame way but is deficient in the area of observing and representing the real life problemin its own language. The knowledge engineer is thus faced with the responsibility ofrepresenting knowledge in the language the computer is designed to understand.The knowledge acquisition phase is succeeded by the knowledge representationphase.Knowledge representation is the way knowledge is encoded. Copping (2004),identifies knowledge representation as a very core of Artificial Intelligence (AI).Symbols, whether character strings or numbers, are ways AI Programmers represent andmanipulate knowledge on computers in order to generate information. Informationdescribed in this contexts refers to the advice generated by an expert system based on theknowledge which has been well represented and intelligently manipulated. This differsfrom information generated from data as in the case of statistical information. Data is raw
23information which ordinarily might not make much sense until it is processed intoinformation. Data is also represented by symbols but it should not be confused withknowledge. Data is the lowest stage or state of describing or representing reality; at thatstage or state a person cannot make meaning of the representation because it is without acontext. Knowledge on the other hand has an understanding pattern.Knowledge, if represented appropriately, should enable fast and accurate access toknowledge and an understanding of the content. A good knowledge representation modelshould have the following capabilities:Representational adequacy: this is the ability of the system to represent theknowledge in the domain it is being used.Inferential efficiency: is the system‟s ability to manipulate the structures that havebeen represented within it in order to produce new knowledge inferred from the oldones. It is the system‟s ability to reason with the knowledge provided to producenew knowledge.Inferential adequacy: is the system‟s ability to incorporate additional knowledgestructure that can be can be used to direct the focus of the inference mechanisms inthe most promising direction.Acquisitional efficiency: is the ability of the system to acquire knowledge usingautomatic methods wherever possible rather than rely on human intervention.Literature however revealed that, so far, no single representational formalism optimizesall the capacities.
24Knowledge can be represented through different mechanisms/models namely: Rules,Frames, O-A-V triplet (Objects, Attributes, and Values), Semantic net, and Logic. Eachof these models is briefly explained below.Rules: this model of representation usually takes the “IF, THEN” form. Knowledge isrepresented in condition-action pair, (Haq). In the rule-based system, according toGiarratano (2004), the inference engine determines which rule antecedents are satisfiedby the facts. The rules are there to assist the system draw conclusions based on the factsprovided.Example:IF X THEN Y; X being the antecedent and Y the consequence. Say, IF infected jointsTHEN arthritis.Frames: this model consists of a set of nodes, each representing objects, connected byrelations. The knowledge in the frame is divided into slots to which values are assigned.ExampleBird FrameFamilies: RobinGovernment Protected FrameEndangered species: robins, eaglesRobin FrameIs a: BirdIs an: Endangered speciesFly: Yes, Wings: yesMini: instance frameIs a: robinLives in: nestFacetLocation: pine treeFacet:Location: Wang’s yardInstance of
25Figure 2.1: FramesAn advantage of using the frame model is that information about an object is stored inone place, however when the object to be described has a lot of properties and manyrelationship need be reflected, it becomes complex.O-A-V triplet: the Object, Attribute, and Values method simply represents knowledgeshowing their characteristics and the measure of the attribute. Objects here could either bephysical or conceptual.ExampleFigure 2.2: O-A-V TripletSemantic Net: this system represents knowledge using graphs. The graphs are made upof nodes (which represents objects), and edges/links (which represents the relationshipbetween the objects)Figure 2.3: Semantic NetCoppin (2004), noted that as much as semantic nets provide a very intuitive way torepresent knowledge about objects and existing relationships. Semantic nets beingDogWeight, Colour,Breed15kg, White, PoodleFishJerryPhilBlueWaterAquariumcolourIs aownsinlives
26graphical representation can get cumbersome when the graphs are too many. It alsocannot represent relationship between three or more objects.Logic: this is concerned with reasoning and validity of arguments, Cooping (2004). It isconcerned about the validity of a statement rather than its truthfulness. Take for instancethe following statements:Fishes live on landJerry is a FishTherefore, Jerry lives on land.The concluding statement is logical based on the previous statements. The reasoningprocess determines the conclusion based on the premises; thus, the validity of a piece ofreasoning is based on if it leads to a true conclusion in every situation where the premisesare true.The types of logic representation are Propositional logic, Predicate logic, First orderlogic, Temporal logic, and Fuzzy logic.Irrespective of the knowledge representation model an engineer selects for a projecthe/she should bear in mind the stages that must be followed, so as to enhance the desiredoutcome. Poole (1999) developed a framework for representing knowledge.ProblemRepresentationSolutionOutputrepresentcomputeinterpret informalformalsolve
27Figure 2.4: Poole (1999) Framework for representing knowledge.2.5 Agriculture and Indigenous KnowledgeThe agricultural sector has the potential to provide a jumping-off point for a nation‟sindustrial and economic development. This is owed to the multiplier effect which springsfrom the sector‟s activities. A vibrant agricultural sector, according to Ogen (2007),would enable a country to feed its growing population, generate employment, earnforeign exchange and provide raw materials for industries. He further emphasizes that theagricultural sector is the engine of growth in virtually all developed economies.Of the79 million hectares of arable land which Nigeria has 32 million hectares arecultivated. Eighty percent of all farm produce in the country is produced mostly bysubsistence farmers, thus, leaving crop and livestock production below potentials.(Nwajiuba, 2012)Indigenous knowledge (IK) is accumulated store of cultural knowledge that is generatedand transmitted by communities from one generation to another. This knowledgeencompasses how to adapt to, make use of, and act upon physical environments and thematerial resources in order to satisfy human wants and needs (Gbenda, 2010).Indigenousknowledge, according to Workinehet. al (2010), stands out. This is because it isan integralpart of culture and unique to every given society, and it was developed outside the formaleducational system. Due to inter-cultural relationships indigenous knowledge in somecommunities has been modified.Quite a number of terminologies have been used to refer to indigenous knowledge. Atte(1986), as cited by Williams and Muchena (2000), listed some terms which aresynonymous to indigenous knowledge. These terms include indigenous knowledge
28systems, indigenous technical knowledge, ethno-science, local science, traditionalscience, people‟s science, and village science. Irrespective of its size every communityhas its own local knowledge, as the local knowledge is the keystone for decision makingto ensure harmonious survival with nature.There are increasing numbers of literatures on indigenous knowledge in recent times.This is not to say that indigenous knowledge is a new area of research. Anthropologistshave been in the “business” of studying and documenting people‟s culture, practices,beliefs, and customs for years (Schneider 2000). They have traditionally been academicloners, spending long periods, ranging from months to several years, for field work anddata analysis. Schneider highlighted three new areas of interest indigenous knowledge as:The interest in indigenous technologiesThe involvement of non-anthropologists and development professionals in recordingindigenous knowledgeThe speed with which it is now being accomplished.This shows that indigenous knowledge is gradually gaining the long expectedsignificance in the modern society. Agrawal (2004) noted that earlier theorists sawindigenous knowledge and institutions as obstacles to development.Williams and Muchena (2000) identified the unique, dynamic and creative features ofindigenous knowledge. It is unique in that it is generated in response to the natural andhumanconditions of a particular environment and context. It is dynamic and creative inthatexperimentation and evaluation are continually stimulated by both adaptationrequirements and external influences.Elen and Harris (1996), according
29toSenanayake(2006), provided more characteristics of indigenous knowledge. Thesecomprehensive and conclusive characteristics are as follows.Indigenous knowledge is local. It originates from a particular place based on severalexperiences of people living in that particular place.Indigenous knowledge is transmitted orally, or through imitation and demonstrationIndigenous knowledge is the consequence of practical engagement in everyday lifeand is constantly reinforced by experience and trial and error.Indigenous knowledge is empirical rather than theoretical knowledge.Repetition is a vital characteristic of tradition even when new knowledge is added.This is because repetition aids retention and reinforces ideas.Tradition could be considered as „a fluid and transforming agent with no real end‟when applied to knowledge and its central concept is negotiation. Indigenousknowledge is not static as it is often represented; it is rather constantly changing aswell as reproduced; discovered as well as lost.Indigenous knowledge is mainly shared to a much greater degree than other forms ofknowledge. Its distribution is, however, still segmentary and socially clustered.Although indigenous knowledge may be focused on particular individuals andknowledge may be focused on particular individual and may be focused on particularindividuals and may achieve a degree of coherence in rituals and other symbolicconstructs, its distribution is always fragmentary. It generally does not exist in itstotality in any one place or individual. It is developed in the practices and interactionsin which people themselves engage.Indigenous knowledge is characteristically situated within broader cultural traditions;separating the technical from the non-technical, the rational from the non-rational isproblematic.
30Indigenous knowledge is an invaluable asset for sustainable development. It offersnew models for development that are both ecologically and socially sound.(Senanayake, 2006).A World Bank report noted the relevance of indigenousknowledge on three levels for development processes.Firstly, indigenous knowledge is important for the local communities in which thosewho bear such live and produce.Development agents such as NGO‟s, government, donors, local leaders, private sectorinitiatives also need to recognize, value and appreciate the knowledge as they interactwith the local communities. A thorough understanding of a community‟s indigenousknowledge will result in a successful incorporation of it into development projects.Thirdly, indigenous knowledge forms part of the global knowledge. Indigenousknowledge in itself is valuable and relevant. It can be preserved, transferred, oradopted and adapted elsewhere.Agricultural indigenous knowledge is local and traditional knowledge used by farmers infarming, dairy and poultry production, raising livestock, land evaluation,and soil fertilityto mention a few. It is the means by which farmers adapt to their environment so as toachieve food, income, and livelihood in the midst of changing agricultural environment.Farmers, over the years, have gained knowledge ofcrops and animals around them.Thishas given them knowledge about uses and usefulness of specific plant and animals. Thesefarmers have been, traditionally,the managers of crop germs plasm and its diversity forgenerations, through the testing, preservation and exchange of seeds through informalnetworks. Their special knowledge of the values and diverse uses of plants for foodsecurity, health and nutrition is very vital. (Upreti and Upretu, 2000)
31Farmer‟s use of indigenous knowledge is in an unorganized manner, they search forsolutions for their local farming problems through indigenous knowledge. Thiskindtechnology is user-derived and time-tested. Senanayake (2006) noted acriticalstrength of the indigenous knowledge; its ability to see the interrelation of disciplines, andthen integrate them meaningfully. This holistic perspective and the resultingsynergismshow higher levels ofdevelopmental impact, adaptability and sustainability than Westernmodern knowledge.Bamigboye and Kuponiyi (2010) in their study of indigenous knowledge systems for riceproduction in Ekiti state identified some reasons why most of the farmers preferred theknowledge. The farmers use indigenous knowledge for its Affordability: For instancegrass cutter is controlled by digging trench round the farm and setting of traps,Environmental-friendliness: most of the techniques were also consideredenvironmentally friendly,if not they would have been long forgotten, Effectiveness,andCommunicability: A large number of the farmers considered the knowledge easilycommunicable.2.6 Expert Systems Application in AgricultureThe production of agricultural products, whether crops or animals, has evolved into acomplex business requiring the accumulation andintegration of knowledge (indigenousknowledge inclusive) and information from many diverse sources. In order to surviveintense competition, the modern farmer often relies on agricultural specialists andadvisors to provideinformation for decision making. Unfortunately, agricultural specialistassistance is not alwaysavailablewhen the farmer needs it. In order to alleviate this
32problem, expert systems were identifiedas a powerful tool with extensive potential inagriculture.Prasad and Babu (2006) highlighted three features of an agricultural expert system.It simulates human reasoning about a problem domain, rather than simulating thedomain itselfIt performs reasoning over representations of human knowledgeIt solves problem by heuristics or approximate methodsEarly expert systems in agriculture include:POMME: This is a system which is used for apple orchid management. It offers advicesto farmers on the appropriate time to spray their apples and what to spray in order toavoid infestation. Additionally, it also provides advice regarding treatment of winterinjuries, drought control and multiple insect problems.CUPTEX: An expert system for Cucumber Crop Production. It has subsystems onDisorder diagnosis, Disorder Treatment, Irrigation Scheduling, Fertilization Scheduling,and Plant care.CITEX: An expert system for Orange Production. It has subsystems on farm assessment,Irrigation Scheduling, Fertilizer Scheduling, Disorder diagnosis, and Disorder treatment.TOMATEX: An expert system for Tomatoes. The disorder diagnosis subsystem providesinformation about the causes of user complain and it verifies user assumption, while thedisorder treatment offers the user advice about the treatment operation of the infectedplant.LIMEX: A multimedia expert system for Lime Production.
33CHAPTER THREESYSTEM ANALYSIS3.0 IntroductionSystem analysis describes in detail the existing system, thereby identifying thedeficiencies of the system as justification for the need of an improved system.Additionally, this section will describe the alternative system briefly with emphasis onhow it will overcome the problems posed by the existing system. A thorough analysis ofthe alternative system will be given in the succeeding chapter. The methods used for datacollection will also be described.3.1 Existing SystemCrop protection is a very significant aspect of agriculture which draws on the strategies toprevent and control problems posed by pests, diseases, and weed in crop production.Pests, diseases and weed may attack crops in either similar or dissimilar ways, theireffects on crops, however, are constant. The damages caused by pests, diseases, and weedresults in reduction ofyields and low quality of yields, which consequently reduces theprofit margins for commercial farmers.An invaluable asset in crop management is indigenous agricultural knowledge; it hasserved as a means of survival through several generations. Sadly to say, indigenousagricultural knowledge is fast disappearing. The documentation and distribution ofindigenous knowledge, according to Abioyeet al. (2011), remain a big challengeconfronting librarians and other information professionals, particularly in Africa wherecultural practices are prevalent.
34In the course of this present project it was found out there are no indigenous agriculturalknowledge databases and inquiry systems which could aid knowledge sharing,distribution and preservation.There are documentations of general agricultural topics butthere is no documentation of agricultural indigenous knowledge, whether in print orelectronically.The importance of agricultural indigenous knowledge iswidelyacknowledged by researchers but little has been done to document it.Rural farmers who possess this knowledge merely share with their colleagues orally whenthe need for it arises. Some institutions such as Organic Farmers Association also partakein sharing some indigenous knowledge among interested farmers, but how much ofsharing and preservation can be done by such institutions considering the fact that theseinstitutions have roots in rural areas and they have limited resources, in terms ofInformation and Communication Technologies (ICT).The existing system is highlylimited, if it is left unattended to the available indigenous agricultural knowledge maybecome extinct.3.2 Problems of the Existing SystemThe problems associated with the existing system include:Limited knowledge sharing: it is important to know that no matter how relevantknowledge is to the society they cannot benefit from it if it is not well distributed tomembers of the society. In the existing system knowledge cannot be easily sharedamong farmers, researchers and other stakeholders.Knowledge loss: farmers (in this sense, experts) who possess this knowledge are mostelderly people who are fast approaching their dying days. The existing system does
35not have a documentation sub-system for the knowledge, thus posing a greater risk ofknowledge extinction.Considering the physical state of the experts (elderly farmers) much cannot be done inthe existing system.3.3 The Proposed SystemThe proposed alternative system is a knowledge-based system, also called an expertsystem. A knowledge-based system is a computer program designed to solve problems, inspecific narrow domains, in the manner in which human expert would.A knowledgebased system has features that will enable it store, share, and process knowledge.Expert system in the agricultural environment is necessitated by the limitations associatedwith conventional human decision-making processes. These limitations include:1. Human expertise is very scarce. Farmers who practice indigenous agriculture arenot as many as in the early years of farming. Most of them have taken to modernfarming.2. Humans get tired from physical or mental workload and this may cause them toforget crucial details of solutions.3. Humans are inconsistent in their day-to-day decisions.4. Humans have limited working memory.5. Humans are unable to retain large amounts of data in memory and may be slow inrecalling information stored in memory.6. Humansdie.
36The system is designed to capture data such as the name of pests and diseases, treatmentfor the pests and diseases, preparation of treatment solution (where necessary) and storagemethods.Fig 3.1: An overview of the knowledge-based system3.4 Benefits of the Proposed SystemThe knowledge-based system will capture data which will be processed to produceresults.Expert systems inthe agricultural environment will offer benefits which aresolutions to the aforementioned problems. The system will:1. Increase the probability, frequency, and consistency of making good decisions2. Help distribute human expertise3. Facilitate real-time, low-cost expert-level decisions by the non-expert4. Permit objectivity by weighing evidence without bias and without regard for theuser‟s personal and emotional reactionsKnowledgeAcquisitionKnowledgeVerifications andValidationKnowledgeRepresentationKnowledgeBaseandotherComponentsExpertsUsersDeveloper’sInterfaceKnowledgeEngineer
375. Free up the mind and time of the human expert to enable him or her toconcentrate on more creative activities.3.5 Methods of Data CollectionThe data needed for this present project is indigenous knowledge used for pest anddisease control, symptoms of pest and disease attack, and storage methods. Theresearcher started out by gathering data from the farming community of Ijero Ekiti inEkiti state. At the end of the process the data gathered was not substantial enough todevelop a knowledge-based system. The researcher, faced with the financial challengesand limited time, resorted to gather more data from secondary sources.Thus, data was collected from primary sources, through interview sessions, andsecondary source such as agriculturalbooks, journals and publications. The data requiredfor the proposed system includes:Name of CropsName ofPestsName of diseasesIngredients used for treatmentsMethods of preparing treatment solutions (where necessary) and application
38CHAPTER FOURSYSTEM DESIGN4.0 IntroductionThis chapter contains a detailed description of the proposed system. The descriptionincludes objective of the system, the entities involved in the system, and the processingprocedure used by the system.4.1 Objectives of the systemThe main objective of the alternative system is to provide expert services in indigenouspest and disease control and storage methods. Its sub objectives include knowledgestorage and knowledge sharing.4.2 Expert System at WorkThe functioning of the expert system requires a number of elements or subject. Thisbegins with the knowledge expert. The knowledge expert is responsible for thecoordination of other elements required to make it work.Secondly is the domain expert.Domain experts are those who possess the knowledge inthe domain for which the system is built. In this present study farmers are the domainexperts.Theusers of the expert system are farmers, extension officers, students and otherstakeholders in the agriculture industry.The user interface is the front end through which the user will interrogate the system.
39The expert system has an explanation facility which documents the reasoning steps of thesystem. It also contains trace facility to trace the reasoning behavior in the systemThe knowledge base component captures the domain knowledge. The names of crops,pests, and diseases, descriptions of pest and disease control, descriptions of symptomsand storage methods which were elicited from farmers and gathered from books arecontained in this component of system.The inference engine consists of algorithms that process the knowledge which isrepresented in the knowledge base.4.3 Stages ofDeveloping an Expert SystemThere are some basic steps to be followed in development of an expert system.1. Identify a problem in a domain. The development of an expert system must bejustified by a real problem that needs to be solved. This system seeks to enhancethe use of agricultural indigenous knowledge in crop protection. Additionally, itwould create a platform to protect the indigenous knowledge.2. Outline and describe the knowledge required for the system.3. Select development tools. These are software and hardware components requiredfor the system development.4. There are a number of methods that can be used to elicit knowledge. Themethod(s) to be used can be chosen based its suitability to the type of knowledgeand convenience of the domain expert.5. The knowledge engineer acquires the knowledge with the chosen method.6. After the knowledge has been elicited the knowledge engineer analyzes. Heorganizes the knowledge into the format which will suit the knowledgerepresentation method.
407. The design is done; it entails write of source codes. The logical and physicalviews are also linked.8. When the design has been completed the system should be tested to ensure that itis working. By testing bugs can be detected and fixed.9. Trainings of users and necessary structures should be put in place to make thesystem ready for use.10. In order to ensure that the functioning of the system is not interrupted, constantchecks should be carried out. Expert systems primarily need to be updated.
41Fig 4.1: Processes of Expert System DevelopmentIdentify domainOutline theknowledge requiredSelect method forknowledge acquisitionAcquire knowledgeRecode andorganizeknowledgecollectedSelectDevelopment ToolDesignTesting andValidationImplementationMaintenance
424.4 COMPUTING ENVIRONMENTThis comprises description of the hardware and software component required in thedevelopment of the system.4.4.1 Software1. The design is based on SWI-PROLOG 6.1.2, thus, the need for a personalcomputerThe system was developed with SWI-Prolog (6.1.2 version) because it offers some goodfacilities.It has a good environment: This includes „Do What I Mean‟ (DWIM), automaticcompletion of atom names, history mechanism anda tracer that operates on singlekey-strokes. Interfaces to some standard editors are provided(and can beextended), as well as a facility to maintain programs.It has very fast compiler: Even very large applications can be loaded in secondson most machines. If this is not enough, there is a Quick Load Format that isslightly more compact and loading is almost always I/O bound.Transparent compiled code: SWI-Prolog compiled code can be treated just asinterpreted code: you can list it, trace it, etc. This implies you do not have todecide beforehand whether a module should be loaded for debugging or not. Also,performance is much better than the performance of most interpreters.Profiling: SWI-Prolog offers tools for performance analysis, which can be veryuseful to optimize programs.Flexibility: SWI-Prolog can easily be integrated with C, supporting non-determinism in Prolog calling C as well as C calling Prolog. It can also be
43embedded in external programs. System predicates can be redefined locally toprovide compatibility with other Prolog systems.Integration with XPCE: SWI-Prolog offers a tight integration to the ObjectOriented Package for User Interface Development, called XPCE. XPCE allowsyou to implement graphical user interfaces that are source-code compatible overUnix/X11, Windows and Mac OS X using X11.Prolog was designed by Alain Colmerauer and Robert Kowalski, and is used in artificialintelligence (AI) and computational linguistics. Prolog stands for “Programming inLogic”. It helps to create logic models that describe the world in which a problem exists.It is a declarative language whose code may be interpreted procedurally for the benefit ofprograms steeped in procedural thinking.Prolog is declarative language in that facts about the problem to be solved are statedalong with its rules. The inference engine uses the stated facts and rules to reason outsolutions to problems. Its procedural feature stems from the process by which itaccomplishes a task.According to Merrit (2002), there are three main features which influence theexpressiveness of Prolog. These features are the rule-based programming, built-in patternmatching, and backtracking execution. The rule-based programming allows the programcode be written in a more declarative form while the built-in provides for the flow ofcontrol in the program.Backtracking is search process used by prolog. Whenever a non-deterministic choice is made the program is made to go back and choose the nextalternative branch. This continues until it there is a match but if after all the nodes havebeen searched and there is no match, it displays an output “no” or “false”.
44A Prolog program basically consists of facts and rules. A fact is a prolog statementwhich consists of an identifier (mostly referred to as Predicates) followed by an n-tuple ofconstants (also called Arguments). For example:Line 1 pest(rice,case_worm).Line 2 pest(rice,stem_borer).Line 3 pest(rice,grasscutter).Line 4 pest(wheat,aphids).Line 5 pest(wheat,mites).Line 6 pest(Crop,Pest):-Crop(Crop,Pest).Lines 1 to 5 are facts. In the facts stated “pest” is the predicate while the other parts of thestatement (in parenthesis) are the arguments. Note that facts must always be ended with aperiod in prolog. The facts states that rice has pests such as case worm, stem borer, andgrasscutter while wheat has pests such as aphids and mites. Lines 1 to 3 and lines 4 to 5can be restated in the form of lists.Line 7 pest(rice,[„case_worm‟,‟stem_borer‟,‟grasscutter‟]).Line 8 pest(wheat,[„aphids‟,‟mites‟]).Line 6 is a rulewhich consists of a head and a body separated by “:-“. The symbol “:-“means “if”. The head of the rule is true if all predicates in the body can be proved to betrue. The head of the rule is the conclusion or goal to be achieved while the body is thecondition(s) which must be fulfilled in order for the goal to be achieved.Prolog was chosen for the development of this system because it is well suited for solvingproblems that involve objects and relations between objects.
452. NetBeans IDE:NetBeans is an integrated development environment (IDE) fordeveloping primarily with Java, but also with other languages, in particular PHP, C/C++,and HTML5. It is also an application platform framework for Java desktop applicationsand others.The NetBeans IDE is written in Java and can run on Windows, OS X, Linux, Solaris andother platforms supporting a compatible JVM.The NetBeans Platform allows applications to be developed from a set of modularsoftware components called modules. Applications based on the NetBeans Platform(including the NetBeans IDE itself) can be extended by third party developers.Java Program ExecutionThe Java byte-code compiler translates a Java source file into machineindependent bytecode. The byte code for each publicly visible class is placed in aseparate file, so that theJava runtime system can easily find it. If the programinstantiates an object of class A, forexample, the class loader searches thedirectories listed in your CLASSPATHenvironment variable for a file called A.classthat contains the class definition and bytecode for class A.There is no link phase for Java programs; all linking is done dynamicallyatruntime.4.5 Information FlowBelow is the breakdown of information flow within the system:i. InputCrop selection formPest/Disease/Storage/Symptoms selection form
46ii. OutputTreatment display formFig 4.2: Logical View ChartThe logical view above highlights the components of the front end of the knowledge-based system.The view consists combo boxsuch as that from which a choice of crop ismade, radio buttons which can be checked to make a choice of pest, or disease orstorage, list area which contains a list of pests or diseases (this is dependent or the choicemade with the radio buttons),text area which displays results, andbuttonswhich enableprocessing such as analyze, refresh and close. The view also contains a progress bar anda form label. The menu barhas file and help labels.Crops Pest/Disease/Storage Analyze Display BoxRefreshClose
47A program flowchart describes what takes place in a program; it displays specificoperations and decisions, their sequences within the program run or phase.Fig 4.3: Program Flow ChartThe user selects the crop for which he wants information about and further selects of pest,disease or storage depending on what he wants to know about the crop he selected. HeStartSelectCropSelect eitherPest orDisease orStoragePestStorage DiseaseSymptomsand ControlStoragemethodsSymptoms andControlRefresh
48sends the information into the system by clicking on the analyze button. The systemprocesses the information supplied and returns answers into the text area. The user canrefresh the system if he wants to interrogate the system again and he can close theapplication at the end of the session.
49CHAPTER FIVESYSTEM DEVELOPMENT5.1 IntroductionThis chapter describes the implementation of the Rule BasedSystem. The programdevelopment necessitates the transformation of system design specifications intofunctional applications accessible to users. It describes the actual processes ofspecification, programming, compilation, installations, and testing.5.2 ProgrammingAs stated earlier in the previous chapter, the Rule-Based System was implementedin SWI Prolog. The language was chosen because it permits express declaration ofinformation and the rules that would be applied to the information so as to generateknowledge. Unlike procedural languages where the programmer writes instructionsthat tell the computer what to do and how to do it, declarative languages, one ofwhich Prolog is, only requires a database of facts and rules and the system willprovide the answers to queries based on the facts and rules given.The following tasks were carried were carried out:Input and Edit: The acquired knowledge was systematically entered into theknowledge-base as prolog declaratives. This approach makes it feasible to edit theknowledge-base by removing, correcting or adding rules to the knowledge-base.Testing and Debugging: In order to confirm that the system is working accordingto specification there is need to test and remove bugs which could hinder its efficientperformance. An added advantage to the use of SWI-Prolog is that the programmingenvironment offers the possibility for interactive edit and reload of a program.
505.3 CompilationFast compilation isvery important during the interactive development of largeapplications.SWI-Prolog supports the commonly found set of compiler warnings: syntaxerrors,singleton variables, predicate redefinition, system predicate redefinitionand predicates.Messages are processed by the hookableprint message/2 predicate and where possibleassociated with a file and linenumber. The graphics system contains a tool that exploitsthe message hooks tocreate a window with error messages and warnings that can beselected to openthe associated source location.5.4 SpecificationsThe Knowledge-Based System was developed on a system with the specificationsin the table below. However, it does not imply that the system will not work if itis developed on a system with lower specification. The system described below isa guarantees proper functioning of the Knowledge-Based System.Processor Intel Core 2Duo Processor 1.60GHzOperating System Genuine Windows 7 Ultimate 32-bitsOperating SystemSystem memory 2.00 GBDisplay 15.4-inch diagonal WXGAPointing Device Touchpad with scroll zone
515.5 Pseudocodes for the SystemStart sessionSelect CropSelect Pest OR Disease OR StorageIf Pest is selectedThen display treatmentIf Disease is selectedThen display treatmentIf Storage is selectedThen display methodEnd of sessionDiagnosisIf SymptomsLoad Pest OR DiseaseThen display treatmentEnd of session.5.6 Program testing and debuggingThe essence of testing and debugging the system is to ensure that it delivers fullythe service it is designed for. The knowledge-based system was tested at twostages.The first was carried out by the researcher on the knowledge-based system. Thesystem carries out task through the processes of pattern matching andunification.
52Secondly, ten people were purposively selected to use the system after which theyfilledthe assessment form. The result of the assessment is discussed in thesucceeding chapter.The ten people selected for the assessment of the knowledge-based systemcomprised of people within and outside the academia in order to achieve abalance in the assessment. The respondents included a mix of present and paststudents from the researcher’s department (African Regional Center forInformation Science); this is because they have insights into knowledgemanagement, knowledge-based system, information systems and other relatedconcepts. There was also a mix of students, research assistant and lecturer fromthe Faculty of Agriculture and Forestry because of their expertise agriculturalpractices. Finally, there were two respondents who are not in the academe.
53CHAPTER SIXSYSTEM IMPLEMENTATION AND EVALUATION6.0 IntroductionThis chapter is aimed at describing the ease of use of the knowledge-based system.Ausability test was carried out with a 5-point Likert scale (Poor, Fair, Satisfactory, VerySatisfactory, and Excellent)questionnaire.6.1 System Implementation6.1.1 System InstallationSystem installation is the process of setting up the system so that it can be ready for use.The expert system installation requires the transfer of files between prospective users.When files have been transferred to the computer to be used, the expert system is readyfor use. The user is only required to open the file by either clicking twice on the expertsystem icon or right-click once, then select “Open”from the box which pops up.6.1.2 System TestingSystem testing involves putting the system in order to discover errors and bugs in thesystem,and most importantly to determine if it meets its requirement and functionalspecifications. The system was tested in units and overall.6.1.3 System Conversion PlanSystem conversion is the process of changing form an old system to an improved newsystem. A conversion plan helps ensure that no stakeholder is left out of the transitionprocess. System conversion is carried outusing either the Direct conversion method or theParallel conversion method. In Direct conversion the new system instantly replaces the
54old while the Parallel conversion method permits the old and the new system to be usedsimultaneously until the new system is proven to work effectively.The methods of conversion mentioned above may not perfectly fit for this present study.This is becausethe oral means of transferring knowledge cannot be totally done awaywith; the new system, therefore, is designed to complement the old in its efforts to sharethe knowledge and motivate the use of agricultural indigenous knowledge.6.1.4 User trainingThe report from the test shows that the intuitive GUI aids easily understanding of theprogram usage. There is little or no need for training to use the system. The requirementis that the application be transferred to a personal computer. After the transfer, open theapplication for use by double-clicking on the application icon.6.2 System EvaluationAs stated earlier questionnaires were used gather the opinions of persons who participatedin the testing of the expert system.The questionnaire has two sections- the backgroundinformation and usability information. The background information section retrievesinformation about the user‟s gender, age, education background, and years of computerliteracy while the usability information retrieves information on the ease of use of theapplication.The instrument also tested the extentto which the system enhances knowledgesharing, protection of agricultural indigenous knowledge, and increase the use of AIK.The test was conducted outside and within the academic environment to show that the useof the application is not limited. Ten questionnaires were administered to both male andfemale respondents. Below is the report on the responses.
55Ease of use of the application: The participant‟s responses were between „satisfactory‟and „excellent‟. They easily understood the texts and the paths to the information on theapplication.Usefulness of the application: The usefulness of the system was measured in terms ofenhancement of the use of AIK, sharing and protection of AIK. The responses from theten participants varied based on the scale given (1=poor, 2=fair, 3=satisfactory,4=verysatisfactory,5=excellent).Table 6.1:The Result of the Usability TestParticipants Knowledge sharing Increase use of AIK Protection of AIK1 Fair Fair Satisfactory2 Excellent Very satisfactory Excellent3 Excellent Excellent Very satisfactory4 Excellent Very satisfactory Very satisfactory5 Very satisfactory Very satisfactory Excellent6 Very satisfactory Excellent Very satisfactory7 Satisfactory Very satisfactory Very satisfactory8 Very satisfactory Not emphatic enough Very satisfactory9 Excellent Excellent Excellent10 Very satisfactory Excellent ExcellentThe tables below show the result of the usability test with respect to the basicfeatures of the knowledge-based system.Table 6.2:Access
56Frequency Percent Valid PercentCumulativePercentValid Satisfactory 2 20.0 22.2 22.2Verysatisfactory4 40.0 44.4 66.7Excellent 3 30.0 33.3 100.0Total 9 90.0 100.0Missing System 1 10.0Total 10 100.0Twenty percent rated the accessibility features „Satisfactory‟, forty percent rated „Verysatisfactory‟ and thirty percent rated it „Excellent‟.Table 6.3: IdentityFrequency Percent Valid PercentCumulativePercentValid Fair 1 10.0 12.5 12.5Satisfactory 1 10.0 12.5 25.0Verysatisfactory4 40.0 50.0 75.0Excellent 2 20.0 25.0 100.0Total 8 80.0 100.0Missing System 2 20.0Total 10 100.0Ten percent of the respondents rated the ease of identifying functions of the system „Fair‟,ten percent rated „Satisfactory‟, forty percent rated „Very satisfactory‟ and two percentrated it „Excellent‟.Table 6.4:NavigationFrequency Percent Valid PercentCumulativePercentValid Fair 1 10.0 11.1 11.1
57Satisfactory 1 10.0 11.1 22.2Verysatisfactory2 20.0 22.2 44.4Excellent 5 50.0 55.6 100.0Total 9 90.0 100.0Missing System 1 10.0Total 10 100.0Ten percent of the respondents rated the ease of navigating around the system „Fair‟, tenpercent rated „Satisfactory‟, twenty percent rated „Very satisfactory‟ and fifty percentrated it „Excellent‟.Table 6.5: ContentFrequency Percent Valid PercentCumulativePercentValid Fair 1 10.0 11.1 11.1Satisfactory 1 10.0 11.1 22.2Verysatisfactory6 60.0 66.7 88.9Excellent 1 10.0 11.1 100.0Total 9 90.0 100.0Missing System 1 10.0Total 10 100.0Ten percent of the respondents rated the clarity of contents in the system „Fair‟, tenpercent rated „Satisfactory‟, sixty percent rated „Very satisfactory‟ and ten percent rated it„Excellent‟.Table 6.6:UsageFrequency Percent Valid PercentCumulativePercent
58Valid Fair 1 10.0 12.5 12.5Satisfactory 2 20.0 25.0 37.5Verysatisfactory3 30.0 37.5 75.0Excellent 2 20.0 25.0 100.0Total 8 80.0 100.0Missing System 2 20.0Total 10 100.0Ten percent of the respondents rated the ease of use of the system „Fair‟, twenty percentrated „Satisfactory‟, thirty percent rated „Very satisfactory‟ and twenty percent rated it„Excellent‟.Participants were also allowed to give their opinion about the system and to makesuggestions for improvement on the experts systems. The report is given below.Table 6.7: Participants Opinion about the SystemParticipant Suggestions
591 Adequate information should be considered in setting up the systemThere should be a collaborative work or a recommendation toextension officers/agriculturist to enable ease of setting up thesystem2 It will be nice if local names can be translated for easyunderstanding of all tribes or origins3 Make interface more attractive with colorsProofread for errors in sentences4 Efforts should be made to reduce the number of areas where thereare no information in the analysis report5 Adopt use of graphics to drive home the message intended6 Nil7 The designer should upgrade the interface for readabilityPerfect the background environment to enhance quick access todata8 Be more in-depth with informationAllow an interface for question or FAQ and feedback9 Nil10 More indigenous knowledge for more crops to be investigated at thefamers baseAgricultural researchers and extension officers to be contractedFunds should be provided for the indigenous knowledge programCHAPTER SEVENSUMMARY, CONCLUSON AND RECOMMENDATION
607.0 SummaryThe focus of this study has been to make a computer an expert by providingindigenousknowledge on symptoms of pest and disease attack in crops, indigenoussolutions forpests and diseases in crops and indigenous storage methods. The studyalsosheds more light on the integration of information systems into the agriculturalsystem in order to preserve indigenous knowledge, and enhance knowledge sharing.The software used in building the system were SWI-Prolog version 6.1.2 andNetBeans.The knowledge base was developed majorly from secondary resources such asbooks, journals, and publications. Knowledge was also elicited from farmers.A review ofthe existing system made clear the need for a knowledge-based system for indigenouspest and disease control, and storage methods.7.1 ConclusionThere is a popular saying that “when an old man dies in Africa, a whole library perisheswith him”. The common means of transferring indigenous knowledge has been the oralmethod and as soon as the person who has the knowledge dies the method of transferenceis terminated. This emphasizes the urgent need for the documentation of indigenousknowledge.Thus, there is need to develop strong systems to enhance the use of indigenousknowledge. It would accelerate the diffusion of indigenous knowledge and prevents itsextinction.7.2 Recommendations
61The recommendations from this research are based on the researchers experience in thecourse of the study and comments given during the evaluation process.1. Thorough documentation and management of agricultural indigenous knowledgein NigeriaA very significant part of this study that requires further research isdocumentation of agricultural indigenous knowledge. In the process of data acquisition itwas found out that indigenous knowledge is not documented. There are quite a number ofliteratures on indigenous knowledge but much effort has not being given to documentingthe knowledge. The researcher encountered huge difficulties in the process of dataacquisition.2. Collaboration between research institutes and libraries of departments ofagriculture in the universities should be boosted.3. Literature reveals that inadequate funding is a major obstacle faced indocumenting and sharing of indigenous knowledge. It is suggested that government andprivate institutions should collaborate to fund such projects.4. National agricultural indigenous knowledge resource centers should beestablished. This would serve as a home for agricultural indigenous knowledge whereresearchers can easily find knowledge required for research and development.5. Based on comments about expanding the functionality of the system, it is suggestedthat a web-based indigenous knowledge system should be developed.REFERENCESAbebe, S., Bereket, D.,Kahsay, B.,Azage, T,.and Dirk, H. (2008).Recognizing Farmers’Knowledge in Development Initiatives: Indigenous Bee-keeping in Alaba SpecialWoreda, Southern Ethiopia.Adedipe, N. O.,Okuneye, P. A.,Ayinde, I. A. (2004). The Relevance of Local andIndigenous for Nigerian Agricuture. International Conference on Bridging Scales
62& Epistemologies: Linking Local Knowledge With Global Science in Multi-ScaleAssessments, Alexandria, Egypt.Adesiji, G.B, Ogunlade,I., Adisa, R. S., Adefalu, L. L., and Raji, M. K. (2009).Indigenous Methods of Controlling Pests among Rice Farmers in Patigi LocalGovernment Area of Kwara State, Nigeria.Akegbejo-SamsonsYemi (2009).Promoting Local and Indigenous Knowledge inEnhancing Adaptive Capacities under Extreme Events in Nigeria.University ofAgriculture, Department of Aquaculture and Fisheries Management, Abeokuta,Nigeria.Arum Agrawal (2004).Indigenous and Scientific Knowledge: Some CriticalComments.University of Florida, Department of Political Science.Ashok Jashapara (2011). Knowledge Management: An Integrated Approach. pg 18Bamigboye, E. O. and Kuponiyi, F. A. (2010).The Characteristics of IndigenousKnowledge Systems Influencing Their Use In Rice Production By Farmers In EkitiState, Nigeria.Ozean Journal of Social Sciences 3(1), 2010, ISSN 1943-2577,2010 Ozean Publication.Böck, Heiko (2009). The Definitive Guide to NetBeans Platform (First ed.).Apress.pp. 450.ISBN 1-4302-2417-7.Boudreau, Tim; Glick, Jesse; Greene, Simeon; Woehr, Jack; Spurlin, Vaughn(2002).NetBeans: The Definitive Guide (First ed.). OReillyMedia.pp. 672.ISBN 0-596-00280-7.Cooperative Extension Work in Agriculture and Home Economics, The University ofTennessee Cotton Disease (2000).Dahiya, P. S., Khatan, V. S., Ilangantileke, and Dabas, J. P. S. (1997).Potato StoragePatterns and Practices in Meerut District, Western Uttar Pradesh, India.David B. Fogel and Paul Schwartz (2006).Evolutionary Computation.The Institute ofElectrical and Electronics Engineers, Inc.David Poole (1999). Logic, Knowledge Representation and Bayesian Decision Theory.Pg2.Elaine Rich (2003). Artificial Intelligence: Our Attempt to Build Models ofOurselvesFundamentals of Expert Systems. Available at: www.media.wiley.com.Assessed on 15thMarch 2012.Global Change System for Analysis Research, and Training (START)http://start.org/programs/africangec/2011-grants/indigenous-knowledge-adaptation-nigeria.Hagedorn, D. J., Inglis, D. A. (1998). Handbook of Beans Diseases.
63Hajek M. (2005). Neural Networks.Heffelfinger, David (2008). Java EE 5 Development with NetBeans 6 (First ed.). PacktPublishing. pp. 400.ISBN 1-84719-546-6.http://www.csse.uwa.edu.au/programming/swi-prlog/sec-3.13.html#assert/1.Assessed 29thNovember 2012.Identification, symptoms and nature of damage: potato tuber moth and cut worm.http://agropedialabs.iitk.ac.in/agrilore/?q=node/2408 assessed on 15th November2012.International Potato Center, Apartado (1996). Major Potato Diseases, Insects, andNematodes.IpoolaOlabiyi Timothy (2004). Diseases of Food Crops and their Control Principles.James Wexler (2007). Artificial Intelligence in Games: A look at the smarts behindLionhead Studio’s “Black and White” and where it can and will go in the future.Keegan, Patrick; Champenois, Ludovic; Crawley, Gregory; Hunt, Charlie; Webster,Christopher (2006).NetBeans IDE Field Guide: Developing Desktop, Web,Enterprise, and Mobile Applications (Second ed.).PrenticeHall.pp. 424.ISBN 978-0-13-239552-6.Myatt, Adam (February 21, 2008). Pro Netbeans IDE 6 Rich Client Platform Edition(First ed.). Apress.pp. 491.ISBN 1-59059-895-4.Nancy J. Cooke (1999). Handbook of Applied Cognition: Knowledge Elicitation.Pg. 2.NwajiubaChiedum (2012). Nigeria’s Agricultural and Food Security Challenges.Paul, S (1996). Myers Knowledge Management and Organizational design. pg1Peter Lucas (2012). Artificial Intelligence- Expert Systems.Prasad G.N.R.and Babu A. V.(2006).A Study on Various Expert Systems in AgricultureRob Schapire (2003). Foundations of Machine Learning.Retreieved on 28thNovember2012 from http://www.cs.princeton.edu.Roman V. Belavkin. Lecture 6: Introduction to Expert Systems. Available at:www.eis.mdx.ac.uk. Assessed: 17thMarch 2012Russell, S., Norvig, P (2003).Artificial Intelligence- A Modern Approach2Ed,Ph,2003.Senanayake S.G.J.N. (2006). Indigenous Knowledge as a Key to SustainableDevelopment.Shadbolt, N.; Burton, A. M. (1989).The empirical Study of Knowledge ElicitationTechniques.
64Shale Legg and Marcus Hutter (2006).A Collection of Definitions of Intelligence.Sharon B. Le Gall (2009). An Introduction to Core Concepts and Objectives: What areTraditional Knowledge, Genetic Resources and Traditional Cultural Expressionsand Why Should They Receive Legal Protection?Pg 18Studley John (1998). Dominant Knowledge Systems and Local Knowledge.Upreti Y. G. and Upreti B. R. (2000).Indigenous Knowledge, Agricultural Practices andFood Security in Developing Countries: Opportunities and Challenges.Wang Pei (2007). Artificial General Intelligence: a Gentle Introduction.William D. L. and Muchena N. O. (2000).Utilizing Indigenous Knowledge Systems inAgricultural Education to Promote Sustainable Agriculture.Workineh M. Y, Garfield M. J, and Boudreau M (2010).Indigenous Knowledge CreationPractices: The Case of Ethiopia.APPENDIX IAfrican RegionalCenter forInformationScienceUniversityof Ibadan
65Dear Respondent,Application Usability SurveyThis questionnaire is an application usability test for a knowledge-based system for IndigenousKnowledge for Crop Protection. The overall aim of the research is identify the ease of use of theapplication in querying for the recommendation on storage and its usefulness in providingindigenous knowledge for crop protection.The survey is completed anonymously by possible users of the system; no personal data is askedfor or retained (no respondent name or address required). Please note that all data collected in thissurvey will be held anonymously and securely. During data analysis and report presentation, allresponses will be kept confidential.Thank you for your time. Boriowo, OluwadamilolaHannah
66Section 1: Background InformationA) Gender:Male FemaleB) Which age range do you belong?20 years & below 41 – 50 years21 – 30 years 51 years & above31 – 40 yearsC) Education BackgroundUn-educated SSCEPrimary level ND/HND/TCEJSCE BSc or higherD) Computer Literacy:1 Month less Above 1 year2 – 6 Month6 months– 1 year
67Section B: Usability InformationUsing a scale shown below, kindly fill in your assessment of the application against each usabilityfactorRating1 Poor2 Fair3 Satisfactory4 Very Satisfactory5 ExcellentS/no. Usability Factor RatingAccessibility 1 2 3 4 51 Application load‐time is reasonable2 Adequate text‐to‐background contrast3 Meaning of text is clear4 Font size/spacing is easy to readIdentity5 Interface makes purpose of the application clear6 Application interface is digestible in 5 secs7 Clear path to application information8 Clear path to application contact informationNavigation9 Main navigation is easily identifiable10 Navigation labels are clear & concise11 Number of buttons is reasonable12 Buttons are consistent & easy to identifyContent13 Major headings are clear & descriptive14 Emphasis (bold, etc.) is used sparingly15 Styles & colors are consistent16 Content layout is meaningful & user‐friendlyUsage17 Crop Selection is Intuitive18 Displayed analysis report is informative and useful19 Application crashes/hangs during use20 Sequence of flow is consistent with regular practice
68The knowledge system was developed to aid knowledge sharing, enhance the use of agriculturalindigenous knowledge, and protect agricultural indigenous knowledge. Please use the scale above torate the effectiveness of this system in the areas listed belowa. Knowledge sharingb. Enhance use of agricultural indigenous knowledgec. Protect agricultural indigenous knowledgeWhat is your suggestion?a. ___________________________________________b. ___________________________________________
69APPENDIX IIA knowledge-based system for indigenous pests and disease control, and storageSubmitted in partialfulfillment of the requirements for M.Inf. Sc Degree of the Africa Regional Centre for InformationScience, University of Ibadan, Ibadan.optionsview(disease,Crop):-diseaseview(Crop),write(Enter corresponding number to disease : ),read(DiseaseNumber),nth1(DiseaseNumber,Diseases,Disease),disease(Crop,Diseases),member(Disease,Diseases),symptom(Crop,Disease,Symptom),write(The symptoms of ),write(Disease),write( are ),nl,writelist(Symptom),diseasecontrol(Crop,Disease,Control),write(Disease),write( can be controlled in the following ways : ),nl,writelist(Control),nl,nl,main.optionsview(pest,Crop):-pestview(Crop),write(Enter corresponding number to pest : ),read(PestNumber),nth1(PestNumber,Pests,Pest),
70pest(Crop,Pests),member(Pest,Pests),symptom(Crop,Pest,Symptom),write(The symptoms of ),write(Pest),write( are ),nl,writelist(Symptom),pestcontrol(Crop,Pest,Control),write(Pest),write( can be controlled in the following ways : ),nl,writelist(Control),nl,main.optionsview(storage,Crop):-storage(Crop,Storage),writelist(Storage),nl,main.indexedmenu(,_).indexedmenu([H|T],Index1):-write(Type ),write(Index1),write( for ),write(H),nl,succ(Index1,Index2),indexedmenu(T,Index2).diseaseview(Crop):-disease(Crop,Diseases),indexedmenu(Diseases,1).pestview(Crop):-pest(Crop,Pests),
71indexedmenu(Pests,1).cropview:-crops(Crops),indexedmenu(Crops,1).optionsview(Info_options):-info_options(Info_options),indexedmenu(Info_options,1).dcontrolview(Crop,Disease,Control):-diseasecontrol(Crop,Disease,Control),indexedmenu(Control,1).writelist():-nl.writelist([H|T]):-write(H),nl,writelist(T).main:-write(Main Menu),nl,cropview,write(Enter corresponding number to desired crop: ),read(CropNumber),nl,crops(Crops),
72nth1(CropNumber,Crops,Crop),info_options(Options),indexedmenu(Options,1),write(Enter corresponding number to desired option: ),read(OptionNumber),nth1(OptionNumber,Options,Option),optionsview(Option,Crop).