Serializable
, Iterable<Concept>
, Resettable
public class Memory extends Object implements Serializable, Iterable<Concept>, Resettable
Modifier and Type | Field | Description |
---|---|---|
boolean |
allowExecution |
|
(package private) boolean |
checked |
|
Bag<Concept,Term> |
concepts |
|
private long |
currentStampSerial |
|
Emotions |
emotion |
|
EventEmitter |
event |
|
InternalExperience |
internalExperience |
|
(package private) boolean |
isjUnit |
|
Task |
lastDecision |
|
long |
narId |
|
Parameters |
narParameters |
|
Bag<Task<Term>,Sentence<Term>> |
novelTasks |
|
Map<CharSequence,Operator> |
operators |
|
Random |
randomNumber |
|
long |
randomSeed |
|
Bag<Task<Term>,Sentence<Term>> |
recent_operations |
|
Bag<Task<Term>,Sentence<Term>> |
seq_current |
|
private Boolean |
tasksMutex |
Constructor | Description |
---|---|
Memory(Parameters narParameters,
Bag<Concept,Term> concepts,
Bag<Task<Term>,Sentence<Term>> novelTasks,
Bag<Task<Term>,Sentence<Term>> seq_current,
Bag<Task<Term>,Sentence<Term>> recent_operations) |
Create a new memory
|
Modifier and Type | Method | Description |
---|---|---|
void |
addNewTask(Task t,
String reason) |
add new task that waits to be processed in the next cycleMemory
|
Operator |
addOperator(Operator op) |
|
Concept |
concept(Term t) |
Get an existing Concept for a given name
|
void |
conceptRemoved(Concept c) |
|
Concept |
conceptualize(BudgetValue budget,
Term term) |
Get the Concept associated to a Term, or create it.
|
void |
cycle(Nar nar) |
|
float |
cycles(double durations) |
converts durations to cycles
|
void |
emit(Class c,
Object... signal) |
|
boolean |
emitting(Class channel) |
|
void |
executedTask(Timable time,
Operation operation,
TruthValue truth) |
ExecutedTask called in Operator.call
|
Operator |
getOperator(String op) |
|
void |
inputTask(Timable time,
Task t) |
|
void |
inputTask(Timable time,
Task task,
boolean emitIn) |
Input task processing.
|
static boolean |
isJUnitTest() |
|
Iterator<Concept> |
iterator() |
|
void |
localInference(Task task,
Parameters narParameters,
Timable time) |
|
Stamp.BaseEntry |
newStampSerial() |
|
void |
output(Task t) |
|
void |
processNovelTask(Parameters narParameters,
Timable time) |
Select a novel task to process
|
Operator |
removeOperator(Operator op) |
|
void |
removeTask(Task task,
String reason) |
|
void |
reset() |
reset
|
forEach, spliterator
public final Parameters narParameters
public long narId
public Emotions emotion
public InternalExperience internalExperience
public Task lastDecision
public boolean allowExecution
public final long randomSeed
public final Random randomNumber
public transient EventEmitter event
public final Map<CharSequence,Operator> operators
private final Boolean tasksMutex
boolean checked
boolean isjUnit
private long currentStampSerial
public void reset()
Resettable
reset
in interface Resettable
public Concept concept(Term t)
called from Term and ConceptWindow.
t
- the name of a conceptpublic Concept conceptualize(BudgetValue budget, Term term)
term
- indicating the conceptpublic void addNewTask(Task t, String reason)
public static boolean isJUnitTest()
public void inputTask(Timable time, Task task, boolean emitIn)
time
- indirection to retrieve timetask
- The addInput taskpublic void inputTask(Timable time, Task t)
time
- indirection to retrieve timepublic void executedTask(Timable time, Operation operation, TruthValue truth)
operation
- The operation just executedtime
- indirection to retrieve timepublic void output(Task t)
public final boolean emitting(Class channel)
public void conceptRemoved(Concept c)
public void cycle(Nar nar)
public void localInference(Task task, Parameters narParameters, Timable time)
task
- task to be processednarParameters
- parameters for the Reasoner instancetime
- indirection to retrieve timepublic void processNovelTask(Parameters narParameters, Timable time)
narParameters
- parameters for the Reasoner instancetime
- indirection to retrieve timepublic Stamp.BaseEntry newStampSerial()
public final float cycles(double durations)
Copyright © 2020 OpenNARS. All rights reserved.