Chapter overview and learning outcomes
This chapter develops the conceptual and practical foundations of artificial intelligence. It connects theory with real systems, technical decision-making and responsible computing practice.
- Explain the main concepts and use technical terminology accurately.
- Interpret and create relevant models, diagrams or worked examples.
- Apply the concepts to realistic computing problems.
- Compare alternative methods using evidence and stated assumptions.
- Identify limitations, security concerns and operational risks.
1. Foundations and scope of artificial intelligence
Artificial intelligence (AI) studies computational systems that perform tasks associated with perception, reasoning, learning, language, planning and decision-making. AI includes symbolic approaches, statistical learning, neural networks, robotics and hybrid systems. An AI system should be evaluated against a defined task and context rather than described as intelligent merely because it produces convincing outputs. Capability, reliability, generalisation, interpretability, safety and social impact are distinct dimensions.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
2. Intelligent agents and environments
An agent perceives an environment through sensors or inputs and acts through effectors or outputs. A rational agent selects actions expected to achieve its performance measure given available information. Environments may be fully or partially observable, deterministic or stochastic, episodic or sequential, static or dynamic, and discrete or continuous. These properties influence agent design. A simple reflex agent uses current percepts; model-based agents maintain internal state; goal-based and utility-based agents reason about outcomes.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
3. Problem formulation and state-space search
A search problem is defined by an initial state, actions, transition model, goal test and often a path-cost function. The state space represents reachable configurations. Breadth-first search explores by depth and is complete for finite branching under standard assumptions; uniform-cost search expands the lowest path-cost node. Depth-first search uses less memory in some settings but may follow deep or infinite paths. Search algorithms should be compared by completeness, optimality, time and space.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
4. Heuristic search and optimisation
A heuristic estimates the remaining cost or distance to a goal. Greedy best-first search uses heuristic estimates to guide expansion, while A* combines the cost already paid with an estimated remaining cost. Under appropriate conditions, such as an admissible heuristic for tree search, A* can find an optimal solution. Local search methods such as hill climbing and simulated annealing explore candidate solutions for optimisation problems. Poor heuristics can mislead search or increase computational cost.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
5. Knowledge representation and reasoning
Knowledge representation encodes facts, concepts, relationships and rules so that a system can reason over them. Approaches include propositional and predicate logic, production rules, semantic networks, frames, ontologies and probabilistic models. A knowledge base stores represented information; an inference engine derives consequences. The representation must match the domain and handle uncertainty, inconsistency and incomplete information. Formal logic supports precise deduction but does not automatically guarantee that the encoded facts are correct.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
6. Planning, constraint satisfaction and decision-making
Planning selects a sequence of actions that transforms an initial state into a goal state. Classical planning assumes a defined model of actions and states; real environments may require replanning as conditions change. Constraint satisfaction problems define variables, domains and constraints, with backtracking and constraint propagation used to find assignments. Decision-making under uncertainty may use expected utility, probabilistic beliefs and sequential policies. Evaluation must account for costs, risks and constraints.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
7. Machine learning foundations
Machine learning uses data and algorithms to identify patterns or improve performance on a task. Supervised learning uses labelled examples for classification or regression. Unsupervised learning identifies structure in unlabelled data, such as clusters or lower-dimensional representations. Reinforcement learning studies agents that learn through interaction and reward signals. A model's performance depends on data quality, feature representation, assumptions, objective functions and whether training data reflect the intended deployment environment.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
8. Model training, validation and evaluation
A dataset is commonly divided into training, validation and test sets to support model fitting, model selection and final evaluation. Leakage occurs when information unavailable at prediction time influences training or evaluation. Overfitting occurs when a model fits training examples but generalises poorly; underfitting occurs when it fails to capture relevant patterns. Metrics should reflect task costs: accuracy may be inadequate for imbalanced classes, where precision, recall, F1 and calibration may matter.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
9. Neural networks and deep learning
A neural network consists of layers of parameterised transformations. Training adjusts weights to reduce a loss function, commonly using gradient-based optimisation and backpropagation. Deep learning uses networks with multiple layers to learn representations from large datasets. Convolutional networks are common in image tasks; recurrent and transformer architectures support sequence and language tasks. Model capacity, data scale, compute, regularisation, optimisation and evaluation all affect outcomes. Neural networks can be difficult to interpret and may fail unpredictably.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
10. Natural language processing and generative AI
Natural language processing includes tokenisation, language modelling, classification, translation, information extraction and question answering. Transformer models use attention mechanisms to process relationships among tokens. Generative AI systems produce text, images, audio or other content from learned patterns and prompts. Their outputs may be plausible but false, biased, outdated or fabricated. Retrieval, tool use, verification, provenance and human review can improve reliability but do not eliminate errors.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
11. Responsible AI, governance and applications
Responsible AI considers fairness, privacy, transparency, accountability, safety, robustness, accessibility, intellectual property and environmental cost. Bias can enter through data collection, labelling, modelling, deployment and feedback loops. High-impact uses require appropriate validation, human oversight, auditability and routes for contesting decisions. AI should not be deployed solely because it is technically possible. Assess whether it is appropriate, who benefits, who may be harmed and how failures will be detected and addressed.
Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.
Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.
Conceptual learning diagram. Interpret each stage in the context of the chapter topic.
Conceptual learning diagram. Interpret each stage in the context of the chapter topic.
Conceptual learning diagram. Interpret each stage in the context of the chapter topic.
Practical laboratory activity
- Choose a small scenario related to the chapter and write a clear problem statement.
- Identify assumptions, inputs, outputs, constraints and expected behaviour.
- Draw a model, flow diagram, schema or sequence of operations.
- Use an appropriate programming language, database, simulator or network tool where relevant.
- Test normal, boundary and failure cases; record observations and explain discrepancies.
- Submit a concise report with methods, results, limitations and recommendations.
Use authorised software, sample data and test environments. Do not access systems or information without permission.
Worked reasoning and self-assessment
Begin by defining the problem and its constraints. Work through a small example manually before relying on a tool. State the expected result, show intermediate steps and verify the outcome independently. For system-design questions, justify the selected approach and discuss at least one alternative. For performance questions, identify the workload and metric being measured. For security questions, describe the threat, the control and the residual risk.
Examination and revision questions
Answer each question with precise definitions, diagrams, calculations or technical examples where appropriate.
Define artificial intelligence.
Show answer guidance
The field of building computational systems that perform tasks involving capabilities such as reasoning, learning, perception and language.
What is an intelligent agent?
Show answer guidance
A system that perceives its environment and selects actions to pursue objectives.
What defines a search problem?
Show answer guidance
Initial state, actions, transition model, goal test and often a path-cost function.
Differentiate BFS and DFS.
Show answer guidance
Breadth-first search explores by depth; depth-first search explores a path before backtracking.
What is a heuristic?
Show answer guidance
An estimate used to guide search toward a goal or promising solution.
What does A* use to rank nodes?
Show answer guidance
The cost so far plus a heuristic estimate of remaining cost.
Differentiate supervised and unsupervised learning.
Show answer guidance
Supervised learning uses labelled examples; unsupervised learning seeks structure in unlabelled data.
What is overfitting?
Show answer guidance
When a model fits training data too closely and performs poorly on unseen data.
Why separate training and test data?
Show answer guidance
To estimate generalisation on examples not used to fit the model.
What is data leakage?
Show answer guidance
Use of information in training or evaluation that would not legitimately be available at prediction time.
What is a neural network?
Show answer guidance
A parameterised model made of interconnected computational units arranged in layers.
What is backpropagation?
Show answer guidance
A method for computing gradients of a network loss with respect to its parameters.
What is a large language model?
Show answer guidance
A model trained on large text datasets to predict or generate sequences of language tokens.
Why can generative AI hallucinate?
Show answer guidance
It generates likely outputs from learned patterns and may produce unsupported claims rather than verified facts.
Name four responsible AI considerations.
Show answer guidance
Fairness, privacy, transparency, accountability, safety, robustness or accessibility.
Revision checklist
- Can I define and distinguish the chapter's core concepts?
- Can I explain the diagrams and reproduce them from memory?
- Can I solve a practical example and justify each step?
- Can I identify likely errors, edge cases and failure modes?
- Can I evaluate security, performance and ethical implications?
- Can I support design decisions with clear reasoning?
Further study and references
Use current university textbooks, peer-reviewed research, official standards and vendor or project documentation. Verify software versions, protocol specifications and security guidance against authoritative sources because technical systems change. Cite the edition and publication details of materials used in assignments, and distinguish established facts from assumptions or illustrative examples.