API Reference retex v0.1.12
modules
Modules
The algorithm utilizes symbols to create an internal representation of the world.
Each element in the real world is converted into a triple known as a "Working Memory Element" (Retex.Wme.t()
),
represented as {Entity, attribute, attribute_value}.
Checks which production nodes have been almost activated from the ones with the most activated paths pointing to them, sorted by weak activations.
Apply a filter to a variable on the PNode, so that the activation of a PNode happens when this condition is also satisfied
Attribute values that a Wme should have in order for this condition to be true
A type of thing that needs to not exists in order for a Wme to activate part of a condition
A type of thing that needs to exists in order for a Wme to activate part of a condition
Attribute values that a Wme should NOT have in order for this condition to be true
Attribute values that a Wme should have in order for this condition to be true
A BetaMemory works like a two input node in Rete. It is simply a join node between two tests that have passed successfully. The activation of a BetaMemory happens if the two parents (left and right) have been activated and the bindings are matching for both of them.
The NegativeNodeType if part of the alpha network, the discrimination part of the network that check if a specific class DOES NOT exist. If this is the case, it propagates the activations down to the select node types. They will select an attribute and check for its test to pass.
Production node. This is like a production node in Rete algorithm. It is activated if all the conditions in a rule are matching and contains the action that can be executed as consequence.
The select nodes are checking for attributes, if they exists and are linked to the right owner from above, they will be activated and pass the tokens down in the test nodes (that will check for their value instead).
The select nodes are checking for attributes, if they do NOT exists and are linked to the right owner from above, they will be activated and pass the tokens down
Test node.
The NodeType if part of the alpha network, the discrimination part of the network that check if a specific class exists. If this is the case, it propagates the activations down to the select node types. They will select an attribute and check for its existance.
The root node is the root vertex of the network. From the root node start all the edges that connect with each TypeNode, the discrimination network starts from here.
This serializer converts a Graph
to a Mermaid Flowchart.
The root node of the network is the input to the black box. This node receives the tokens that are sent to the black box and passes copies of the tokens to all its successors. The successors of the top node, the nodes to perform the intra-element tests, have one input and one or more outputs. Each node tests one feature and sends the tokens that pass the test to its successors. The two-input nodes compare tokens from different paths and join them into bigger tokens if they satisfy the inter-element constraints of the LHS. Because of the tests performed by the other nodes, a terminal node will receive only tokens that instantiate the LHS. The terminal node sends out of the black box the information that the conflict set must be changed. - RETE Match Algorithm - Forgy OCR
Why a rule was activated?
A working memory element, it represent the world in the form of identifier, attribute and values timestamp is set at time of insertion into retex