This expert system uses a set of rules and forward chaining to diagnose diseases based on reported symptoms. It defines a class that inherits from KnowledgeEngine and takes arguments including a symptom map and functions for unmatched diagnoses, treatment retrieval, and disease details. Rules check symptoms against stored user input and execute in salience order, with lower values first. Once a matching disease is found, its name is added as a fact and the treatment and detail functions are called to provide output.