SMARTVIEW - An Intelligent EXPERT SYSTEM Tool using JAVA and JESS Framework Samuel Sambasivam ssambasivam@apu.edu Computer Science Department Azusa Pacific University Azusa, CA 91702, USA Chris Davies cidavies1@ntlworld.co.uk United Kingdom ABSTRACT Valuable sales information in this day and age is a resource that at best is hidden from view, obscured by the volume and unobtainable by the pressures of schedules. This paper deals with the issues of the management processes required to effectively understand and utilise valuable facts as they should be used. SmartView enables users to understand on a priority basis the actions required. The filtering and prioritisation framework comes in the form of expert support modules, embedded into the system that continuously monitors operational data and events from around the business. Response reasoning aids in the process of decision support. The danger here is the system will miss important facts, misconstrued information or over emphasise the importance of lower valued situations. Continuous development ensures the knowledge held by the system evolves with the business. The ever-changing environment must be supported by a flexible design that enables responsive corrective action to unplanned events. Aspects of information sharing and collaborative support for customer solutions, product features and case studies enable sales staff the opportunity to benefit from historical data. SmartView itself is JAVA-based application that enables direct access to active important facts or historical information supported by the latest database technology. The EXPERT SYSTEM is based on the functionality supplied by the JESS framework, the Rete-algorithm rule-based JAVA EXPERT SYSTEM. The capabilities of JESS integrate perfectly into the JAVA application and contribute many excellent aspects that provide the basis of the main operational solution. Keywords: Expert System, JESS, database, JAVA, Rete-Algorithm, LAN, client-server 1. INTRODUCTION This paper describes the application, which is aimed predominately at people working in the sales environment, sales area managers, key account managers, business development staff and marketing to name but a few and could be easily converted to supply collaborative, knowledge assisted reasoning to a range of other areas of decision support topics. The overview of this project basis is general communications, and to help the users inability to process the vast amount of different forms of information within the time they have available, to the level of competency that is expected. As in any job, the time scheduled for dealing with email, post and meetings can very easily be procrastinated, rescheduled or cancelled. Due to these pressures a mechanism of control that can focus and support sales related staff is required. Those users which support sales field staff will also benefit from the systems knowledge and control of information. The fusion or holistic synthesis of elements from the daily operations and historical knowledge provides an invaluable resource to their working lives. Reducing the number of elements that supply valuable data also improves the organisational aspects of the sales manager’s routine. With less to remember more focus can be expended on the more qualitative rather than quantitative aspects. With more time being spent dealing with issues rated as higher importance or more urgent needs, the service level perceived by the customer will be enhanced. The information held within the system is only as good as the details entered. The system ought to be “self monitoring” so that problems are highlighted to the appropriate staff. The use of evolutionary business logic is absorbed by the system to perform preliminary reasoning of potential problem subjects. Over time the company can build on the business policies that provide better operational performance and feedback. The initial release of the project software contains the basic forms of control and tools that provide the functions required. It is expected over time with feedback form the user base the reasoning sub systems, the GUI and other reporting functions will be enhanced to meet the changing needs of the company/organisation or user. 2. BACKGROUND Background of the problem This paper provides a mechanism that uses state of the art principles that are being deployed for mainstream solutions in the business environment. A dedicated solution that gathers and utilises the culmination of domain linked sales expert knowledge together with current sales based training methods delivered through a succinct software tool. The paper aims of providing light weight, dedicated, helpful software that people will want to use rather than being made to use. This is not to say other examples of business solutions do not use these principles. Our aim is to concentrate on the development of the best practical solution possible for a dedicated scenario, rather than providing a solution where cutting edge over-functionality is more important. Bottom line is that the benefits to using this technology must outweigh the cost in terms of effort to extend and maintain the system. The customers feeling of a professional quality service must be enhanced without detriment to the markets operational performance indicators. Having people on the front line armed with dedicated knowledge of the customers’ complete requirement, aids in the customers perception of a top quality service. What does our solution provide to global knowledge that previously did not exist? Many selling techniques are available throughout the world, most based on the fundamental principles of understanding the needs of the customer and the aims of their objectives. Without these simple requirements there is no “need”. It is this need that drives our markets and supports the business society, as we know it. Computer controlled information systems today have the ability to process vast amounts of information compared to the recent past, and our continuous development into pushing the boundaries of knowledge systems helps bring to life tools which enhance our way of business and sometimes personal life. Applications currently provide substantial customer relational management techniques (CRM) which aid in the understanding of the customers situation and their requirements. What is lacking from these packages are the supportive help to aid the sales manager to make decisions based on a set of expert business logic dedicated to their situation. The market place is beginning to grasp the concept of EXPERT SYSTEMs for the generalised sales management application, the process previously deemed too expensive or prohibitive to the applications costs of production (Luger 2002). The cost in effort for generating the knowledge based is in a lot of cases is made worst by the application being made too general or too feature rich to attract a wider customer base. This is not to say there are not companies that offer dedicated bespoke solutions. Keeping the solution focused and specialised is our positive attempt to reduce the complexity and so reduce costs. Understanding opportunities through the feedback from customers will proactively provide a greatly enhanced service to any sales based organisation. Conclusions on the comparison between JESS and CLIPS (Laerhoven 2001) Both CLIPS and JESS are products with a large support on the Internet, but CLIPS seems to have a broader audience, probably because it has existed longer. This difference in age results in the CLIPS package being more stable and complete, while JESS users will still experience some minor bugs. JESS is constantly updated and the author, Ernest Friedman-Hill, has been very responsive to user/developer feedback and regularly puts out new releases and bug fixes. Nowadays, the choice between JESS and CLIPS depends on the application. If it is web-based or should reside in applet-form, the choice of JESS is a very logical one (which is even supported by the authors of CLIPS). For the more classic applications, CLIPS will probably be chosen because of its reputation of being more stable and having more support. The future of JESS depends highly on the evolution of the web, the JAVA programming language and its own future stability. These three conditions make that there is a great possibility that JESS will become more popular and more frequently used. Especially the object-oriented possibilities and the easy integration into JAVA code makes JESS’ future very promising. CLIPS, on the other hand, are more likely to implement the new and sophisticated features first as they come out, since it still has the advantage in time. CLIPS have also various extensions and variants (like FuzzyCLIPS, AGENT CLIPS, DYNACLIPS, KnowExec, CAPE, PerlCLIPS, wxCLIPS and EHSIS to name a few) that give it an advantage with respect to support of methods like fuzzy logic and agents. The multifunctional developing environment of CLIPS for operating systems that support windows is also an advantage, while JESS has just one window with two buttons (‘clear window’ and ‘quit’), without a menu. Figures 1 and 2 depict both environments. To summarize, CLIPS is still more complete and stable than JESS, but this might change in the future, since the JESS package is being improved constantly. Besides that, JESS has also the property of using JAVA, which in the long run might prove to be a big advantage over CLIPS. CLIPS has a LISP-like syntax, which uses parentheses as delimiters. Although CLIPS is not written in LISP, the style of LISP has influenced the development of CLIPS. 3. DESIGN In the beginning of any large project, the foundations are laid which then support the process through to completion. Software engineering principles turn conceptual requirements into a solid distinct logical system through processes which model these intangible ideas to give them meaning and form. Fritz Bauer (Bauer 1969) provided an early definition of this process that evolved as Software Engineering “The establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines.” Risk Management, the identification of possible risks Economic feasibility: This project does not impose serious financial risk. Technical feasibility: Scope creep and over emphasis on graphical presentational aspects. Managers requesting more reporting output. Problems may arise in over development in later stages without requirement analysis being first agreed and signed off. There are no resource risks apart from Act of god issues. Hardware redundancy and backup communications lines are available in severe cases. The technology itself is a possible risk. In as much the level of expertise of the programmer. This may not be at the required level to perform the expected amount of functionality in the given time frame. Project management controls should show this risk weight increasing and highlight the problem. Legal feasibility: compliance with legal licenses for external packages. The Database (DBMS) software should have been purchased and licensed. Without this license support, maintenance and upgrades will not be possible. The JESS (JAVA EXPERT SYSTEM from Sandia National Labs.) requires a license, which has been purchased. Requirements engineering Analysis of the problem from a high level conceptual view enables the stake holder (in this case a theoretical customer) and the software developer to gather information relevant to those issues important to the successful completion of the project. The objective of this process is to explore the realms of the problem domain, to understand the questions and restrictions that have not previously been discovered. Every minute of analysis saves ten debugging it has been said (source unknown). Without these guidelines the process of designing and meeting the expectations and needs of the customer, within a controlled environment, is extremely difficult. The analysis of the requirements can be broken down to functional and non-functional aspects, which are based on the expected final operational system components. The following sections describe the initial requirements as supplied from the initial customer design meeting. Application Outline The application should be programmed in a modern OO base language such as JAVA, using the latest version of Sun’s JAVA Development Kit. A JAVA archive resource file contains the complete package. The installation procedure installs the latest version of the MySQL package and constructs the default blank database, updating to the latest version of JAVA where required. Security validation and initialisation builds the users credentials. A TCP/IP connection is established to a central server across a LAN or over a public Internet connection to retrieve an initial data source. Update functionality uses a SQL openSSL tunnel to retrieve an update BLOB, which then is used to build the initial database. The initial update will be very large so the source of the initial data update should be provided either on CD at a remote location or the build operation will be conducted on site while connected to a LAN. In urgent situations where a hardware failure has occurred, recovery is still possible via this slow method though. Normal updates are incremental on a daily basis. A central server application will act as a central manager; controlling the local LAN based clients directly while supporting the external Reps through internetworking methods. Incremental updates are collated into update packs for each external client on a nightly basis, distributed on request. The server application main screen contains extra functionality to perform special updates related to the control of the information and server based operations. Architectural representation used to direct the software design stage Modelling approaches define processes and isolate properties of the system. State Machine Models: The expression of difference states a particular model executes through to reach some form of goal. Semantic Data Model: This is a data-oriented model that defines the logical form of data and the relationship of data to other data items, very much like the Entity-Relationship Model. Object based models incorporate object classes that display functionality through common attributes and associated services (operations), structural and behavioural components of data. Another aspect used to explore the design possibilities is the use of evolutionary prototyping. The initial project planning and design stages for this project initially started from a static design (artistic impression), moving to a dynamic framework. This enabled the designed to be realised enough to redesign the GUI to work in a completely new way. Figure 1. Initial GUI artistic impression, static prototype. Figure 2. System start-up operational flow of objects Figure 3. Planning the sequence of object. External Sales field based client using their own local copy of database. Figure 4. The external client behaviour identification process. Server application Use Case main requirements. Figure 5. The server application behaviour identification process. Operational flow System should be self-maintaining and error proof. All errors should be reported to the user through mechanisms that are suitably user friendly. Provision of information that details the specific problem can be used in the support of the product from a remote or external IT department. Normal users or professional ones should not be able to bypass system security. External Sales rep data units, these consist of daily operational information, schedule, PSS updates(new discovered product features or benefits over competitor products), messages etc. Local user data consists of reporting information, schedule and messages updates. The nightly update procedure imports operational data on an incremental basis or a manual full table reload possibilities exist. SmartView Object attributes and methods Smart view operates using a simple GUI, which is built up from multiple component objects. The data related objects are contained in the supporting graphical framework. This means the entity being handled will also contain methods and functionality related to the tasks for handling and supporting data functions. 4. Evaluation Strengths The application has the ability to “Provide” information to the user as apposed to “Extract” data and then expect the user to deal with it to formulate the worth of the information. Design flexibility: To add or change anything in this application is simple in terms of the design allowing enhancements or even quite severe changes. Low foot print size: The application will run on a relatively low end notebook/laptop. With some modifications the core application will run on most JAVA Virtual Machine enabled devices. Application language construct strength, the underlying supportive processes such as memory management, hardware interaction, OS separation and security are all abstract issues enhanced or simplified by JAVA. Clear and intuitive layout, all functionality can be explored by the user without adverse effects. The system ensures all activities are protected as well as being explained either in tool tips or the user manual. The flexible ability to alter external CLP scripts which are dynamically used by the system to perform rule comparison. Weaknesses Speed of data updates: The full database update requires a lot of time over a slow connection. Major updates must be supplied over a physical medium such as CD ROM, which could be annoying for a busy manager. Execution times may suffer from JVM initial loading. Controls to allow common activities such as “Delete” and “New” should be implemented to allow users quick access to functions. A standard button on the tool bar would be sufficient. Local DB crash possibilities: Sales reps laptops are notorious for being handled with little care. The stability of SmartView depends on the smooth running of the OS and other supportive applications. The JESS scripts that perform each modules data analysis require considerable effort to produce. The time taken to develop simple rules could be considered a downside, but a future benefit. 5. Conclusion While exploring the subject possibilities, based on the initial aims and objectives, the problem has presented an opportunity to fulfil the needs of the users and to supply them with a tool that not only gets the job done, but also allows further development in the future to meet the needs of the changing environment. To understand and then design a tool such as this posses many problems and choices. Using the experience of other developers in the problem domain has given example opinions that offer possibilities. Reflecting on those options, making the best decisions for the project has been a fundamental element of progress. JAVA is a complicated but worthwhile method of solution and with experience, over time can provide many excellent possibilities for designs. The decision to include the JESS framework to provide knowledge-based support will prove to be a sound solution. This method of integration, coupled with the simplistic nature of cognitive execution or reasoning demonstrates that the effort required to build the EXPERT SYSTEM is proportionate to the level of support the system offers many times over. The content produced in the project demonstrates the successful coverage of the range of types of activities required, but does not completely fulfil all of the functionality expected for a complete commercial product, ready for hand over. As part of this paper a large percentage of the required example processes have been covered as topics, the multitude of different reports and display screen that will eventually be required can be done later. The final outcome of the initial aims was to produce an EXPERT SYSTEM controlled environment, which efficiently handled the day-to-day operations of a sales environment. The basic structure of the application has been designed to prove this operational theory, which in a theoretical design point of view it will do. The progression from this point will be to replicate the existing methods for other subjects to provide the diversity of information the system requires. To expand the rule processing abilities of the program so that it eventually supports every aspect of data support. 6. Bibliography Bauer 1969, Nato Science Committee, 1969 (quoted in Pressman, 1992) Brooks, F. (1995) The Mythical Man-Month, Essays on Software Engineering, Addison Wesley Buchanan, B. and Shortliffe, E. 1984 (Eds.) Rule-Based EXPERT SYSTEMs. Addison-Wesley, 1984. Carver Norman 1994, "The evolution of Black Board Control", EXPERT SYSTEMs with Applications, special issue on The Blackboard Paradigm and Its Applications, Vol 7, no1, 1-30, 1994 Dietel 01b ,H.M. & Deitel P.J How to Program JAVA, Prentise Hall 2001 Dietel 01, h.m, P.J Deitel, T.R Deitel How to program Internet & World Wide Web, Prentise Hall 2001 Durkin,J. 1994. EXPERT SYSTEMs, Design and Development, New York, Macmillan. Erman et al. 1980 Lee Erman, Frederick Hayes-Roch, Victor Lesser and D.Raj Reddy, "The Hearsay-II Speach-Understanding System: Integrating knowledge to Resolve Uncertainty," Computing Surveys, vol. 12, no 2, 213-253, 1980 Fausett Laurene, 1994 Fundamentals of neural network, architectures, algorithms and applications Prentice Hall 1994. Feigenbaum, E. and McCorduck, P. The Fifth Generation. Signet, 1984. Forgy, Charles L., 1982. Rete: A Fast Algorithm for the Many Pattern/ Many Object Pattern Match Problem", Charles L. Forgy, Artificial Intelligence 19 (1982), 17-37) jGuru http://www.magelang.com/index.jsp Kearsley, G. (Ed.) Artificial Intelligence and Instruction. Addison-Wesley, 1987. Kowalski, R. 79. Logic for problem solving. Amsterdam: North-Holland Laerhoven,K 2001, Comparison of Clips and JESS http://www.comp.lancs.ac.uk/~kristof/research/notes/clipsvsjess/ Luger,Gerorge F 2002. Artificial Intelligence Addison-Wesley, 2002 Manning Affordability website : http://www.manningaffordability.com/S&tweb/HEResource/Process/S1PD.htm O'Neil, Patrick, and O'Neil, Elizabeth, (2001). Database, Principles, Programming, and Performance, 2nd edition, San Francisco: Morgan Kaufmann. Papert 1980 LOGO language Pearl 1988 Judea Pearl, Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference, Morgan Kaufmann, 1988 Pressman, R. (2000), Software Engineering, A Practitioner's Approach (5th Edition), McGraw Hill. Puppe,F. (1993). Systematic Introduction to EXPERT SYSTEMs - Knowledge Representations and Problem Solving Methods. Berlin, Springer Verlag. Rob & Coronel 2002, Database Systems: Design, Implementation, and Management, Fifth Edition: Course Technology 2002 Rudolph,G. Jess Web Site, http://herzberg.ca.sandia.gov/jess/guidelines.shtml (modified 17.3.03) Simon, H.A 1983. Why should machines learn? In Michalshi et al. (1983) Stefik,M. 1995. Introduction to Knowledge Systems. Palo Alto, CA: Morgan Kaufmann Sun Microsystems Inc. JAVA Documentation, http://JAVA.sun.com/docs ?? ?? ?? ??