Foundations of Artificial Intelligence and Machine LearningIntroduction and ContextArtificial intelligence (AI) is one of the most influential fields in contemporary computing. It combines ideas from computer science, mathematics, statistics, engineering, psychology, linguistics, neuroscience and philosophy to develop systems that perform tasks normally associated with human intelligence. These tasks include perception, language understanding, reasoning, planning, learning, prediction, decision-making and content generation. AI is not a single technology. It is an umbrella discipline containing several approaches and application areas. Machine learning is a major approach within AI, while deep learning is a particular family of machine-learning methods based largely on multilayer neural networks. Data science overlaps with AI and machine learning but has a broader concern with extracting knowledge and supporting decisions from data. Generative AI is a contemporary class of systems that produces new text, images, audio, video, software code or other data-like artifacts. A sound understanding of these relationships is essential for professionals. It prevents exaggerated claims, supports appropriate technology selection and helps practitioners recognize that an AI system is not merely a software product but a sociotechnical system involving data, people, objectives, infrastructure, governance and consequences. Learning ObjectivesAfter studying this chapter, you should be able to: - define artificial intelligence, machine learning, deep learning, data science and generative AI;
- explain major stages in the historical development of AI;
- distinguish symbolic, statistical and hybrid AI approaches;
- describe important capabilities and application areas;
- explain why AI systems can fail despite strong technical performance;
- identify limitations, ethical risks and governance requirements;
- select an appropriate AI approach for a practical problem.
1. What Is Artificial Intelligence?There is no universally accepted definition of intelligence, and consequently no single definition of AI. Two useful perspectives are common. The capability perspective defines AI in terms of activities: systems are considered intelligent when they can perceive environments, reason, learn, communicate, solve problems or act toward goals. The rational-agent perspective defines AI as the study and engineering of agents that select actions expected to achieve objectives, given available information and constraints. An agent may be a software program, robot, vehicle or decision-support system. Rationality does not mean perfection. It means making the best available decision according to an objective, evidence and resources. A practical definition is: Artificial intelligence is the field concerned with designing computational systems that perform tasks requiring capabilities such as perception, reasoning, learning, language use, planning and adaptive action. AI capability is task-dependent. A chess program may exceed human performance in chess while having no ability to understand a conversation or navigate a physical environment. This illustrates the difference between narrow AI, designed for a limited domain, and artificial general intelligence (AGI), a hypothetical form of AI with broad, flexible competence across many domains. Most deployed AI today is narrow AI. Intelligent agentsAn agent receives information from an environment through sensors or data inputs and produces actions through actuators, software commands or recommendations. A simplified agent loop is: perceive → interpret → decide → act → receive feedback The loop may operate in milliseconds, as in autonomous driving, or over months, as in strategic forecasting. The quality of an agent depends not only on its prediction model but also on the quality of its observations, objective function, action constraints and feedback process. 2. Related Fields and Their BoundariesMachine learningMachine learning (ML) is a set of methods through which a computer system improves its performance on a task by using experience, usually represented as data, rather than relying entirely on manually written rules. Suppose a model receives an input vector x and produces a prediction f_θ(x), where θ represents adjustable parameters. During training, the system uses data and an objective function to adjust these parameters. A general empirical-risk objective is: θ* = arg min_θ (1/n) ∑ᵢ₌₁ⁿ L(f_θ(xᵢ), yᵢ) Here, n is the number of training examples, xᵢ is the input for example i, yᵢ is its target value, f_θ is the model, L is a loss function measuring error, and θ* is the parameter setting that minimizes average training loss. This formulation assumes that examples are represented in a suitable form and that minimizing the selected loss is a reasonable approximation to the real-world objective. Training performance alone does not guarantee good performance on new data. Common learning paradigms are: - Supervised learning: the model learns from input-output pairs, such as medical images labelled with diagnoses.
- Unsupervised learning: the system identifies structure without target labels, such as customer segments.
- Self-supervised learning: the system creates learning targets from the data itself, as in predicting missing words in text.
- Reinforcement learning: an agent learns actions through interaction and rewards or penalties.
- Semi-supervised learning: a small labelled dataset is combined with a larger unlabelled dataset.
Deep learningDeep learning is machine learning using neural networks with multiple computational layers. Each layer can transform representations produced by earlier layers. In image analysis, early layers may detect edges, intermediate layers may represent shapes and textures, and later layers may represent objects or categories. A basic neuron can be represented as: z = wᵀx + b, a = φ(z) The vector x contains inputs, w contains weights, b is a bias, z is the weighted sum, φ is an activation function and a is the output. The transpose notation wᵀx denotes a dot product. A deep network composes many such transformations. Deep learning is powerful when large datasets, suitable computation and appropriate architectures are available, but it can be data-hungry, difficult to interpret and expensive to operate. Data scienceData science is an interdisciplinary field concerned with collecting, managing, analyzing, modelling, communicating and using data to generate knowledge or support decisions. It includes statistics, database systems, visualization, experimentation, domain expertise and machine learning. Machine learning focuses primarily on learning patterns or making predictions. Data science includes those activities but also includes data acquisition, cleaning, exploratory analysis, causal investigation, reporting and organizational decision-making. A data scientist may conclude that a simple statistical model or carefully designed experiment is more appropriate than a complex neural network. Generative AIGenerative AI refers to systems that learn patterns in data and generate new outputs that resemble the learned data distribution. Examples include language models, image-generation systems, speech synthesizers, music generators and code assistants. A generative model estimates a distribution over possible data. If x denotes an observation, a model may estimate p(x). A conditional generator estimates p(x|c), where c is a prompt, class, instruction or other condition. Generation involves sampling or decoding from this learned model. A generated output is therefore not necessarily a retrieved fact; it is an output produced according to learned statistical regularities and the generation procedure. Large language models (LLMs) are generative models trained on very large collections of text and related data. They commonly operate by predicting tokens, where a token may be a word, word fragment or symbol. Their fluent output can create an impression of understanding, but fluency does not guarantee factual accuracy, reasoning reliability, source awareness or real-world grounding. 3. Historical Evolution of AIFoundational ideas: 1940s–1950sThe mathematical study of computation, formal logic and cybernetics provided important foundations. In 1950, Alan Turing discussed whether machines could exhibit intelligent behaviour and proposed an imitation-game approach to the question. Early work on neural computation, information theory and symbolic reasoning also shaped the field. The term artificial intelligence became established after the 1956 Dartmouth workshop, associated with researchers including John McCarthy, Marvin Minsky, Claude Shannon and Nathaniel Rochester. Early optimism reflected the belief that many aspects of intelligence could be described precisely enough for machines to reproduce them. Symbolic AI: 1950s–1970sEarly AI emphasized explicit symbols, logical rules, search and problem representation. Programs solved restricted puzzles, proved theorems and manipulated formal language. The approach was effective where rules were explicit and environments were well defined. However, symbolic systems struggled with perception, ambiguity, common-sense knowledge and the enormous number of exceptions found in real environments. Encoding all relevant knowledge manually became expensive and brittle. Knowledge-based systems and expert systems: 1970s–1980sExpert systems represented specialist knowledge as rules and used an inference engine to derive conclusions. For example, a medical system might apply rules linking symptoms to possible conditions. These systems demonstrated commercial value in selected domains, but maintaining knowledge bases was difficult. They also depended heavily on the quality and completeness of expert-provided rules. Periods of reduced funding and disappointment are known as AI winters. They occurred when promised capabilities exceeded technical performance, available computing power, data or commercial value. Statistical and machine-learning approaches: 1990s–2000sImproved datasets, statistical modelling, digital storage and computational power encouraged a shift toward systems that learned patterns from examples. Probabilistic models, decision trees, support-vector machines, ensemble methods and recommender systems became important. Evaluation increasingly focused on measurable generalization performance rather than only on manually encoded knowledge. Deep learning and foundation models: 2010s onwardThe combination of large datasets, graphics-processing hardware, improved optimization and neural-network architectures produced major advances in speech recognition, computer vision and natural-language processing. Transformer architectures, introduced in 2017, enabled highly scalable modelling of relationships among sequence elements and contributed to the rise of modern foundation models. Foundation models are large models trained on broad data and adapted to many downstream tasks. Contemporary generative AI builds on these developments, but important challenges remain concerning reliability, copyright, privacy, bias, energy use, security and accountability. 4. Three Major Approaches to AISymbolic AISymbolic AI represents knowledge explicitly using symbols, rules, logic, ontologies, constraints and search procedures. Strengths include: - explicit reasoning steps;
- relatively strong interpretability;
- precise handling of rules and constraints;
- usefulness when expert knowledge is stable and formal.
Limitations include: - high knowledge-engineering costs;
- difficulty handling noisy or unstructured inputs;
- brittleness when rules do not cover unusual cases;
- weak ability to learn directly from raw data.
Rule-based fraud checks and planning systems with formal constraints are examples of symbolic applications. Statistical and subsymbolic AIStatistical AI represents knowledge through parameters, probability distributions or learned functions rather than only through explicit rules. It includes classical machine learning, neural networks and deep learning. Strengths include: - learning from examples;
- handling noise and uncertainty;
- strong performance in perception and prediction;
- adaptation to changing patterns when retrained appropriately.
Limitations include: - dependence on representative data;
- sensitivity to distribution changes;
- difficulty providing faithful explanations;
- possible spurious correlations;
- vulnerability to adversarial or contaminated inputs.
Hybrid AIHybrid AI combines symbolic and statistical methods. A neural model may extract information from text or images, while a symbolic component applies business rules, safety constraints or formal verification. This can combine flexible perception with controlled decision-making. For example, an industrial inspection system might use deep learning to detect a possible defect and a rule engine to determine whether the product should be quarantined according to safety regulations. Hybrid design is especially useful when perception is uncertain but final actions must satisfy explicit requirements. | Approach | Main representation | Typical strength | Typical weakness |
|---|
| Symbolic | Rules, logic, symbols | Explainable constraints and reasoning | Brittle and costly to encode | | Statistical | Parameters and probability patterns | Learning from noisy data | Data dependence and limited interpretability | | Hybrid | Combination of both | Flexible yet constrained systems | Greater design and integration complexity |
5. Core Capabilities and ApplicationsAI systems may provide several related capabilities: - Perception: interpreting images, audio, sensor streams or documents.
- Classification: assigning an input to a category, such as spam or non-spam.
- Regression and forecasting: estimating numerical values, such as demand or energy consumption.
- Natural-language processing: analysing, translating, summarizing or generating language.
- Reasoning: deriving conclusions from information and rules.
- Planning and optimization: selecting actions or schedules under constraints.
- Recommendation: ranking items likely to interest a user.
- Anomaly detection: identifying unusual observations.
- Robotics and control: coordinating perception, decisions and physical action.
- Generation: producing text, images, audio, code or synthetic data.
Applications include healthcare triage, medical-image assistance, predictive maintenance, logistics, agriculture, cybersecurity, finance, education, manufacturing, public administration, accessibility tools and scientific research. The same capability can be beneficial or harmful depending on deployment context. A recommendation system can improve access to information but may also amplify sensational material or restrict user choice through personalization. 6. Why AI Systems FailAI performance is shaped by the complete pipeline rather than by the model alone. Important failure sources include: - Poor problem formulation: the measured objective does not represent the real organizational goal.
- Data quality problems: missing values, incorrect labels, duplicates, leakage or outdated records.
- Sampling bias: training data do not represent the population in which the system will operate.
- Distribution shift: relationships change between development and deployment.
- Overfitting: a model learns accidental patterns in training data and performs poorly on new cases.
- Automation bias: users accept system recommendations without sufficient scrutiny.
- Feedback loops: system outputs influence future data, reinforcing earlier decisions.
- Security attacks: adversaries manipulate inputs, training data or model access.
- Integration failure: a technically accurate model is inserted into a workflow where its output is misunderstood or ignored.
- Unclear accountability: no person or institution is responsible for monitoring and correction.
Accuracy is only one evaluation dimension. Depending on the application, practitioners may also assess precision, recall, calibration, latency, cost, robustness, fairness, interpretability, privacy and safety. For binary classification, a confusion matrix distinguishes true positives, false positives, true negatives and false negatives. Common measures include: Precision = TP ÷ (TP + FP) Recall = TP ÷ (TP + FN) Here, TP is the number of correctly identified positive cases, FP is the number of negative cases incorrectly classified as positive, and FN is the number of positive cases missed by the system. These measures apply to binary classification and require a clearly defined positive class. Precision is important when false alarms are costly; recall is important when missed cases are especially harmful. 7. Ethical, Legal and Governance ConsiderationsAI systems can affect employment, credit, healthcare, education, policing, welfare and access to services. Responsible practice therefore requires more than technical competence. Fairness and discriminationHistorical data may encode unequal treatment. A model trained on such data can reproduce or intensify disadvantage. Fairness cannot be reduced to a single universal formula because different fairness criteria may conflict, especially when groups have different base rates. Practitioners should identify affected groups, examine error patterns, involve domain stakeholders and document design choices. Privacy and data protectionData collection should have a legitimate purpose, appropriate notice, access controls, retention limits and safeguards against re-identification. Sensitive data require particular care. Training a model on data does not automatically remove privacy obligations. Transparency and explainabilityUsers should know when they are interacting with an AI system and understand the important factors governing consequential decisions. Explanations should be faithful to the system’s actual behaviour, not merely plausible stories generated after the fact. Accountability and human oversightOrganizations should assign responsibility for approval, monitoring, incident response and system retirement. Human oversight must be meaningful: a human who cannot understand, challenge or override a recommendation provides only nominal control. Safety, security and sustainabilitySystems should be tested under ordinary, unusual and adversarial conditions. Generative systems require controls for harmful content, confidential-data leakage, fabricated information and misuse. Large-scale computation also has financial and environmental costs, including electricity, hardware production and cooling requirements. Good governance practices include documented intended use, data provenance records, model cards or system documentation, version control, independent testing, monitoring after deployment, user training and an auditable incident process. Applicable laws vary by jurisdiction, so professional teams must consult relevant data-protection, consumer-protection, safety, intellectual-property and sector-specific requirements. 8. Illustrative Case: Predictive Maintenance in ManufacturingBackgroundA factory operates industrial pumps whose unexpected failure causes production delays. Managers propose an AI system that predicts whether a pump is likely to fail within the next seven days. ProblemThe factory has sensor readings for temperature, vibration, pressure and operating hours. Historical maintenance records exist, but failure labels are incomplete because some pumps were replaced for preventive reasons. The objective is not simply to maximize predictive accuracy. It is to reduce unplanned downtime without causing excessive unnecessary inspections. AnalysisA data-science team first audits sensor quality, timestamps, maintenance definitions and missing records. It separates training and evaluation data by time rather than randomly, because random splitting could allow information from the future to leak into the past. Engineers identify operating regimes, since a vibration level that is normal during startup may indicate a problem during steady operation. The team compares a transparent baseline, such as a threshold and logistic-regression model, with a tree-based model. Evaluation includes recall for actual failures, precision for maintenance alerts, detection lead time, inspection cost and downtime avoided. The model is not permitted to issue an automatic shutdown because prediction uncertainty and incomplete labels make that action unsafe. Approach and solutionThe deployed system produces a risk score and highlights the sensor patterns contributing to the alert. A maintenance engineer reviews the alert, checks the equipment and records the outcome. These outcomes become new evidence, but the team guards against feedback bias: pumps receiving more inspections naturally generate more observations. OutcomeIn an illustrative pilot, the system reduces unexpected failures while producing a manageable number of inspections. The result is accepted only after comparison with the previous maintenance process, review of false negatives and confirmation that performance is stable across pump types and operating conditions. Learning points- The business objective must be translated into measurable operational outcomes.
- A simple baseline is essential for judging whether AI adds value.
- Time-aware evaluation is appropriate when predicting future events.
- Human review and safety constraints are part of the system design.
- Monitoring must continue because equipment, processes and failure patterns change.
9. Best Practices for AI ProjectsA professional AI project should: - define the decision, user and affected population before selecting a model;
- establish a baseline and success criteria that include operational and ethical measures;
- document data provenance, consent, quality, representativeness and limitations;
- separate training, validation and final testing data appropriately;
- use the least complex model that meets the requirement;
- test subgroup performance, robustness and realistic failure cases;
- design human interaction, escalation and override procedures;
- protect data, models, interfaces and supply chains;
- monitor drift, incidents, costs and unintended effects after deployment;
- retire or retrain systems when their assumptions no longer hold.
Contemporary DevelopmentsCurrent research and industry practice emphasize multimodal models that process combinations of text, images, audio and video; retrieval-augmented generation, which supplies models with external documents; smaller and more efficient models; responsible foundation-model evaluation; AI agents that use tools; federated and privacy-preserving learning; and methods for improving robustness and interpretability. These developments do not eliminate foundational issues. More capable models still require reliable data, well-defined objectives, careful evaluation and accountable deployment. The central professional question is not “Can AI perform this task?” but “Under what conditions should this system perform this task, with what safeguards and responsibility?” Chapter SummaryArtificial intelligence is the broad discipline of building systems capable of perception, reasoning, learning, language use, planning and action. Machine learning enables systems to learn patterns from data; deep learning uses multilayer neural networks; data science covers the wider process of turning data into knowledge and decisions; and generative AI produces new content from learned data patterns. AI has evolved from symbolic reasoning and hand-coded rules toward statistical learning, deep learning and foundation models. Symbolic systems provide explicit rules and constraints, statistical systems learn from examples, and hybrid systems combine both. AI supports applications in perception, prediction, language, recommendation, robotics, maintenance and content generation. Successful AI requires more than model accuracy. Data quality, generalization, changing environments, workflow integration, fairness, privacy, security, explainability, human oversight and accountability determine whether an AI system is useful and safe. Professional practice therefore treats AI as a governed sociotechnical system rather than an isolated algorithm. Key TermsArtificial intelligence: The field of designing computational systems that perform tasks associated with intelligence. Agent: A system that observes an environment and acts toward objectives. Artificial general intelligence: A hypothetical AI with broad competence across many domains. Machine learning: Methods that improve task performance through data or experience. Deep learning: Machine learning based mainly on multilayer neural networks. Data science: The interdisciplinary practice of extracting knowledge and supporting decisions using data. Generative AI: AI that produces new content such as text, images, audio or code. Foundation model: A broadly trained model adaptable to many downstream tasks. Symbolic AI: AI based on explicit symbols, rules, logic and search. Statistical AI: AI based on learned parameters, patterns and probability models. Hybrid AI: An approach combining symbolic and statistical methods. Supervised learning: Learning from labelled input-output examples. Unsupervised learning: Learning structure from data without target labels. Reinforcement learning: Learning actions through rewards and interaction. Overfitting: Learning training-specific patterns that fail to generalize. Distribution shift: A change between development data and deployment conditions. Precision: The proportion of predicted positive cases that are actually positive. Recall: The proportion of actual positive cases that are correctly identified. Explainability: The degree to which system behaviour can be meaningfully understood. Model drift: A decline in performance as data or relationships change. Review QuestionsShort Answer Questions- Define artificial intelligence and explain why it is broader than machine learning.
- What is the main difference between deep learning and other machine-learning methods?
- Distinguish supervised, unsupervised and reinforcement learning.
- Identify two strengths and two limitations of symbolic AI.
- Why can a model with high test accuracy still be unsuitable for deployment?
Long Answer Questions- Trace the major stages in AI’s historical development from symbolic systems to foundation models.
- Compare symbolic, statistical and hybrid AI approaches using examples.
- Explain the relationship among AI, machine learning, deep learning, data science and generative AI.
- Discuss the ethical, legal and governance issues that arise when AI is used in consequential decisions.
- Explain why data quality, distribution shift and workflow design are as important as model selection.
Analytical / Application Questions- A hospital wants to predict which patients may deteriorate within 24 hours. Propose an AI approach, identify suitable evaluation measures and describe safeguards.
- A bank uses an AI model to flag suspicious transactions. Explain how false positives and false negatives affect operations and how you would evaluate the system.
- Design a high-level hybrid AI solution for an autonomous warehouse vehicle. Identify the statistical components, symbolic constraints and human-oversight mechanisms.
Multiple Choice Questions with AnswersQuestion 1Which statement best describes machine learning? A. A method that requires every decision to be written as a fixed rule B. Methods that improve performance by learning patterns from data or experience C. A hardware technology used only in robots D. A database system for storing labelled records Correct Answer: B. Methods that improve performance by learning patterns from data or experience Question 2What is the defining characteristic of deep learning? A. Use of multilayer neural networks B. Use of only manually encoded rules C. Inability to process unstructured data D. Requirement that all data be collected by robots Correct Answer: A. Use of multilayer neural networks Question 3Which approach represents knowledge primarily through rules, logic and symbols? A. Statistical AI B. Generative AI C. Symbolic AI D. Reinforcement learning Correct Answer: C. Symbolic AI Question 4What is a principal difference between data science and machine learning? A. Data science includes data management, analysis and communication in addition to modelling B. Machine learning never uses statistics C. Data science applies only to physical sensors D. Machine learning is broader than all data-related activities Correct Answer: A. Data science includes data management, analysis and communication in addition to modelling Question 5In supervised learning, the training data normally contain: A. Only unlabelled observations B. Input-output examples or target labels C. Rewards but no inputs D. Rules written entirely by domain experts Correct Answer: B. Input-output examples or target labels Question 6What does generative AI primarily do? A. Only classify existing records B. Guarantee that every generated statement is factually correct C. Produce new content based on learned data patterns D. Replace the need for data governance Correct Answer: C. Produce new content based on learned data patterns Question 7If a binary classifier produces 80 true positives and 20 false positives, its precision is: A. 20% B. 25% C. 80% D. 100% Correct Answer: C. 80% Question 8Which situation is an example of distribution shift? A. The model is evaluated on the same records used for training B. The deployment population or operating conditions differ from the training data C. The model has a smaller number of parameters than expected D. A label is represented as a category instead of a number Correct Answer: B. The deployment population or operating conditions differ from the training data Question 9Why can hybrid AI be useful in safety-critical applications? A. It removes the need for testing B. It combines flexible statistical perception with explicit rules or constraints C. It guarantees zero prediction error D. It uses no training data Correct Answer: B. It combines flexible statistical perception with explicit rules or constraints Question 10Which practice is most appropriate after an AI system is deployed? A. Stop evaluating it because testing is complete B. Monitor performance, drift, incidents and unintended effects C. Remove all human oversight D. Change the objective whenever a single prediction is wrong Correct Answer: B. Monitor performance, drift, incidents and unintended effects
|