Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 4 Lab: Propositional Logic

Lab Overview

Implement logical reasoning systems:

  1. Truth tables and logical equivalence

  2. CNF conversion and resolution

  3. SAT solving with DPLL algorithm

  4. Forward and backward chaining

  5. Wumpus World agent

Exercise 1: Truth Table Generator

Implement truth table generation for propositional formulas.

Exercise 2: CNF Conversion

Convert propositional formulas to Conjunctive Normal Form.

Exercise 3: Resolution Theorem Prover

Implement resolution-based inference.

Exercise 4: Forward and Backward Chaining

Implement inference for Horn clauses.

Exercise 5: Wumpus World Agent

Implement logical agent for Wumpus World.

Challenge: DPLL SAT Solver

Implement the complete DPLL algorithm.

Lab Report

Deliverables

  • Truth table generator

  • CNF converter

  • Resolution prover

  • Forward/backward chaining

  • Wumpus World agent

Discussion

  1. When is resolution complete for propositional logic?

  2. Compare forward vs backward chaining efficiency

  3. How does DPLL improve over truth table enumeration?

  4. What are limitations of propositional logic?