First-order logic & inference

Step 8 of 13 in Classical AI · Concept · Medium

First-order logic adds objects, relations and 'for all / there exists'. Inference uses unification to match patterns like Parent(x, Bob). This is the core of Prolog.

Build it

  1. Unify and chain

    Write unify() with occurs check, then forward chaining over FOL rules for a family tree.

    Done when: Derives Grandparent facts correctly; unify fails on X vs f(X).

Case study: IBM Watson on Jeopardy! (2011)

  • Combined many parsers, knowledge bases and statistical scorers rather than one logic engine.
  • Ranking candidate answers by confidence decided when to buzz in.
  • Its later struggles in healthcare show the gap between a benchmark and real deployment.

Read the case study

Resources

Earn this star

On the map, you log what you built. Finish the step and its star lights.

Open this step on the map