EpisodicMemory class
Stores and retrieves episodic memories — specific experiences and events.
Storage model
- Each Memory is stored with a strength that decays over time following Ebbinghaus' forgetting curve.
- Repeated recall reinforces the memory (Hebbian consolidation).
- Memories below pruneThreshold are purged during consolidation.
Constructors
- EpisodicMemory({int capacity = 500, double pruneThreshold = 0.05, ConsciousnessLogger? logger})
Properties
- capacity → int
-
final
- count → int
-
Number of stored episodic memories.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- pruneThreshold → double
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyDecay(
{double halfLifeHours = 24.0}) → void - Applies Ebbinghaus temporal decay to all stored memories.
-
forget(
String memoryId) → void - Removes a specific memory by ID.
-
getAll(
) → List< Memory> - All stored memories as an unmodifiable list.
-
getByModality(
String modalityName) → List< Memory> -
Returns all memories associated with a particular
modality. -
getMostRecent(
int n) → List< Memory> -
Retrieves the
nmost recent episodic memories. -
getStrongestMemories(
int n) → List< Memory> -
Returns the
nstrongest memories (for consolidation into semantic). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retrieveByConceptIds(
List< String> conceptIds, {int maxResults = 10}) → List<Memory> -
Retrieves memories associated with any of the given
conceptIds. -
search(
String query, {int maxResults = 10}) → List< Memory> -
Searches episodic memories whose content contains
querytokens. -
store(
Perception event, {Duration retention = const Duration(days: 7), double initialStrength = 1.0, Map< String, dynamic> ? context}) → Memory - Stores a Perception as a new episodic memory.
-
storeMemory(
Memory memory) → void - Stores an arbitrary Memory directly.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited