Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Prolog Visualizer Tutorial

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Prolog Visualizer Tutorial

Avatar for Zhixuan Lai

Zhixuan Lai

May 02, 2015
Tweet

More Decks by Zhixuan Lai

Other Decks in Programming

Transcript

  1. Step 0 of 144 Unification failed because the names of

    the clauses are different Step 3 of 144
  2. Step 0 of 144 substitution before after Applying the substitution,

    you get a new rule This rule unifies with the goal Step 18 of 144
  3. Step 0 of 144 Current goal is duplicated here for

    better readability Step 18 of 144
  4. Step 0 of 144 grandfather(X, Y) is replaced by father(X,

    Z) and father(Z, Y). these are the new goals Current state has changed Step 20 of 144
  5. Step 0 of 144 The grey path shows where you

    came from current goal is in bold Step 20 of 144
  6. This is a partial solution If X is orville, any

    Y such that father(abe, Y) will be a solution father(Z, Y) is the is new goal. After the substitution (X = oriville, Z = abe), it becomes father(abe, Y) Step 23 of 144