AI-ExpertSystem-Advanced
view release on metacpan or search on metacpan
* Uses backward, forward and mixed algorithms.
* Offers different views, so user can interact with the expert system
via a terminal or with a friendly user interface.
* The knowledge database can be stored in any format such as YAML, XML
or databases. You just need to choose what driver to use and you are
done.
* Uses certainty factors.
SYNOPSIS
An example of the mixed algorithm:
use AI::ExpertSystem::Advanced;
use AI::ExpertSystem::Advanced::KnowledgeDB::Factory;
my $yaml_kdb = AI::ExpertSystem::Advanced::KnowledgeDB::Factory->new('yaml',
{
filename => 'examples/knowledge_db_one.yaml'
need of at least one initial fact). If the algorithm fails then the
mixed algorithm also ends unsuccessfully.
Once the first *run* of forward() algorithm happens it starts looking
for any positive inference fact, if only one is found then this ends the
algorithm with the assumption it knows what's happening.
In case no positive inference fact is found then it will start reading
the rules and creating a list of intuitive facts.
For each rule it will get a *certainty factor* of its causes versus the
initial, inference and asked facts. In case the certainity factor is
greater or equal than found_factor then all of its goals will be copied
to the intuitive facts (eg, read it as: it assumes the goals have
something to do with our first initial facts).
Once all the rules are read then it verifies if there are intuitive
facts, if no facts are found then it ends with the intuition, otherwise
it will run the backward() algorithm for each one of these facts (eg,
each fact will be converted to a goal). After each *run* of the
backward() algorithm it will verify for any positive inference fact, if
lib/AI/ExpertSystem/Advanced.pm view on Meta::CPAN
Offers different views, so user can interact with the expert system via a
terminal or with a friendly user interface.
=item *
The knowledge database can be stored in any format such as YAML, XML or
databases. You just need to choose what driver to use and you are done.
=item *
Uses certainty factors.
=back
=head1 SYNOPSIS
An example of the mixed algorithm:
use AI::ExpertSystem::Advanced;
use AI::ExpertSystem::Advanced::KnowledgeDB::Factory;
lib/AI/ExpertSystem/Advanced.pm view on Meta::CPAN
at least one initial fact). If the algorithm fails then the mixed algorithm
also ends unsuccessfully.
Once the first I<run> of L<forward()> algorithm happens it starts looking for
any positive inference fact, if only one is found then this ends the algorithm
with the assumption it knows what's happening.
In case no positive inference fact is found then it will start reading the
rules and creating a list of intuitive facts.
For each rule it will get a I<certainty factor> of its causes versus the
initial, inference and asked facts. In case the certainity factor is greater or
equal than L<found_factor> then all of its goals will be copied to the
intuitive facts (eg, read it as: it assumes the goals have something to do with
our first initial facts).
Once all the rules are read then it verifies if there are intuitive facts, if
no facts are found then it ends with the intuition, otherwise it will run the
L<backward()> algorithm for each one of these facts (eg, each fact will be
converted to a goal). After each I<run> of the L<backward()> algorithm it will
verify for any positive inference fact, if just one is found then the algorithm
( run in 0.286 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )