Learning path
Knowledge representation and reasoning (KRR)
Represent what a system knows in logic and networks, and derive new facts with entailment, chaining, resolution, unification, and probability.
About this subject
Knowledge representation and reasoning is about writing down what an agent knows in a form a program can use, then drawing conclusions from it. Different representations suit different needs: logic for precise rules, networks of concepts for categories and defaults, and probability for uncertain evidence.
This path covers propositional entailment by model checking, forward chaining on definite clauses, resolution refutation, semantic networks with default reasoning, first-order unification, and Bayes' rule with a small Bayesian network. Each lesson uses a small, complete program that runs on its own. Python has the full sequence. The other languages listed below add lessons that use that language's own idioms and standard library, such as Java threads, C++ smart pointers, C# LINQ, or Node.js streams, and appear only for the topics the language supports. The programs are simplified models chosen to make an idea visible, so they are a foundation for further study rather than a replacement for a full course or for production-grade software.
Before you start: Boolean logic, sets, and recursion.
- 1
Python
Readable code for automation, data, and first programs.
Propositional logic and entailment by model checking
Decide whether a knowledge base entails a conclusion by checking every truth assignment.
Forward chaining with definite clauses
Derive new facts from if-then rules until the query is proved or nothing new follows.
Resolution and proof by refutation
Prove a conclusion by adding its negation to the clauses and deriving the empty clause.
Semantic networks, inheritance, and default reasoning
Represent categories and properties as a network, and let specific knowledge override general defaults.
First-order unification
Find the substitution that makes two logical terms identical, including the occurs check.
Reasoning under uncertainty: Bayes' rule
Update beliefs with Bayes' rule and compute a posterior from a small Bayesian network by enumeration.
- 2
C
Learn memory, pointers, and efficient systems programming.
- 3
- 4
Java
Understand object oriented programs and the JVM.
- 5
- 6
JavaScript
Add behavior to the web and build applications.
- 7
TypeScript
JavaScript with static types for dependable code.