SEHS4678 Artificial Intelligence
Assignment 2 (Individual; 10%) – Building a Rule-Based Expert System in Prolog
Due 11:59 pm, 3 May, Monday, Week 14
A. Description
Objective
The objective of this assignment is to get a hands-on understanding of rule-based expert systems, arguably the most notable application of the Classical AI (also called Symbolic AI), through building a prototype using the logic programming language Prolog.
Things to do
1. Read reference [R1] for information about rule-based expert systems. Toy examples of rule-based expert systems can be found on p. 160 (Example 2) and on p. 181 (Exercises 7.2, 7.3 and 7.4). But they are just toy examples.
2. Read references [R2] for a simple example of rule-based expert systems. Play around with the Prolog code provided. [R3] [R4] [R5] are three other examples.
3. Think of an interesting domain for yourself. There are very many possible domains: medical diagnosis, classification of things (e.g., plants, animals), recommendation, etc.
4. Get the facts and rules of your domain from some reliable sources (e.g., books, the Internet), the more the better. The number of rules is required to be at least 50.
5. Build the system in Prolog, which includes the knowledge base (containing both facts and rules), inference system, user-interface, and explanation subsystem (optional).
Things to submit
1. A report containing a description of the domain of your system in no more than 500 words.
2. A catalog of all the facts and rules, and their source.
3. Test cases – showing the inputs and the corresponding outputs.
4. The Prolog code.
B. Grading Criteria
Aspects of the system that will be graded include:
Domain – how interesting
Facts and rules – how many and how good Prolog code – how readable User-interface – how user-friendly
Test cases – how complete
[Explanation subsystem – how revealing]
C. References
[R1] Ch. 7 Rule-Based Expert Systems of Grosan et al., Intelligent Systems, Springer, 2011. (available from Moodle)
[R2] Kim, Y. J., & Lee, K. H. (2017). Implementation of an expert system for fundamental-cosmetics recommendations using Prolog. Journal of Theoretical and Applied Information Technology, 95(18), 4879-4887. (Both this article and its Prolog code are available from Moodle)
[R3]
[R4]
[R5] Hsu, C. C., & Lin, C. C. (2020). “Framework and Conceptual Design of Rule Base for Building SWI-Prolog-Based Expert Systems to Diagnose and Treat Anxiety.” In2020 International Conference on Pervasive Artificial Intelligence (ICPAI) (pp. 54-57). IEEE.
“Tutorial: Learn Prolog Language by Creating an Expert System” at
https://medium.com/analytics-vidhya/learn-prolog-language-by-creating-an-expert-system-d46a811c58e8
LIN, C. C., & LIOU, C. H. (2020). “A SWI-Prolog-based expert system for nutrition
supplementary recommendation.” In 人工知能學會全國大會論文集 第 34 回全國大會
(2020) (pp. 3G5ES101-3G5ES101). 一般社団法人 人工知能學會. Available from Moodle
Available from Moodle
[R6] Max Bramer, Logic Programming with Prolog (2nd edition), Springer, 2013 (Available on Moodle) 13.2 Developing an Expert System Shell
[R7] A. K. Tegegnie (2015). A Quick Guide to an Introduction to Expert Systems using Prolog, Lambert Academic Publishing. Available at CPCE libraries Q336.T44 2015