Expert Systems used to disseminate complex information in agriculture and horticulture
The Department of Primary Industry and Fisheries of Tasmania has used Expert Systems technology to assist the delivery of information to farmers. Farming in the developed world has become technologically advanced, and, as a result, the decisions that farmers face are more complex. Printed notes rapidly become out of date and for these reasons we looked to a technology solution.
An early application was the development of “Pasturepak” an expert system designed to enable counter staff at seed retailers deliver the Department’s expert advice on pasture seed mixtures and appropriate cultivars (varieties). The staff get questions from farmers who wish to sow pastures for different purposes, climate and soil types. Pasturepak was developed using a DOS based Expert System shell called Crystal. An advantage was that the Department did not have to rely on the farmers owning computers
We searched for a product that would suit our need. We selected XpertRule® because it was a true Expert System, rather than a front end for a data base. It also had connectivity with MS Office programs, plus ODBC, DDE and OLE connectivity. The software looked truly professional with the ability to include Winhelp, and the appearance of the runtime products on screen was better than others that we considered. Although XpertRule was not the cheapest Expert System shell on the market, our experience with Crystal had taught us that a good shell saves in development time and would be the cheapest option in the long run
It was not possible to read the rules from Crystal into XpertRule. This did not deter us because the real work in developing an Expert System is the time spent in developing rules and the models contained within an Expert System. It took us a short while to learn XpertRule, because it is a new technology with a different structure. In XpertRule the logic is broken down into “Tasks” and these may be forward chained or backward chained, concepts familiar from previous development with Crystal. We found the graphic representation in XpertRule brilliant, and the ability to include code has not been lost. In XpertRule the code is bundled into “Procedures” and it is easy to keep track of where these are in the program. Building dialog boxes is quick, and there is a facility to duplicate and edit for even more efficient development.
The “Apple Thinning Program”
Apple orchards are important in primary production in Tasmania, and there has been a long history in the process of apple thinning. Apples are naturally biennial bearing,. Trees flower heavily one year producing a large crop of small fruit (called the “On” year) followed by light flowering the next year with a small crop of large poor quality fruit.
Thinning is most economically done by applying sprays of chemicals that act similarly to plant hormones and cause the abortion of flowers and fruitlets at an early stage of development. Early thinning favours the development of the desirable high density of cells in the fruit.
Orchardists have to make the difficult decision about the concentration of the thinning agent at blossom time. If the concentration is too low, then thinning will not be effective and the cost of hand thinning is prohibitive,. And if the concentration is too high, then there is the risk of loosing all of the fruit. The decision is made more difficult because of the large number of variables that need to be taken into account.
The Department decided to use Expert System technology to encode rules about how to make the decision on apple thinning. The research has been published in scientific journals, and this, in conjunction with other related research in Europe and the USA, was our basis upon which to build an expert system. But, as so often happens, the published data was insufficient to make specific recommendations. The researchers, who were also giving advice to individuals and groups of growers, were classic examples of experts who were good at articulating their expert knowledge, but less clear at explaining how they arrived at the advice. (cf XpertRule“Structured Decision Tasks Methodology”).
In the knowledge acquisition sessions we developed models from tables on the white board. These are not the same as the “Truth Tables” in XpertRule, but numerical tables that we use to capture the range of response that the experts expect from one or other of the variables. In developing these tables I encouraged the experts to look for patterns. In this way we assigned numerical values for the variables important in determining the concentration of the thinning agent. These variables are:
The Apple Thinning Program gives advice on five cultivars with options that encompass four chemical thinners. The application in XpertRule has 60 tasks, (some with 50 decision tree leafs (i.e. rule paths), plus 30 other variables and 40 procedures supported by a customized help file of 5,000 words. The program has made a significant contribution to the way apple growers who have acquired it can access advice for their spray thinning. The knowledge engineering of the problem itself has changed the way in which those involved in spray thinning research think about new experiments for other cultivars and possibly new spray thinners.
In its first year there were some 20 Tasmanian apple growers who have acquired the Apple Thinning Program, but next year this will increase as the benefits become more widely known. The Department has the view that its Expert Systems are “living software”. This means that there is regular revision of the knowledge. In the case of the Apple Thinning Program, knowledge of thinning emerging cultivars is added. Because of this the license period for the program is limited to one or two years.
XpertRule has proved to be a very good platform for delivering this advice. We have found that, in addition to the obvious advantages of having a Windows environment, our program is far more robust than it was in the DOS environment with the Crystal development tool. The visual way in which the knowledge is laid out in XpertRule is excellent. In our opinion XpertRule lives up to its claim of being a tool that is able to maintain knowledge as well as deliver it.
By Peter Gillard, Department of Primary Industry and Fisheries of Tasmania.
This story was also published in PC AI magazine.
By Dr Peter Gillard of the Department of Primary Industry Water and the Environment, Mt Pleasant Laboratories, Tasmania and Dr Sarah Munks of the Forest Practices Board, Tasmania.
Forestry in Tasmania is big business and, in common with many other democratic States, there are the conflicting politics of business versus conservation. The Forestry Practices Act is legislation that allows for forestry activities, but requires that a Code of Practice, designed to achieve sustainable forest management, must be followed by the forest managers. This legislation is administered by the Forest Practices Board (FPB). When a forest is to be logged, the forest managers must prepare a Forest Practices Plan for certification by the FPB. One of the more complex areas that has to be addressed is that of managing threatened fauna. The FPB produces a manual that has information about where threatened species occur and a generalised description of how forest practices should proceed. The forest managers find interpretation of the generalised information difficult, and before we developed Threatened Fauna Adviser, they were required to request a recommendation from the Senior Zoologist of the FPB, who in turn had to seek approval from the Senior Zoologist in the Department of Parks and Wildlife. All of this took time and caused a bottleneck in administration.
Knowledge of the threatened fauna and the recommendations needed for forest operations was already known by the Senior Zoologist, and other specialists working in Tasmania. Each species is either known to occur at a particular site, or known to be within its bio-geographical range. The presence of a threatened species need not prevent a forest operation, but it does affect the way in which the operation should best be conducted.
We found that the best way of proceeding was to develop decision trees in XpertRule®. For most species, the decision trees were needed only a single task, only one has a back chained task. The variables in the task are about the type of forest operation and factors that will identify the quality of habitat for the threatened species. The outcome of the task is the management recommendation for that particular situation. There are 31 listed threatened fauna species, and each may have 5 – 10 possible recommendations. Typically, there may be three or four threatened species in any harvest area.
We have included illustrations of threatened species on the dialogs relevant to those species. This is made possible by the facility for capturing bitmaps on dialogs available in XpertRule.
Implementation and connection with MS-Word
For each threatened species there is a Microsoft Word document with sections containing the recommendations. Each recommendation is bookmarked (Para_1, Para_2, etc.). In XpertRule, there is a procedure at the beginning of the task for the species that assigns the filename for that species; at the outcome of the task there is another procedure that assigns the relevant bookmark. All species tasks forward chain to a Report task that uses OLE2 to open word and paste the bookmarked recommendation with the following command:
There is comprehensive Help attached to the program. This has context sensitive information about the definition of the many attributes in the application, but also there are topics on how to use it, information about the species themselves, plus notes and instructions that have been issued by the FPB relevant to the management of threatened species.
The Help was initially written in a Word document, and then compiled into a .hlp file using HDK, a program developed by Virtual Media Technology(www.virtualmedia.com.au).
Value to the Forestry companies and the Forest Practices Board
The application has been installed on about 50 computers within forestry companies or forestry contractors in Tasmania. The value to these operators is that the recommendations given by the Expert System are agreed between the FPB and the Department of Parks and Wildlife. When the foresters forward the recommendation and their Forest Practices Plan to the FPB they need wait only a week before proceeding. This saves many weeks of delay in the time between application to log and approval.
The Forest Practices Board has been able to save much of their professional zoologists time in processing applications. They claim that this application has saved them from having to appoint extra zoologists. Indeed there were not the funds available to appoint these people, and without the application they would probably have further increased delays in processing applications.
An important outcome of the development of Threatened Fauna Adviser is that the zoologists have had the opportunity to think through all the possible scenarios and write appropriate recommendations, rather than having to produce case by case recommendations for each application to harvest timber.
Maintenance and upgrades
A major benefit of the application is that it has relieved the Zoologists from the FPB from the administrative chore of providing recommendations for all timber harvesting and forest operations and provided additional time for them to research and monitor what is happening in the forests. New knowledge is continually being gathered about the management of threatened species. Also the listing of threatened species changes, some are de-listed, but more are added to the threatened species list.
With XpertRule it is possible to print out the decision trees that are built during development and this has been useful in communicating with the domain experts when they are not present near our computer. Now that we have this application, it will be continually updated.
This expert system by the Tasmanian Government won a first prize in the Agricultural Software Competition at the Royal Easter Show, Sydney.
This story was also published in PC AI magazine