#include <ForwardChainer.h>

Public Member Functions | |
| ForwardChainer () | |
| ~ForwardChainer () | |
| int | fillStack (int number=FWD_CHAIN_MAX_FILL, bool random=false) |
| pHandleSeq | fwdChainSeed (pHandle h, int maxRuleApps=1) |
| Handle | fwdChainToTarget (Handle target=Handle::UNDEFINED, int maxRuleApps=FWD_CHAIN_MAX_APPS) |
| pHandleSeq | fwdChainStack (int maxRuleApps=FWD_CHAIN_MAX_APPS) |
| pHandle | getRandomArgument (const std::vector< Vertex > &args) |
| Get a random handle from the seed stack or global atomspace. | |
| RandGen * | getRNG () |
| pHandleSeq | getLocalLink (pHandle lh, const std::vector< Vertex > &args) |
| void | printVertexVectorHandles (std::vector< Vertex > hs) |
Public Attributes | |
| ForwardChainerRuleProvider | rp |
| std::deque< pHandle > | seedStack |
| float | minConfidence |
| minimum confidence to accept a result or for using an atom | |
| float | probStack |
| float | probGlobal |
Static Public Attributes | |
| static RandGen * | rng = NULL |
Definition at line 40 of file ForwardChainer.h.
| opencog::pln::ForwardChainer::ForwardChainer | ( | ) |
Definition at line 38 of file ForwardChainer.cc.
References opencog::pln::FWD_CHAIN_MIN_CONFIDENCE, opencog::pln::FWD_CHAIN_PROB_GLOBAL, opencog::pln::FWD_CHAIN_PROB_STACK, minConfidence, probGlobal, and probStack.
| opencog::pln::ForwardChainer::~ForwardChainer | ( | ) |
Definition at line 45 of file ForwardChainer.cc.
| int opencog::pln::ForwardChainer::fillStack | ( | int | number = FWD_CHAIN_MAX_FILL, |
|
| bool | random = false | |||
| ) |
In future perhaps support a higher chance for handles that have context specific information? Fill the seedStack with most important (high STI) atoms
| max | number of handles to put in stack | |
| randomly | add atoms instead of using importance |
Definition at line 49 of file ForwardChainer.cc.
| pHandleSeq opencog::pln::ForwardChainer::fwdChainSeed | ( | pHandle | h, | |
| int | maxRuleApps = 1 | |||
| ) |
Chain from a single seed Handle
| maximum | number of rule applications before ending |
Definition at line 155 of file ForwardChainer.cc.
References opencog::pln::_v2h(), opencog::pln::Rule::compute(), GET_ASW, opencog::pln::Rule::getInputFilter(), getLocalLink(), getRNG(), opencog::pln::ForwardChainerRuleProvider::getSeedIndex(), minConfidence, opencog::pln::Rule::name, opencog::pln::ForwardChainerRuleProvider::nextRule(), NMPrinter::print(), printVertexVectorHandles(), opencog::RandGen::randfloat(), rp, opencog::pln::ForwardChainerRuleProvider::setSeed(), and opencog::pln::Rule::validate().

| Handle opencog::pln::ForwardChainer::fwdChainToTarget | ( | Handle | target = Handle::UNDEFINED, |
|
| int | maxRuleApps = FWD_CHAIN_MAX_APPS | |||
| ) |
Chain to specific target
| target | Handle | |
| maximum | number of rule applications before ending | |
| whether | target was reached |
Definition at line 68 of file ForwardChainer.cc.
References opencog::Handle::UNDEFINED.
| pHandleSeq opencog::pln::ForwardChainer::fwdChainStack | ( | int | maxRuleApps = FWD_CHAIN_MAX_APPS |
) |
Chain till (current) entire stack has been processed
| maximum | number of rule applications before ending |
Definition at line 248 of file ForwardChainer.cc.
References fwdChainSeed(), NMPrinter::print(), and seedStack.

Get a random handle from the seed stack or global atomspace.
Definition at line 84 of file ForwardChainer.cc.
References opencog::pln::counter, opencog::Logger::error(), GET_ASW, getRNG(), opencog::logger(), PHANDLE_UNDEFINED, probStack, opencog::RandGen::randfloat(), seedStack, and v.
| RandGen * opencog::pln::ForwardChainer::getRNG | ( | ) |
Definition at line 78 of file ForwardChainer.cc.
References rng.

| pHandleSeq opencog::pln::ForwardChainer::getLocalLink | ( | pHandle | lh, | |
| const std::vector< Vertex > & | args | |||
| ) |
Definition at line 112 of file ForwardChainer.cc.
References opencog::pln::_v2h(), GET_ASW, opencog::pln::AtomSpaceWrapper::getIncoming(), opencog::pln::AtomSpaceWrapper::getOutgoing(), and opencog::pln::AtomSpaceWrapper::isSubType().

| void opencog::pln::ForwardChainer::printVertexVectorHandles | ( | std::vector< Vertex > | hs | ) |
Definition at line 140 of file ForwardChainer.cc.
References v.

Definition at line 48 of file ForwardChainer.h.
| std::deque<pHandle> opencog::pln::ForwardChainer::seedStack |
Rules that have yet to be attempted for forward chaining on seed handle. Consists of all rules at the beginning.
Definition at line 52 of file ForwardChainer.h.
minimum confidence to accept a result or for using an atom
Definition at line 55 of file ForwardChainer.h.
Definition at line 56 of file ForwardChainer.h.
Definition at line 57 of file ForwardChainer.h.
RandGen * opencog::pln::ForwardChainer::rng = NULL [static] |
Definition at line 86 of file ForwardChainer.h.
1.5.6