Overview Index

Merge Short Memory and Main Memory

After an activated concept has been processed --- values of activated concept (in short memory) and values of original concept (in the main memory) are different.


Let concept “Love” in the main memory has desirability attribute value = 200.

Let concept “Love” has been activated. At this point desirability attribute value of concept in the main memory = 200. Desirability attribute value of concept in the short memory = 200.

The purpose of activation of a concept is “to process the concept”. So let’s imagine that concept “Love” has been processed. As a result, desirability attribute value of concept “Love” in the short memory became 250.


PCnous cannot keep all concepts in the short memory. So, sometimes PCnous needs to save activated concepts into the main memory.

I named this process: “Merge Short Memory and Main Memory”.


The merging process is not obvious. PCnous cannot just save current values of activated concept into the main memory. It would be incorrect because:

1)      Active concept can easily change its values. Main-memory-concept shouldn’t be easily modified.
Example: Active concept “Love” can be very important in the current context of phrase “I love you”. But concept “Love” in main memory inherited values from many other phrases. Therefore the main-memory-concept shouldn’t be easily affected by changes which were made on the short-memory-concept.


In other hand, PCnous cannot just take weighted average values between activated concept and main-memory-concept. It would be incorrect because:

2)      Activated concept could be merged with main memory several times. Really, after the merge activated concept can still stay in the short memory for some time. It is important not to merge several times into the main memory the same updates of the activated concept.
Example: Word “Love” can be merged into the main memory. Let the main-memory-value was 200. Let short-memory-value (active concept) was 250. We could apply formula: NewMainMemoryValue = (200 * 10 + 250 * 1)/(10 + 1) = 205
(“10” and “1” are weights of Main-Memory-Concept value and Short-Memory-Concept value correspondingly).
This formula is almost correct, but if the merge of word “Love” will be accomplished 50 times then is will consequently save into the Main Memory values: 205, 209, 213, 217, 220, …, ~ 249. “249” is obviously wrong result of the Merge.


Below you can find explanations how to implement the merge correctly.


How to merge Short Memory and Main Memory?
1) What to merge:
- Neuron;
- Reason-Consequence axon.
- Parent-Child axon.
2) Let's consider how to merge on example of Neuron.
3) Neuron has:
- Desirability attribute.
- Strength attribute.
4) Lets make simplification and assume that we merge Desirability attribute without taking into account Strength attribute.
5) Legend:
- "sm": short memory.
- "mm": main memory (long-term memory).
- "Desirability_sm": value of Desirability attribute of short memory neuron.
- "Desirability_mm": value of Desirability attribute of main memory neuron.
- "Desirability_mm_afterMerge": Value of the main memory Desirability attribute after merge with "Desirability_sm".
6) Simple solution:
Desirability_mm_afterMerge = (10 * Desirability_mm_beforeMerge + 1 * Desirability_sm_beforeMerge)/ (10+1).
That means that Desirability_mm has 10 times heavier weight than Desirability_sm.
7) More complex solution (takes into account Strength attribute).
Desirability_mm_afterMerge = (Strength_mm_beforeMerge * Desirability_mm_beforeMerge + Strength_sm_before_Merge * Desirability_sm_beforeMerge) / (Strength_mm_beforeMerge + Strength_sm_beforeMerge)
Strength_mm_afterMerge = Strength_mm_beforeMerge + Strength_sm_Delta
Strength_sm_Delta = Strength_sm_beforeMerge - Strength_sm_sinceLastMerge
"Strength_sm_sinceLastMerge" is either Strength_sm which was set at last merge or Strength_sm which was set during creation of sm neuron in active memory.
8) Actually more complex solution should take into account possibility of multiple merge of mm and sm.
In this case we should not update mm by changes in sm which were merged already.
That is:
Desirability_mm_afterMerge = (Strength_mm_beforeMerge * Desirability_mm_beforeMerge + Strength_sm_before_Merge * Desirability_sm_Delta) / (Strength_mm_beforeMerge + Strength_sm_beforeMerge)

Desirability_sm_Delta = Desirability_sm_beforeMerge - Desirability_sm_sinceLastMerge

Strength will be calculated the same way:
Strength_mm_afterMerge = Strength_mm_beforeMerge + Strength_sm_Delta

9) If we allow multiple merge, then we should know sm_afterMerge value:

Desirability_sm_afterMerge = Desirability_sm_beforeMerge

Desirability_sm_sinceLastMerge(afterMerge) = Desirability_sm_afterMerge (that is we preserve this Desirability value for future calculations of Desirability_sm_Delta)

Strength_sm_afterMerge = Strength_sm_beforeMerge

Strength_sm_sinceLastMerge(afterMerge) = Strength_sm_afterMerge (for the sake of future Strength_sm_Delta calculation)


See also:

Original article in AI Blog