Reference no: EM134012072
Artificial Intelligence Fundamentals
Assessment - Programming and Report
Learning Outcome 1: Represent knowledge using semantic networks, scripts, frames and logic-based mechanisms and write simple Prolog programs to enable automated reasoning.
Learning Outcome 2: Construct simple expert systems to solve a real-world problem.
Purpose
Apply logical reasoning using Prolog programming to model relationships and solve structured problems.
Develop problem-solving skills involving data validation, recursion, and control flow.
Apply machine learning techniques and analyse model behaviour, including overfitting and model performance.
Apply state space representation to model a problem by defining states, operators, and goal conditions.
Specific Instructions
To complete this assessment, To complete this assessment, you will complete one Prolog task and one Python task, along with a written report for Task 3.
Key tip: Students who perform well demonstrate:
Clear understanding of logic programming concepts
Ability to handle edge cases and constraints
Strong explanation of machine learning behaviour, not just code execution
You may refer to lecture materials. External sources are not required but must be properly cited if used.
Task 1: The Guild Mentorship Network
Problem Description
You will develop a logic program in Prolog to model a mentorship network. You are given a set of predicate heads describing relationships between individuals in a guild. However, their definitions are not fully specified. You are required to interpret their intended meaning, construct appropriate facts, define the corresponding rules logically, and test your queries (goals).
Your solution should demonstrate your understanding of:
how knowledge is represented in Prolog
how new relationships in rules can be derived from knowledge in Prolog
how Prolog proves queries (goals)
derivation steps
Rules Construction
Using the following predicate heads below, define rules for each relationship:
peer(X, Y)
cross_disciplinary(X, Y)
grand_apprentice(X, Y)
academic_descendent(X, Y)
Note: For each rule, explain your assumptions about the meaning of each predicate. Ensure the correctness (e.g. constraints, recursion, if any). You may introduce the new supporting predicates in the rule body to construct the clear relationship.
Facts and Queries (Goals) -
Construct suitable supporting facts .
Create from each rule you constructed, one query that output true or false. So, you will have four queries output. You should demonstrate the derivation process by explaining how Prolog evaluates each query. Your explanation should clearly show the steps leading to both true and false outcomes. (4 marks)
Task 2: Expert System - Traditional Medicine Diagnosis (TCM)
Problem Description
An expert system is used to perform a simplified TCM based on symptoms. The system uses the following production rules:
The initial working memory contains:
You are required to apply the recognize-act cycle (rule matching, conflict set, rule firing, and working memory update) to determine the system's final recommendation.
Tasks
Knowledge Extension
Define three additional production rules relevant to traditional medicine, and their explanation
Add at least two additional facts to the initial working memory
Ensure all rules are logically meaningful
Rule Matching and Conflict Set
Using the working memory (including your added facts):
Identify which rules match and which do not match
Clearly state the conflict set
Rule Firing - First Iteration
Select one rule from the conflict set
Show the new fact derived
Show the updated working memory
Recognize-Act Cycle (Complete Iteration in the table up to the final working memory)
Repeat the cycle:
match rules again
form new conflict set
fire the next rule
update working memory
state the final working memory and recommendation
Explanation of Reasoning
Briefly explain:
how rules are matched
how rules are selected and fired
how working memory is updated and when the system stops
Extension Case
Given new working memory:
cold_hands
fatigue
State the final recommendation only (no full derivation required).
Python Programming: Medical Diagnostics Classification
Problem Description
You will build a Decision Tree model using the Breast Cancer dataset.
Implementation Requirements
Load dataset
Split data using train_test_split (70/30) with student ID
Train two models:
Model A: unrestricted
Model B: max_depth = 3
Visualise Model B
Compute and compare accuracy
Analytical Report Component
Problem & Methodology
You must:
Briefly describe the dataset and the problem being solved
Explain how a decision tree works, including how it uses entropy and information gain to split nodes
Clearly outline how you prepared the data (e.g., train/test split) and trained your models
High marks require clear explanation in your own words, not generic definitions.
Tree Interpretation
You must:
Identify the root node (first split) in your decision tree
Explain why this feature was selected, linking it to how decision trees choose splits (information gain)
Briefly describe what this feature represents in the context of the dataset
High marks require linking your explanation to your actual model output, not general theory.
Insightful Discussion
You must:
Compare the performance of Model A (unrestricted) and Model B (max_depth = 3)
Explain the concept of overfitting vs generalisation using your results
Discuss the trade-off between:
Accuracy (model performance)
Interpretability (ease of understanding the model)
High marks require:
Using your actual results in the discussion
Demonstrating clear understanding of why differences occur, not just stating them.