Eventable
, InputFileConsumer
, Multistepable
, NarseseConsumer
, Pluggable
, Resettable
, SensoryChannelConsumer
, TaskConsumer<Reasoner>
, Timable
Nar
public interface Reasoner extends SensoryChannelConsumer, Resettable, NarseseConsumer, InputFileConsumer, TaskConsumer<Reasoner>, Eventable, Pluggable, Multistepable, Timable
Modifier and Type | Method | Description |
---|---|---|
Reasoner |
ask(String termString,
AnswerHandler answered) |
ask reasoner a eternal question
|
Reasoner |
askNow(String termString,
AnswerHandler answered) |
ask reasoner a now question
|
Concept |
concept(String concept) |
returns the concept by name/term or creates it if it doesn't exist
|
long |
getMinCyclePeriodMS() |
returns the minimum delay of a cycle in milliseconds
|
boolean |
isRunning() |
is the reasoner running?
|
void |
run() |
Main loop executed by the Thread.
|
void |
setThreadYield(boolean b) |
When b is true, Nar will call Thread.yield each run() iteration that minCyclePeriodMS==0 (no delay).
|
long |
time() |
return the current time from the clock
|
addInputFile
cycle, cycles, start, start, stop
addInput
addPlugin, getPlugins, removePlugin
reset
addSensoryChannel
addInput
Reasoner ask(String termString, AnswerHandler answered) throws Parser.InvalidInputException
termString
- narsese string with term of questionanswered
- handler which will be called when answeredParser.InvalidInputException
Reasoner askNow(String termString, AnswerHandler answered) throws Parser.InvalidInputException
termString
- narsese string with term of questionanswered
- handler which will be called when answeredParser.InvalidInputException
Concept concept(String concept) throws Parser.InvalidInputException
concept
- the name/term of the conceptParser.InvalidInputException
void run()
long time()
boolean isRunning()
long getMinCyclePeriodMS()
void setThreadYield(boolean b)
b
- Nar will call Thread.yield each run()Copyright © 2020 OpenNARS. All rights reserved.