Skip to content
Anonymous edited this page May 27, 2025 · 22 revisions

Welcome to the PLN wiki!

Run example file

Running an example (the famous Tuffy Smokes) from the root folder of the repository:

./run.sh ./examples/Smokes.metta hyperon

Import to MeTTa code

First build PLN.metta by executing ./src/build.sh

then import it to your code via the import mechanisms of your MeTTa interpreter.

Usage

To interact with PLN in your MeTTa code, use the following function:

!(Question $kb $queryTerm $steps))

$kb: A tuple of sentences (Sentence_1 ... Sentence_n)

Sentence_i: (Sentence ($Term (stv $Strength $Confidence) ($EvidenceID))

$Term: The term of the item of knowledge

$queryTerm: The term the derived sentence should have

$steps: Maximum derivation search depth from premises

$EvidenceID: Running ID, so for Sentence_i assign evidence ID i. Except if one knows 2 inputs are statistically dependent, one can give them the same ID to increase the accuracy of the uncertainty reasoning.

Once this call is formulates your PLN call from your MeTTa code is complete.

Clone this wiki locally