SingularityNET’s Post

In the MeTTa AGI language, symbolic expressions only evaluate to a different form when an equality is defined. These equality expressions are similar to function definitions in other programming languages, yet with several important differences. For example, defining an equality for a specific pattern means only expressions matching that exact pattern will be evaluated. MeTTa functions don't need to handle all possible inputs, and there's no strict boundary between functions and data constructors. MeTTa functions can produce multiple (nondeterministic) results. For instance, defining both (= (bin) 0) and (= (bin) 1) creates a function that returns both 0 and 1 when called with ! (bin). It's important to note that function equations are not mutually exclusive. When nondeterministic functions are used in compositions, specific evaluation patterns emerge. The expression (triple (bin)) yields only two results—(0 0 0) and (1 1 1)—because bin is evaluated first, then each result is passed to triple. By contrast, (bin2) defined as ((bin) (bin)) produces four results: (0 0), (0 1), (1 0), and (1 1), because each instance of bin within its body is evaluated independently. Visit https://metta-lang.dev/ to learn more about MeTTa and explore our online interpreter that provides executable examples.

Mike Archbold

Artificial General Intelligence

4d

The practical benefit IMO of this is that you can write a block of code, input to your code block possibly all relevant input values, and return all possible results. Not some of the results. All the results possible for all the different values you specify for variables are returned in one call. Then you can filter through the results for what is needed in your context.

To view or add a comment, sign in

Explore topics