Skip to content

9618 · 18.1

Artificial Intelligence (AI) — practice questions

Practice and worked examples for 9618 Artificial Intelligence (AI). Short previews only — attempt the full question in MarkScheme against the official scheme.

Worked example 1

A simple medical expert system has the following rules: R1: IF has_fever AND has_rash THEN has_measles R2: IF has_fever AND has_sore_throat THEN has_tonsillitis R3: IF has_tonsillitis THEN treatment_is_antibiotics

A user provides the facts: hasfeverhas_fever and hassorethroathas_sore_throat. Using forward chaining, show how the inference engine determines the treatment.

Show solution outline
  1. Initial Facts: The system starts with two known facts: hasfeverhas_fever is TRUE and hassorethroathas_sore_throat is TRUE. [1 mark]
  2. Rule Matching: The inference engine scans the rule base. Rule R1 requires hasrashhas_rash, which is not known, so it is ignored. Rule R2's conditions (hasfeverhas_fever AND hassorethroathas_sore_throat) are both met. [1 mark]
  3. Inference: By applying Rule R2, the inference engine deduces a new fact: hastonsillitishas_tonsillitis is TRUE. This new fact is added to the system's working memory. [1 mark]
  4. Second Iteration: The engine scans the rules again with the new fact. Rule R3's condition (hastonsillitishas_tonsillitis) is now met. [1 mark]
  5. Conclusion: By applying Rule R3, the engine concludes that treatmentisantibioticstreatment_is_antibiotics. The system would then present this as the recommended course of action. [1 mark]

Worked example 2

A bank wants to create a system to automatically approve or deny loan applications. They have historical data from 100,000 previous applications, including each applicant's income, credit score, loan amount, and whether the loan was successfully repaid or defaulted.

(a) Which type of machine learning is most suitable for this task? Justify your answer. [2 marks] (b) Describe one input feature and the corresponding output label for a single record in the training data. [2 marks]

Show solution outline

(a) Type: Supervised Learning. [1 mark] Justification: The historical data is 'labelled' because the outcome (repaid or defaulted) for each application is known. The system can be trained to learn the relationship between the input features (income, credit score) and the binary output (approve/deny, based on predicted risk of default). [1 mark]

(b) Input Feature: An example input feature would be creditscore=750credit_score = 750. [1 mark] Output Label: The corresponding output label for that record would be a category, such as Default=False'Default' = False or Risk=Low'Risk' = Low, indicating that this applicant successfully repaid their loan. [1 mark]