Unit 1: AI foundations and knowledge representation
Artificial Intelligence & Soft Computing notes · PTU syllabus (PGCA1926)
On this page
- Unit summary
- Foundations of AI
- History of AI
- Problem formulation and search
- Toy problems
- Real-world problems
- Propositional logic and theorem proving
- Resolution in propositional logic
- Horn clauses and forward and backward chaining
- Forward and backward chaining, unification and resolution in FOL
- First-order logic and inference
- Key terms
- Quick revision
- Important questions
Unit summary
Artificial intelligence builds systems that solve problems and reason. This unit covers the foundations and history of AI, toy and real-world problems — Tic-Tac-Toe, Water Jug, 8-puzzle and 8-Queens — problem formulation and search, propositional logic and theorem proving, resolution, Horn clauses, forward and backward chaining, and first-order logic and inference.
After this unit you can
- Explain the foundations and history of AI
- Formulate toy and real-world problems as search problems
- Prove theorems in propositional logic with resolution, Horn clauses and chaining
- Represent knowledge and draw inferences in first-order logic
PTU syllabus topics
- Foundations and history of AI
- toy and real-world problems (Tic-Tac-Toe, Water Jug, 8-puzzle, 8-Queens)
- problem formulation and search
- propositional logic and theorem proving
- resolution
- Horn clauses
- forward/backward chaining
- first-order logic and inference
- 1Convert sentences to clause form (CNF)
- 2Negate the goal and add it
- 3Resolve pairs of clauses
- 4Add the resolvents
- 5Empty clause found
Goal is proved
Topic 1
Foundations of AI
Artificial Intelligence is the branch of computer science that builds systems able to perform tasks that normally need human intelligence — reasoning, learning, perception, language and decision-making.
Thinking humanly
Cognitive modelling
Thinking rationally
Laws of thought, logic
Acting humanly
Turing test
Acting rationally
Rational agents (the modern approach)
The Turing Test (1950): a machine is intelligent if a human interrogator cannot tell it apart from a human in conversation.
Topic 2
History of AI
- 1
1943–1956
McCulloch–Pitts neuron; Turing's test (1950); Dartmouth workshop names AI (1956)
- 2
1956–1974
Early enthusiasm: Logic Theorist, General Problem Solver, LISP, ELIZA
- 3
1974–1980
First AI winter as promises fail
- 4
1980s
Expert systems (MYCIN, XCON); backpropagation revived; second winter late in the decade
- 5
1990s–2000s
Probabilistic methods, machine learning; Deep Blue beats Kasparov (1997)
- 6
2012 onward
Deep learning (ImageNet), AlphaGo (2016), transformers (2017), large language models and generative AI
Topic 3
Problem formulation and search
A problem-solving agent decides what to do by searching for a sequence of actions that reaches a goal. A problem is defined by: initial state, actions, transition model, goal test and path cost.
Example
8-puzzle — states: tile arrangements; actions: move the blank up, down, left or right; goal: tiles in order; path cost: number of moves.
- Initial state
- Where the agent starts
- Actions
- Moves available in each state
- Transition model
- Result of each action
- Goal test
- Checks whether a state is a goal
- Path cost
- Sum of step costs
Topic 4
Toy problems
Tic-Tac-Toe
3 × 3 board of X, O or blank; players alternate
Adversarial; at most 9! move sequences; solved by minimax — perfect play draws
Water Jug
(x, y) litres in a 4-litre and a 3-litre jug; goal 2 litres in the 4-litre jug
Actions: fill, empty, pour; solution (0,0) → (0,3) → (3,0) → (3,3) → (4,2) → (0,2) → (2,0)
8-puzzle
3 × 3 board with tiles 1–8 and a blank; move the blank up, down, left, right
9!/2 = 181,440 reachable states; heuristics: misplaced tiles, Manhattan distance
8-Queens
Place 8 queens with no two attacking
92 solutions; incremental or complete-state formulation; CSP or local search
Topic 5
Real-world problems
- Route finding (maps, airline travel), touring problems (travelling salesperson), VLSI layout, robot navigation, automatic assembly sequencing, protein design and timetabling are formulated the same way, with far larger state spaces and real costs.
Topic 6
Propositional logic and theorem proving
- Propositional logic uses statements (P, Q) and connectives (¬, ∧, ∨, →, ↔). It cannot express "all" or "some".
- First-order (predicate) logic adds objects, predicates, functions and quantifiers: ∀ (for all) and ∃ (there exists).
Example
"All students are hardworking": ∀x Student(x) → Hardworking(x). "Some students like AI": ∃x Student(x) ∧ Likes(x, AI).
- Modus ponens
- From P → Q and P, infer Q
- Modus tollens
- From P → Q and ¬Q, infer ¬P
- And-elimination
- From P ∧ Q, infer P
- Resolution
- From (P ∨ Q) and (¬Q ∨ R), infer (P ∨ R)
- Theorem proving: show that a knowledge base KB entails α (KB ⊨ α) by model checking (truth tables) or by applying sound inference rules.
Topic 7
Resolution in propositional logic
- 1Convert KB and ¬α to conjunctive normal form
- 2Pick two clauses with complementary literals
- 3Add their resolvent
- 4Repeat until the empty clause appears (α is proved) or no new clauses can be added
Example
KB: P → Q, Q → R, P. Prove R. Clauses: ¬P ∨ Q, ¬Q ∨ R, P, and ¬R. Resolve ¬Q ∨ R with ¬R → ¬Q; with ¬P ∨ Q → ¬P; with P → empty clause. Hence R follows.
Topic 8
Horn clauses and forward and backward chaining
- A Horn clause has at most one positive literal; a definite clause has exactly one — e.g., (¬A ∨ ¬B ∨ C), written A ∧ B → C. Inference with Horn clauses is linear in the size of the KB.
Topic 9
Forward and backward chaining, unification and resolution in FOL
- Unification finds a substitution that makes two expressions identical: Knows(John, x) and Knows(John, Mary) unify with {x/Mary}. Lifting applies inference rules to quantified sentences using unification.
Direction
Data-driven: from facts to conclusions
Goal-driven: from the goal back to facts
Starts with
Known facts
The query
Used in
Production systems, monitoring
Expert systems, Prolog
- Resolution proves a statement by contradiction: convert sentences to conjunctive normal form (CNF), add the negated goal, and resolve clauses until the empty clause appears.
- A truth maintenance system (TMS) tracks why each belief is held and retracts conclusions when their supporting facts change.
Example
Rules: Fever ∧ Rash → Measles; Measles → Isolate. Facts: Fever, Rash. Forward chaining derives Measles, then Isolate. Backward chaining from the goal Isolate asks for Measles, then Fever and Rash, which are facts.
Topic 10
First-order logic and inference
- Universal instantiation
- From ∀x P(x), infer P(a) for any constant a
- Existential instantiation
- From ∃x P(x), infer P(k) for a new constant k
- Generalised modus ponens
- Lifted modus ponens using unification
- Skolemisation
- Removing ∃ by introducing functions or constants before CNF conversion
Example
"All men are mortal; Socrates is a man": ∀x Man(x) → Mortal(x), Man(Socrates). Universal instantiation with x/Socrates and modus ponens give Mortal(Socrates).
Key terms
- Problem formulation
- Defining states, actions, transitions, goal and costs
- Resolution
- Inference rule combining clauses with complementary literals
- Horn clause
- Clause with at most one positive literal
- Forward chaining
- Data-driven inference from facts to conclusions
- Unification
- Finding substitutions that make expressions identical
Quick revision
- Definitions of AI; Turing test; history milestones.
- Problem formulation; Tic-Tac-Toe, Water Jug, 8-puzzle, 8-Queens; real-world problems.
- Propositional logic, inference rules, entailment.
- Resolution refutation; Horn clauses; forward and backward chaining.
- FOL quantifiers, instantiation, unification, Skolemisation, resolution.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.What is the Turing test?
- Q2.State the components of problem formulation.
- Q3.Give a solution to the 4–3 water jug problem.
- Q4.What is a Horn clause?
- Q5.Distinguish forward and backward chaining.
- Q6.What is Skolemisation?
Long-answer questions
- Q1.Explain the foundations and history of AI.
- Q2.Formulate the 8-puzzle and 8-Queens problems as search problems.
- Q3.Explain resolution in propositional logic with an example.
- Q4.Explain inference in first-order logic with forward and backward chaining.
Stuck on this unit?
Message SBS on WhatsApp for help with Artificial Intelligence & Soft Computing, or to ask about studying M.Sc IT at Synetic.
