Skip to content

Tutorials

Eight short lessons build the library up from nothing. They assume you know Python and nothing at all about MeTTa. Each lesson introduces one idea with runnable code and a rendered picture of what the code made, and ends where the next lesson begins.

  1. Atoms and expressions starts with one atom and builds symbols, variables, and expressions in Python.
  2. Spaces and matching stores facts in a space and asks patterns against them.
  3. Equations and evaluation gives matching expressions rewrites and runs them to answers.
  4. The Python bridge chooses between run, eval, and query from the value you already have.
  5. Writing MeTTa in Python compiles decorated Python functions into equations.
  6. Types and casting declares optional types and checks values against them with cast.
  7. Seeing your program reads traces, lint results, and derivations.
  8. The graph view draws terms as connected nodes and animates a reduction.

Released under the MIT License.