BS Artificial Intelligence and BSCS students can read Artificial Intelligence: Foundations of Computational Agents free online. It is the third edition (2023) of the textbook by David L. Poole and Alan K. Mackworth, published by Cambridge University Press and used for the Artificial Intelligence course at many universities. The authors keep the complete text on their site with the publisher’s permission. There is no free PDF of the whole book: the legitimate free copy is the HTML edition, and print copies can be bought from Cambridge.
The book treats AI as the design of intelligent agents. It starts with agents and hierarchical control, then moves through search, constraints, logic and planning, and on to supervised learning, neural networks, probability, causality, decision making, reinforcement learning and multiagent systems. The last parts cover relations, knowledge graphs and the social impact of AI. This edition adds chapters on deep learning, causality and social impact, and it ties the algorithms to open-source Python code, so it works for both lectures and lab practice.
Book Overview
| Course | Artificial Intelligence |
| Degree Programs | BS Artificial Intelligence, BSCS |
| Level | University / advanced undergraduate and graduate |
| Edition | 3rd edition (2023); online HTML maintained by the authors |
| Authors | David L. Poole, Alan K. Mackworth |
| Publisher | Cambridge University Press |
| Copyright | © 2023 David L. Poole and Alan K. Mackworth |
| Language | English |
| Total Chapters | 19 chapters in six parts, plus 2 appendices |
| Exercises | Exercises at the end of every chapter (about 200 in total) |
| Code | Open-source Python implementations at aipython.org |
| License | CC BY-NC-ND 4.0 (HTML edition) |
| Format | Free online book (HTML); no free PDF; print edition from Cambridge University Press |
Chapter List
Chapter 1: Artificial Intelligence and Agents
Part I: Agents in the World · Difficulty: Easy · Key topics: computational agent, Turing test, physical symbol system, agent design space, dimensions of complexity, satisficing, delivery robot
Chapter 1 defines artificial intelligence as the study of computational agents that act intelligently, and separates the scientific goal of understanding intelligence from the engineering goal of building useful systems. It sketches the history of the field and its links to other disciplines, then describes an agent as something that acts in an environment using only its abilities, prior knowledge, history of stimuli and goals. Prototypical applications such as a delivery robot, a diagnostic assistant, a tutoring agent, a trading agent and a smart home are introduced. The chapter then lays out the dimensions of complexity that make up the agent design space and previews the rest of the book.
Key Points:
- AI is the study of computational agents that act intelligently.
- An agent has access only to its abilities, prior knowledge, history of stimuli, and goals and preferences.
- The Turing test and Winograd schemas are two ways of probing whether behaviour looks intelligent.
- A physical symbol system manipulates symbols to decide what to do.
- The design space has ten dimensions, including modularity, planning horizon, representation, computational limits, learning, uncertainty, preference, number of agents and interactivity.
- A satisficing solution is one that is good enough, as opposed to an optimal one.
Memory Tip: Treat the dimensions as a checklist. For any AI problem you meet, say where it sits on each dimension before you choose a technique.
Common Mistake: Treating AI as the same thing as chatbots or machine learning. In this book learning is only one dimension of the design space.
Important Questions:
- What is a computational agent? An entity that acts in an environment, choosing what to do from its abilities, prior knowledge, history of stimuli, goals and preferences, using computation.
- What are the scientific and engineering goals of AI? The scientific goal is to understand intelligent behaviour by analysing natural and artificial agents; the engineering goal is to design useful intelligent artefacts.
Chapter 2: Agent Architectures and Hierarchical Control
Part I: Agents in the World · Difficulty: Medium · Key topics: body, controller, percepts, commands, belief state, agent function, hierarchical control, offline and online computation
Chapter 2 opens up the agent as a system made of a body and controllers that exchange percepts and commands with the environment through sensors and actuators. Time is treated as discrete steps, so an agent’s behaviour is a function from its percept history to its commands, and it keeps a belief state as its memory. The chapter then shows how complex agents are built from layers of controllers, where each layer treats the layer below as its body. It also compares discrete, continuous and hybrid designs and explains what to compute at design time versus while acting. The social impact section asks who should set the values built into self-driving cars.
Key Points:
- An agent system is an agent plus its environment; an agent is a body plus interacting controllers.
- Sensors produce percepts and actuators carry out commands.
- Agents are situated in time and decide using their belief state and current observations.
- Complex agents are built from interacting hierarchical layers.
- Knowledge is acquired at design time, offline, or online while the agent acts.
- An agent’s decisions implicitly express the preferences of whoever designed it.
Memory Tip: Think of a company. The top layer sets goals, the middle layers turn them into tasks, and the bottom layer moves the wheels; each layer sees the one below as its body.
Common Mistake: Assuming the controller reacts only to the latest percept. It also depends on its belief state, which is its memory of the past.
Important Questions:
- What is a belief state? What the agent has remembered from its history of percepts; together with the current observation it determines the next action and the next memory.
- Why is hierarchical control used? It splits a complex agent into layers that work at different levels of abstraction and timescales, so each layer can be designed and tested on its own.
Chapter 3: Searching for Solutions
Part II: Reasoning and Planning with Certainty · Difficulty: Medium · Key topics: state space, frontier, breadth-first, depth-first, iterative deepening, lowest-cost-first, A* search, heuristics, pruning, dynamic programming
Chapter 3 treats problem solving as finding a path through a graph of states. It defines a state-space problem with a start state, actions, goals and costs, then presents a generic search algorithm built around a frontier of paths. Uninformed strategies come first: breadth-first, depth-first, iterative deepening and lowest-cost-first search. Heuristic search follows with A* and depth-first branch and bound, including advice on designing a heuristic function. The chapter finishes with cycle pruning, multiple-path pruning, searching backwards, and dynamic programming that stores the cost to the goal for every node.
Key Points:
- A search problem is a graph of states, with a start node, goal nodes and arc costs.
- Breadth-first search finds a path with the fewest arcs but needs memory that grows quickly with depth.
- Depth-first search needs little memory but can go on forever in graphs with cycles or infinite paths.
- A* chooses the path with the smallest cost so far plus heuristic estimate to the goal.
- An admissible heuristic never overestimates the true cost, which lets A* return a lowest-cost path.
- Iterative deepening and branch and bound find lowest-cost paths with far less memory than A*.
Practice Tip: Run the search code at aipython.org on one of its example graphs and count how many paths each strategy expands before it reaches the goal.
Common Mistake: Choosing a heuristic that sometimes overestimates. A* may then return a path that is not the cheapest.
Important Questions:
- What makes a heuristic admissible? It is a non-negative estimate that never exceeds the actual cost of the cheapest path from a node to a goal.
- How do breadth-first and depth-first search differ in space use? Breadth-first keeps every path of the current depth in its frontier, which grows exponentially; depth-first keeps one path and its unexplored siblings, which grows only linearly with depth.
Chapter 4: Reasoning with Constraints
Part II: Reasoning and Planning with Certainty · Difficulty: Medium · Key topics: variables and domains, CSP, arc consistency, domain splitting, variable elimination, stochastic local search, random restart, constrained optimization, gradient descent
Chapter 4 moves from explicit states to features. A constraint satisfaction problem is a set of variables with domains plus hard or soft constraints, and a solution is an assignment that meets the hard constraints or optimizes the soft ones. Solving methods build up in order: search over assignments, arc consistency, domain splitting, and variable elimination that exploits sparse constraint graphs. The chapter then turns to stochastic local search, random restarts and population-based methods, and to optimization including gradient descent for continuous functions. A scheduling task carries the social impact discussion, with its message about weighing everyone’s preferences.
Key Points:
- Reasoning with variables is usually far more efficient than reasoning over explicit states.
- A CSP has variables, a domain for each, and constraints over subsets of variables called scopes.
- Arc consistency removes domain values that have no supporting value in a neighbouring constraint.
- Stochastic local search can find solutions but cannot prove that none exists.
- Random restarts and random steps help local search escape local minima that are not solutions.
- Variable elimination is efficient when the constraint graph is sparse.
Practice Tip: Take a small scheduling problem and run the CSP and local-search code from aipython.org. Compare pure greedy steps with greedy steps plus random moves to see local minima appear.
Common Mistake: Assuming that a local search that stops without an answer proves there is no solution. Only a systematic method can show that.
Important Questions:
- What is arc consistency? A constraint arc is consistent when every value in one variable’s domain has a value in the other variable’s domain that satisfies the constraint; the algorithm deletes values that fail this test.
- Why add randomness to local search? A purely greedy search can get stuck at a local minimum; random steps and restarts let it move away and keep looking.
Chapter 5: Propositions and Inference
Part II: Reasoning and Planning with Certainty · Difficulty: Medium · Key topics: propositional calculus, definite clauses, bottom-up and top-down proof, soundness and completeness, Horn clauses, negation as failure, abduction, SAT
Chapter 5 introduces propositional logic as a compact way for an agent to state what it knows. It defines syntax and semantics, links propositions back to constraints, and then concentrates on definite clauses, where bottom-up and top-down proof procedures are both sound and complete. Later sections cover asking the user for facts, knowledge-level debugging of incorrect and missing answers, proof by contradiction with Horn clauses and assumables, and consistency-based diagnosis. The complete knowledge assumption brings in negation as failure and non-monotonic reasoning. The chapter ends with abduction and causal models that predict the effect of interventions.
Key Points:
- A knowledge base is a set of axioms; a model is an interpretation in which they are all true.
- A knowledge base entails a statement if the statement is true in every model of the knowledge base.
- A definite clause has one atom as its head and a conjunction of atoms as its body.
- A proof procedure is sound if it derives only logical consequences, and complete if it derives all of them.
- Negation as failure treats an atom as false when it cannot be proved, under the complete knowledge assumption.
- Abduction looks for assumptions that explain an observation, which is how diagnosis is framed.
- SAT solvers play a critical role in many applications.
Memory Tip: Sound means no false claims; complete means no missed claims. A good prover needs both.
Common Mistake: Reading a clause backwards. A rule says the body implies the head; it does not say the head implies the body.
Important Questions:
- What do soundness and completeness mean for a proof procedure? Soundness means everything it derives is a logical consequence; completeness means everything that is a logical consequence can be derived.
- What is negation as failure? Concluding that an atom is false because it cannot be proved from the knowledge base, which is valid only when the agent has complete knowledge of the domain.
Chapter 6: Deterministic Planning
Part II: Reasoning and Planning with Certainty · Difficulty: Medium · Key topics: actions, STRIPS, feature-based action representation, forward planning, regression planning, planning as CSP, partial-order planning
Chapter 6 asks how an agent can choose a sequence of actions that achieves a goal when the effects of actions are predictable. It compares the explicit state-space representation with two structured ones: STRIPS, which gives each action preconditions and effects, and a feature-based representation built from causal rules and frame rules. Forward planning searches from the initial state, while regression planning searches backwards from the goal over subgoals. The chapter then converts fixed-horizon planning into a CSP and introduces partial-order planning, which leaves actions unordered until an ordering is needed. It notes that the video game industry has put planning techniques to work.
Key Points:
- Planning is choosing a sequence of actions to achieve a goal.
- In STRIPS an action has preconditions and effects, and any feature not mentioned in the effects keeps its value.
- The feature-based representation uses causal rules for what changes and frame rules for what stays the same.
- Goals can be achievement goals or maintenance goals, among others.
- A forward planner searches states; a regression planner searches subgoals backwards from the goal.
- A partial-order planner adds ordering between actions only when there is a reason to.
Practice Tip: Write the actions of a small domain of your own, such as a delivery robot, in STRIPS and run both a forward and a regression planner from aipython.org. Compare how many nodes each one expands.
Common Mistake: Forgetting what an action leaves unchanged. In the feature-based form these frame conditions have to be stated by frame rules.
Important Questions:
- What is the STRIPS assumption? Every feature not mentioned in an action’s effects keeps the value it had before the action.
- How does regression planning differ from forward planning? Forward planning starts at the initial state and searches states; regression planning starts at the goal and searches backwards, where each node is a subgoal still to be achieved.
Chapter 7: Supervised Machine Learning
Part III: Learning and Reasoning with Uncertainty · Difficulty: Medium · Key topics: supervised learning, classification and regression, loss, decision trees, linear models, overfitting, regularization, cross validation, gradient-boosted trees
Chapter 7 begins with what learning means for an agent: improving behaviour from experience, with a task, data, a measure of improvement and a representation. It then lays the foundations of supervised learning, including training and test examples, classification versus regression, loss functions and the different types of errors. Decision trees and linear regression and classification are the basic models. Overfitting is tackled with pseudocounts, regularization and cross validation, and composite models cover boosting and gradient-boosted trees. The chapter is open about limitations and warns that data always describe the past.
Key Points:
- Supervised learning predicts the target of a new input from a set of input–target pairs.
- Classification predicts a category; regression predicts a real number.
- A loss function measures how far a prediction is from the target.
- Overfitting means fitting the training set well but the test set or future data poorly.
- Regularization and cross validation are standard defences against overfitting.
- Gradient-boosted trees are an efficient and effective representation for many problems.
Practice Tip: Train a decision tree on a small dataset and print training error and test error as you allow deeper trees. The gap that opens is overfitting.
Common Mistake: Tuning choices on the test set. Once you do, it no longer measures how the model will do on new data.
Important Questions:
- What is overfitting? When a model fits its training examples well but does not fit the test set or future predictions, usually because it is too complex for the data.
- Why use cross validation? It estimates performance on unseen data by training and testing on different parts of the data in turn, and helps choose settings such as the amount of regularization.
Chapter 8: Neural Networks and Deep Learning
Part III: Learning and Reasoning with Uncertainty · Difficulty: Hard · Key topics: feedforward networks, ReLU, softmax, backpropagation, Adam, convolutional networks, LSTM, attention, transformers, generative models
Chapter 8 is new in this edition. It builds feedforward networks from layers of linear functions and nonlinear activations such as ReLU, sigmoid and softmax, then shows how backpropagation and stochastic gradient descent train them. Improved optimization comes next with momentum, RMS-Prop, Adam and initialization, along with ways to improve generalization. Convolutional networks handle grids of data, and a long section on sequences covers word embeddings, recurrent networks, LSTMs, attention, transformers and large language models. The chapter closes with autoencoders, adversarial networks and diffusion models, and cautions against decisions based on data of dubious quality.
Key Points:
- A network is layers of parameterized linear functions with nonlinear activation functions between them.
- Use a linear output for a real value, sigmoid for a Boolean value and softmax for a categorical value.
- A network with ReLU hidden units defines a piecewise linear function.
- Backpropagation computes gradients; gradient descent steps against the gradient.
- Convolutional networks apply learnable filters at many positions on a grid.
- An LSTM is a recurrent network designed to avoid vanishing gradients.
- Transformers built on attention are the workhorse for language, vision and biology.
Practice Tip: Train a one-hidden-layer network on a small dataset, print the loss every epoch, and change the learning rate by a factor of ten to see slow training and divergence.
Common Mistake: Picking the wrong output unit. A sigmoid output cannot represent a choice among many classes; that needs softmax.
Important Questions:
- What does backpropagation do? It applies the chain rule layer by layer to compute the gradient of the loss with respect to every parameter, which gradient descent then uses to update them.
- Which problem do LSTMs address? The vanishing gradient problem in plain recurrent networks, which makes it hard to learn long-range dependencies in sequences.
Chapter 9: Reasoning with Uncertainty
Part III: Learning and Reasoning with Uncertainty · Difficulty: Hard · Key topics: probability, conditional independence, belief networks, variable elimination, hidden Markov models, dynamic belief networks, stochastic simulation, particle filtering
Chapter 9 sets up probability as a measure of belief and shows how an agent updates it as evidence arrives. It covers possible-worlds semantics, conditional probability and expected values, then independence, which makes large models manageable. Belief networks are introduced as a way to represent conditional independence, with advice on constructing them. Exact inference uses recursive conditioning and variable elimination, followed by sequential models such as Markov chains, hidden Markov models, dynamic belief networks and probabilistic language models. The chapter ends with stochastic simulation for approximate inference, including likelihood weighting, particle filtering and Markov chain Monte Carlo.
Key Points:
- Probability is a measure of belief in a proposition; the posterior probability is the belief after seeing evidence.
- A belief network gives each variable a conditional probability distribution given its parents.
- Exact inference is efficient for sparse graphs, that is, graphs with low treewidth.
- A hidden Markov model reasons about a sequence of states that cannot be observed directly, as in robot localization.
- Stochastic simulation approximates probabilities by sampling.
- Sampling methods include rejection sampling, likelihood weighting, importance sampling and particle filtering.
Practice Tip: Build a small three-variable belief network in the aipython.org code, compute one posterior by hand, then check it against variable elimination.
Common Mistake: Confusing the probability of a symptom given a disease with the probability of the disease given the symptom. They are different numbers.
Important Questions:
- What is a belief network? A directed acyclic graph with a conditional probability table for each variable given its parents, which represents the conditional independence among random variables.
- Why use stochastic simulation? When exact inference is too expensive, sampling gives approximate answers whose accuracy improves with more samples.
Chapter 10: Learning with Uncertainty
Part III: Learning and Reasoning with Uncertainty · Difficulty: Hard · Key topics: Bayes’ rule, maximum likelihood, MAP, Bayesian learning, pseudocounts, k-means, expectation maximization, learning belief networks, missing data
Chapter 10 applies probability to learning. Bayes’ rule combines a prior with the likelihood of the data, which yields maximum likelihood, maximum a posteriori and fully Bayesian learning that averages over models. Worked topics include learning probabilities with beta and Dirichlet distributions, pseudocounts and Laplace smoothing, probabilistic classifiers, learning decision trees and description length. Unsupervised learning follows with k-means and expectation maximization for soft clustering. The chapter then learns belief networks, covering hidden variables, missing data and structure, and finishes with the practical case of filtering spam email.
Key Points:
- Bayes’ rule: the posterior is proportional to the likelihood times the prior.
- The maximum likelihood model fits the data alone; the MAP model also uses a prior.
- Bayesian learning averages predictions over all models weighted by their posterior.
- Pseudocounts and Laplace smoothing stop a probability from being estimated as exactly zero.
- k-means alternates between assigning points to clusters and recomputing the cluster means.
- Expectation maximization learns parameters of models that have hidden variables.
- Missing values cannot just be ignored; why they are missing has to be modelled.
Common Mistake: Deleting every row with a missing value. If values are missing for a reason related to the outcome, this biases what the model learns.
Important Questions:
- How do maximum likelihood and MAP learning differ? Maximum likelihood picks the model that makes the data most probable; MAP picks the model with the highest posterior, so it also uses a prior and trades fit against complexity.
- What does expectation maximization do? It alternates an expectation step, which fills in the hidden variables with expected values, and a maximization step, which re-estimates the parameters from them, repeating until convergence.
Chapter 11: Causality
Part III: Learning and Reasoning with Uncertainty · Difficulty: Hard · Key topics: causal networks, do-notation, d-separation, missing data, backdoor criterion, do-calculus, front-door criterion, Simpson’s paradox, instrumental variables, counterfactuals
Chapter 11 is new in this edition and explains why correlation in data is not enough to predict what happens when an agent acts. It extends belief networks to causal networks, adds the do-notation for interventions, and uses d-separation to read independencies from the graph. Missing data are handled with missingness graphs. The chapter then shows when the effect of an intervention can be computed from observational data, using the backdoor criterion, the front-door criterion and the do-calculus, and treats Simpson’s paradox and instrumental variables. It ends with counterfactual reasoning for what-if questions.
Key Points:
- The do-notation separates intervening on a variable from merely observing it.
- In a causal network, setting the parents of a variable gives the same effect as observing them.
- D-separation tells which conditional independencies follow from a directed graph.
- The backdoor and front-door criteria are cases where an intervention’s effect can be computed from observational data.
- In Simpson’s paradox the right inference depends on the causal model, not only on the data.
- Counterfactual reasoning answers what-if queries.
Memory Tip: Seeing is not doing. Write P(Y given X) when you observe X, and P(Y given do(X)) when you set X yourself.
Common Mistake: Reading a strong correlation as a treatment effect. A confounder that influences both variables can create the pattern.
Important Questions:
- What is the difference between observing and intervening? Observing a variable gives evidence about its causes, while an intervention sets its value from outside, cutting the influence of its parents; the do-notation expresses the second.
- What is a confounder? A variable that influences both the supposed cause and the effect, so that their association is not purely causal; randomized controlled trials or adjustment such as the backdoor criterion deal with it.
Chapter 12: Planning with Uncertainty
Part IV: Planning and Acting with Uncertainty · Difficulty: Hard · Key topics: utility, axioms of rationality, decision networks, policies, value of information, MDP, value iteration, policy iteration, POMDP
Chapter 12 shows how an agent chooses actions when outcomes are uncertain and preferences matter. It starts from the axioms of rationality that justify utility, then covers factored utility and prospect theory. One-off decisions are modelled with single-stage decision networks, and sequential decisions with decision networks, policies and variable elimination. The value of information and control is treated as its own topic. The chapter then covers decision processes: Markov decision processes, value iteration and policy iteration, dynamic decision networks and partially observable decision processes. The social impact section argues that public decisions are more accountable when the utility measures are stated openly.
Key Points:
- An agent that follows the axioms of rationality acts as if it maximizes expected utility.
- Utility is a measure of preference that combines with probability.
- A policy specifies what the agent does in each situation it might face.
- A decision network represents a finite-stage, partially observable sequential decision problem using features.
- An MDP represents an infinite-stage or indefinite-stage problem in terms of states.
- A fully observable MDP is solved with value iteration or policy iteration.
Memory Tip: Value iteration improves the numbers (values) and reads the policy off at the end; policy iteration improves the policy and recomputes its values in turn.
Common Mistake: Treating expected money as utility. Most people are risk averse, so the utility of money is not a straight line.
Important Questions:
- What is a policy? A function that tells the agent which action to take in each state, or each history of observations in a partially observable problem.
- How do value iteration and policy iteration differ? Value iteration repeatedly updates the estimated value of each state until the values settle, then derives the policy; policy iteration alternates between evaluating a fixed policy and improving it.
Chapter 13: Reinforcement Learning
Part IV: Planning and Acting with Uncertainty · Difficulty: Hard · Key topics: MDP, credit assignment, temporal difference, Q-learning, SARSA, exploration and exploitation, model-based RL, function approximation
Chapter 13 covers how an agent learns to act from rewards when it does not know the model of the world. It formalizes the problem as a Markov decision process, introduces the credit assignment problem, and presents evolutionary algorithms as a way to search for a policy. Temporal-difference learning leads to Q-learning, which is off-policy, and SARSA, which is on-policy. Separate sections deal with exploration versus exploitation, with how to evaluate reinforcement learning algorithms, and with model-based methods that learn dynamics and rewards before planning. The chapter ends with generalization, where linear functions or neural networks represent the value function.
Key Points:
- A Markov decision process is the standard formalism for reinforcement learning.
- Q(s,a) estimates the value of doing action a in state s, and is updated from the temporal-difference error.
- The agent must trade off exploiting what it knows against exploring to learn more.
- Q-learning is off-policy; SARSA is on-policy and learns the value of the policy it actually follows, exploration included.
- Model-based RL learns the dynamics and reward models, then plans with them.
- For large state spaces, a generalizing learner such as a neural network represents Q or the policy.
Practice Tip: Run the Q-learning code from aipython.org on its small example environment with a few different exploration settings, and plot the reward per episode.
Common Mistake: Never exploring. If the agent always takes the action that currently looks best, it may never discover a better one.
Important Questions:
- What is the difference between on-policy and off-policy learning? Off-policy methods such as Q-learning learn the value of the optimal policy while acting differently; on-policy methods such as SARSA learn the value of the policy being followed.
- What is the exploration–exploitation dilemma? The agent can use its current knowledge to collect reward now, or try less-known actions to improve its knowledge for later; good learners balance both.
Chapter 14: Multiagent Systems
Part IV: Planning and Acting with Uncertainty · Difficulty: Hard · Key topics: normal-form games, extensive-form games, minimax, alpha-beta pruning, Nash equilibrium, mechanism design, multiagent reinforcement learning
Chapter 14 considers what changes when several agents act, each with its own utility and with outcomes that depend on everyone’s choices. It represents games in normal form and in extensive form (game trees), and adds multiagent decision networks. Perfect-information games are solved by backing up values in the tree, using minimax with alpha-beta pruning. For imperfect information the chapter explains why acting stochastically can be optimal and how Nash equilibria are computed. It then covers group decision making, mechanism design with payments, and multiagent reinforcement learning, including how state-of-the-art game players work. The social impact section applies game theory to encouraging prosocial environmental behaviour.
Key Points:
- Agents can compete, cooperate, coordinate, communicate and negotiate.
- A normal-form game gives the outcome for each combination of agents’ strategies in a payoff matrix.
- The extensive form models actions and information over time as a game tree.
- Minimax with alpha-beta pruning solves perfect-information games.
- A Nash equilibrium is a strategy profile in which no agent gains by changing its strategy alone.
- With suitable payments, a mechanism can make truthful reporting a dominant strategy and keep outcomes efficient.
Common Mistake: Assuming every game has a best fixed action. With simultaneous moves and hidden information, mixing actions at random can be the best strategy.
Important Questions:
- What is a Nash equilibrium? A strategy for each agent such that no agent can raise its utility by unilaterally deviating from its strategy.
- What does alpha-beta pruning do? It speeds up minimax by skipping branches of the game tree that cannot change the value at the root, without changing the answer.
Chapter 15: Individuals and Relations
Part V: Representing Individuals and Relations · Difficulty: Hard · Key topics: predicate calculus, Datalog, substitution, unification, function symbols, definite-clause grammars, equality, Clark’s completion
Chapter 15 moves from features to worlds made of individuals and the relations among them. It explains why relational structure matters, how symbols get their meaning from an intended interpretation, and then builds up the predicate calculus. Datalog is the main working language, with queries that contain variables. Proofs use substitutions, a bottom-up procedure and unification, and function symbols add data structures and possibly infinite sets of individuals. A section on natural language uses definite clauses for context-free grammars and builds a database interface, and compares the approach with large language models. The chapter ends with equality and the complete knowledge assumption.
Key Points:
- Constants denote individuals and predicate symbols denote relations.
- Datalog has constants, universally quantified variables, relations and rules.
- Unification makes two atoms identical by finding a suitable substitution.
- Function symbols denote individuals built from other individuals, and can build data structures.
- Definite-clause grammars suit natural language interfaces where the language can be controlled.
- Clark’s completion defines the meaning of negation as failure under the complete knowledge assumption.
Practice Tip: Write Datalog facts and rules for a family tree (parent, grandparent, sibling) and query them with variables. Then see which answers change if you add a function symbol.
Common Mistake: Mixing up constants and logical variables. In the book’s notation variables start with an upper-case letter, so a misplaced capital changes the meaning of a rule.
Important Questions:
- What is unification? Finding a substitution of terms for variables that makes two atoms identical, so that a rule can be matched against a goal during proof.
- What are function symbols used for? To describe individuals in terms of other individuals, for example lists or trees, which allows possibly infinite sets of individuals and data structures.
Chapter 16: Knowledge Graphs and Ontologies
Part V: Representing Individuals and Relations · Difficulty: Medium · Key topics: triples, identifiers and IRIs, Wikidata, classes and properties, ontologies, OWL, description logic, top-level ontologies
Chapter 16 shows how knowledge is stored and shared as triples of subject, property and value. It explains individuals and identifiers, including IRIs, and the graphical form of a knowledge graph, using Wikidata as an example. Classes and properties are then organized into hierarchies, with guidance on designing classes well. The last main section covers ontologies and knowledge sharing: description logic, the OWL family of languages, and top-level ontologies that let domain ontologies work together. It notes that data repositories with provenance, built on ontologies, are widely used in data-driven science.
Key Points:
- Individual–property–value triples form a flexible, universal representation of relations.
- Identifiers such as IRIs let different datasets refer to the same individual unambiguously.
- A class is a set of real and potential individuals; properties have a domain and a range.
- Class and property hierarchies let properties be inherited.
- Ontologies give semantic interoperability and let groups share knowledge.
- A top-level ontology gives domain ontologies a common framework.
Memory Tip: Every fact is a three-word sentence: subject, verb, object. A knowledge graph is just millions of these sentences joined where they share a subject or object.
Common Mistake: Using a plain name such as a person’s name as the identifier. Two different individuals can share a name, which is why triples use unique identifiers.
Important Questions:
- What is a triple? A statement made of an individual, a property and a value, for example a subject, a verb and an object, used to build knowledge graphs.
- Why are ontologies useful? They fix the meaning of terms and relations, so different systems and datasets can be combined and share knowledge.
Chapter 17: Relational Learning and Probabilistic Reasoning
Part V: Representing Individuals and Relations · Difficulty: Hard · Key topics: relational probabilistic models, plate models, parameter sharing, aggregators, collective classification, existence and identity uncertainty, collaborative filtering, embeddings
Chapter 17 joins relations with learning and probability. It begins by turning relations into features and random variables, and then presents relational probabilistic models in which parameters are shared across many individuals, including plate models and aggregators. Other sections cover collective classification and crowd sourcing, language and topic models, and uncertainty about whether and which individuals exist. The final main section covers embedding-based models, which learn binary relations and knowledge graphs through latent properties, as in collaborative filtering. The social impact discussion looks at recommendation systems that optimize engagement.
Key Points:
- Relational representations are needed when the entities are not known before the model is built.
- Parameter sharing, or weight tying, lets one set of parameters apply to many individuals.
- Plate models specify probabilistic models before the entities are known.
- Many earlier probabilistic models become relational by adding logical variables and parameter sharing.
- Collaborative filtering predicts relations by inventing latent properties for individuals.
- Recommenders that optimize engagement can increase polarization.
Common Mistake: Assuming the entities in the data are all the entities that exist. This chapter deals with existence and identity uncertainty explicitly.
Important Questions:
- What is a plate model? A compact probabilistic model whose parameterized random variables are repeated for every individual in a population, with parameters shared, so it can be written down before the individuals are known.
- How does collaborative filtering make predictions? It learns latent properties of users and items from known ratings and uses them to predict the missing ones.
Chapter 18: The Social Impact of Artificial Intelligence
Part VI: The Big Picture · Difficulty: Easy · Key topics: digital economy, bias, human-centred AI, work and automation, transportation, sustainability, ethics, regulation
Chapter 18 is new in this edition and gathers the social questions that earlier chapters touched in their own social impact sections. It starts with the digital economy: the shift from atoms to bits, disintermediation and the attention economy. It then looks at values and bias in systems trained on large datasets, human-centred AI, and the alignment problem, and discusses work and automation. Transportation and sustainability are presented as areas with beneficial applications. The chapter closes with ethics, codes of conduct, and governance and regulation of harmful uses.
Key Points:
- The digital economy emphasizes information rather than matter and reduces friction in transactions.
- Disintermediation removes intermediary roles and can disrupt employment.
- Models trained on massive datasets may embody racist, sexist or other demeaning attitudes.
- The alignment problem asks how to match AI systems with human values.
- AI is removing demand for some skills and increasing demand for others.
- Ethical codes, legislation, regulation and certification are being developed to restrict harmful uses.
Memory Tip: For any AI product, ask three questions: who benefits, who can be harmed, and who is accountable.
Common Mistake: Writing an essay answer that is only about danger or only about benefits. The chapter treats AI impact as both.
Important Questions:
- How can an AI system become biased? If its training data reflect prejudiced human decisions or an unbalanced sample, the learned model can reproduce or amplify that bias.
- What is disintermediation? The removal of intermediary roles between producers and customers, which AI and digital platforms make easier and which changes patterns of employment.
Chapter 19: Retrospect and Prospect
Part VI: The Big Picture · Difficulty: Easy · Key topics: deploying AI, stakes, data availability, agent design space, integrating dimensions
Chapter 19 steps back from the techniques. It first discusses deploying AI, where predictions are acted on in the world rather than scored on a test set, and offers a decision tree for choosing technology that starts from whether the stakes are high or low and asks about the data available. It then revisits the agent design space and places each representation from the book, such as hierarchical control, search, decision networks, MDPs, Q-learning and deep reinforcement learning, in that space. The final section looks ahead and observes that integrating more of the dimensions is progressing slowly.
Key Points:
- In deployment, actions are carried out in the world instead of being scored against a test set.
- Whether the stakes are low or high is the first question when choosing an AI technology.
- Abundant, homogeneous data and similarity between deployed and training cases favour learning.
- Each technique in the book covers only some values of each dimension of the design space.
- Combining many dimensions in one agent is still an open research problem.
Memory Tip: Use the chapter as a revision map. For each technique, recall which dimensions it handles and which it ignores.
Common Mistake: Choosing a technique because it is fashionable. The chapter asks about stakes, data and how closely deployment cases match training cases first.
Important Questions:
- Why does the book say the stakes matter when choosing an AI technology? Where errors are costly, you need reliable, explainable and well-tested methods; where stakes are low, being better than the alternatives may be enough.
- What is the agent design space useful for? It shows the frontier of knowledge by placing each representation along the dimensions, so you can see which combinations are well understood and which are not.
Appendix A: Mathematical Preliminaries and Notation
Appendix · Difficulty: Easy · Key topics: rolling average, sets and tuples, relations, functions, factors, arrays, relational algebra
Appendix A collects the mathematics that the book needs but that is usually taught elsewhere. It starts with the rolling average, derived as an incremental update that moves the old estimate toward each new value, and shows how a fixed step size gives newer values more weight. It then gives definitions for sets, tuples, relations and functions, and extends functions to variables with factors and arrays, using notation based on Python, C and Java. The last section covers relations and the relational algebra as used in databases and in AI, treating a relation as a Boolean factor.
Key Points:
- The rolling average updates as the old average plus a step times the difference between the new value and the old average.
- An n-tuple is an ordered grouping of n elements; a relation is a set of tuples.
- A function from a domain to a range gives exactly one value for each element of the domain.
- A factor represents a function on variables; an array is a function whose components can be changed.
- Relational algebra defines operations on relations and underlies relational databases.
Memory Tip: The rolling-average update has the same shape as the updates in gradient descent and temporal-difference learning, so learn it once and you will recognise it later.
Common Mistake: Skipping the appendix because it looks like basic maths. The notation for factors and arrays is used heavily in the probability chapters.
Important Questions:
- How is a rolling average updated? The new average equals the old average plus a step size times the difference between the new value and the old average; a step of one over k gives the plain mean.
- What is a relation in this book? A set of tuples, which can also be seen as a Boolean factor that is true exactly for the tuples in the relation.
Appendix B: Mapping to Open-Source Packages
Appendix · Difficulty: Easy · Key topics: XGBoost, LightGBM, Keras, PyTorch, hyperparameters, default values
Appendix B connects the book’s algorithms and notation to real libraries. Section B.1 maps the gradient-boosted tree algorithm of Chapter 7 to the open-source packages XGBoost and LightGBM and tabulates their hyperparameter names and defaults, such as the number of boosting rounds, the learning rate and the regularization strength. Section B.2 does the same for the deep learning building blocks of Chapter 8 in Keras and PyTorch, covering dense layers, SGD, momentum, RMS-Prop, Adam, dropout and two-dimensional convolution. Readers can use the tables to move from the textbook pseudocode to working code.
Key Points:
- Table B.1 maps the book’s gradient-boosting parameters to XGBoost and LightGBM names and defaults.
- Table B.2 maps Chapter 8 concepts (Dense, SGD, momentum, RMS-Prop, Adam, Dropout, Conv2D) to Keras and PyTorch.
- The same hyperparameter can have a different name and a different default in each package.
- The book’s own pseudocode versions are published as open-source Python at aipython.org.
Practice Tip: After reading Chapter 8, rebuild your one-hidden-layer network in Keras or PyTorch using the table, and check that the same learning rate gives similar training behaviour.
Common Mistake: Assuming default values are the same across libraries. The tables show that learning rates and other defaults differ.
Important Questions:
- Which packages does Appendix B map to? XGBoost and LightGBM for gradient-boosted trees, and Keras and PyTorch for deep learning.
- Why does the appendix list default values? Because the same algorithm can behave differently under different library defaults, so you need to know the settings that correspond to the textbook version.
How to Study This Book
The book is organized as six parts, and the authors present it as one story about the agent design space. Read Chapters 1 and 2 first even if you are in a hurry: the ten dimensions of complexity and the idea of hierarchical control are used in every later chapter. Figure 1 in the preface shows which chapters depend on which, so check it before you skip anything.
For a standard Introduction to Artificial Intelligence course, the natural core is Chapters 1 to 6 and then 7, 9, 12 and 13. That path gives you agents, search, constraints, logic, planning, supervised learning, probability, decision making and reinforcement learning. Chapter 3 (search) is where the technical material starts, so make sure you can trace A* and iterative deepening by hand before moving on.
Chapters 7 to 11 are the machine learning and probability block. Read Chapter 7 before Chapter 8, because neural networks reuse its vocabulary of loss, overfitting and regularization. Read Chapter 9 before Chapter 10, since Bayesian learning needs belief networks. Chapter 11 on causality is the newest and most self-contained part; it is worth reading after Chapter 9 even if your course skips it. Some mathematical maturity helps here, so keep Appendix A open as a notation reference.
Chapters 15 to 17 form the relational part. They are optional for a first course, but Chapter 16 on knowledge graphs and ontologies is a good fit for students heading toward data engineering, and Chapter 15 gives a short introduction to logic programming. Chapter 14 on multiagent systems is a good bridge between decision making and game theory. Chapters 18 and 19 are easy reading and useful for essay questions, so read them in the last week before an exam.
Use the code. The authors publish open-source Python implementations of most algorithms at aipython.org, written to stay close to the pseudocode. Run each algorithm on a tiny example before you attempt the chapter exercises, and read Appendix B when you want to move from the textbook algorithms to libraries such as Keras, PyTorch, XGBoost and LightGBM.
Set realistic expectations. The authors say they chose to explain the foundations rather than cover every recent advance, so the book will not teach you current deep learning engineering, computer vision pipelines or robotics in depth; the preface points to those as specialized topics to study afterwards. Every chapter ends with exercises (about 200 in total) and has its own short social impact section, which is worth reading for essay questions.
Used In These Programs
This book is used for the Artificial Intelligence course in: BS Computer Science and BS Artificial Intelligence. Browse all Artificial Intelligence books or all Computer Science books.
Who Should Read This
This book is written for BSCS and BS AI students taking an Introduction to Artificial Intelligence course, and the preface describes it as suitable for advanced undergraduate or graduate students. It also suits later AI electives. You need to be comfortable programming, and a little probability and calculus helps, though the authors introduce the foundations as they go. It is a good fit if you want one coherent framework for search, logic, probability, learning and decision making instead of a collection of separate topics. It is not a hands-on guide to building products with large language models, and it is not an entry-test book. For the probability and logic that the middle chapters assume, pair it with Mathematics for Computer Science, and for Bayesian thinking in code try Think Bayes.
Applicable Universities
This book is useful for students at Pakistani universities offering BS Computer Science and BS Artificial Intelligence, including Punjab University, Virtual University, COMSATS, FAST, UET, NUST, and other HEC-recognized institutions.
Official Copy of Artificial Intelligence: Foundations of Computational Agents
This book is free from its official site. There is no official PDF, so the legitimate free way to read it is the complete HTML edition. Click the button below to open the book on artint.info, where you can read it chapter by chapter. If you find it useful, the authors ask readers to consider buying the print edition from Cambridge University Press.
→ Visit Official PageFAQs
Is Artificial Intelligence: Foundations of Computational Agents free?
Yes. The complete text of the third edition is available free online at artint.info with the permission of Cambridge University Press. The authors hold the copyright (2023) and license the HTML under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International licence (CC BY-NC-ND 4.0), which allows sharing with credit for non-commercial use but not changing the book. They ask readers to consider buying the print edition.
Is there a PDF of this book?
The official site offers the book as HTML and does not offer a free PDF of the whole text. Print copies are sold through Cambridge University Press and bookstores, and instructors can request extra material such as slides and a partial solution manual from the publisher. This page links only to the official site and does not host any file.
Which edition is this and what is new?
This is the third edition, published by Cambridge University Press in 2023. Its preface lists three new chapters (Neural Networks and Deep Learning, Causality, and The Social Impact of Artificial Intelligence) and a social impact section in each chapter. The authors say the online HTML is stable and changes only when errors are found, and the earlier editions are still available on the site.
How many chapters and exercises does it have?
There are 19 chapters in six parts, plus Appendix A on mathematical preliminaries and Appendix B on mapping to open-source packages. Every chapter ends with exercises, roughly 200 in total. Most algorithms also have open-source Python implementations at aipython.org, written to stay close to the book’s pseudocode.
Is it good for beginners?
It is aimed at advanced undergraduate or graduate students in computer science and related fields, and some chapters are technically demanding. The preface says prior study of logic, probability, calculus or control theory is not needed because the concepts are developed as required, but experience with programming is desirable. A first course in programming and basic discrete mathematics is a sensible starting point.
Does it cover deep learning and large language models?
Yes, at a foundation level. Chapter 8 covers feedforward networks, backpropagation, optimizers such as Adam, convolutional networks, LSTMs, attention, transformers and large language models, plus autoencoders, adversarial networks and diffusion models. The authors say they chose to explain foundations rather than every recent advance, so use it alongside current tutorials if your course is deep-learning heavy.
Related Books
- Think Bayes: Bayesian Statistics in Python – Allen B. Downey
- Mathematics for Computer Science – Lehman, Leighton & Meyer
- Algorithms – Dasgupta, Papadimitriou & Vazirani
- Think Stats: Exploratory Data Analysis in Python – Allen B. Downey
Artificial Intelligence: Foundations of Computational Agents gives you one connected framework for the whole AI course, from search and logic to probability, learning and ethics, in a free online book with matching Python code. It is not a deep-learning engineering manual, but it is a strong base for any later AI or machine learning course. Browse more Computer Science books for the rest of your semester.
Artificial Intelligence: Foundations of Computational Agents, 3rd Edition by David L. Poole and Alan K. Mackworth. Copyright 2023, David L. Poole and Alan K. Mackworth. Published by Cambridge University Press; the complete text is available on the authors’ site with the permission of Cambridge University Press. The HTML is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (CC BY-NC-ND 4.0). Official source: https://artint.info/. This page links to the official site and does not host or copy the book.
© Copyright Policy
Freebooks.pk is an educational resource for students in Pakistan. Textbooks and other books belong to their respective boards, authors and publishers, and all rights remain with them. If you are the copyright holder of any material on this page and want it changed or removed, please contact us or file a request under our DMCA policy. We review every request and remove reported content promptly.
