-
Notifications
You must be signed in to change notification settings - Fork 10
Memory: Voting Schema
Matching new SDR-events to concepts is more difficult than in a Compound Term approach like OpenNARS where the concept can be uniquely determined by the events's term.
Events can match to multiple concepts in ANSNA. It would be expensive to evaluate the SDRInheritance: https://github.com/patham9/ANSNA/wiki/SDRInheritance-for-matching,-and-its-truth-value for every concept in the system's memory. So somehow we want to try only these that are guaranteed to be a good match.
The voting schema allows for this, comparing only these SDR's that have overlapping 1-bits, and keeping track of the best result: (rough sketch, the Wiki page will be improved)
Given concepts with the corresponding SDR a=00010 concept b=01010 and concept c=00101, from the creation of these concepts in memory, the voting table got updated to:
- bit[1]={}
- bit[2]={b}
- bit[3]={c}
- bit[4]={a,b}
- bit[5]={c} based on the procedure, that for every i, every concept with a SDR with the i-th bit being 1 will be added into the set bit[i].
Now when a new event, say with SDR 01110 comes into the system (derived or input) we iterate through all the bits, and keep track of the counts of the concepts that have a 1-bit there, in this case giving the following result:
- {(b,2),(c,1),(a,1)}
where b is the best match: its 1-bits were matched by 2 of the 1-bits by of the event, bit[2], bit[4].