AI-ExpertSystem-Advanced

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

examples/backward.pl
examples/example.pl
examples/forward.pl
examples/knowledge_db_one.yaml
examples/mixed.pl
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/Fetch.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
lib/AI/ExpertSystem/Advanced.pm
lib/AI/ExpertSystem/Advanced/Dictionary.pm
lib/AI/ExpertSystem/Advanced/KnowledgeDB/Base.pm
lib/AI/ExpertSystem/Advanced/KnowledgeDB/Factory.pm
lib/AI/ExpertSystem/Advanced/KnowledgeDB/YAML.pm
lib/AI/ExpertSystem/Advanced/Viewer/Base.pm
lib/AI/ExpertSystem/Advanced/Viewer/Factory.pm
lib/AI/ExpertSystem/Advanced/Viewer/Terminal.pm

Makefile.PL  view on Meta::CPAN

use inc::Module::Install;

# Define metadata
name        'AI-ExpertSystem-Advanced';
all_from    'lib/AI/ExpertSystem/Advanced.pm';

# Specific dependencies
requires    'Moose'             => '0.87';
requires    'YAML::Syck'        => '1.07';
requires    'List::MoreUtils'   => '0.22';
requires    'Class::Factory'    => '1.05';

no_index directory => 'examples';

README  view on Meta::CPAN

    mixed algorithms

DESCRIPTION
    Inspired in AI::ExpertSystem::Simple but with additional features:

    *   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;

lib/AI/ExpertSystem/Advanced.pm  view on Meta::CPAN


Uses backward, forward and mixed algorithms.

=item *

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:

lib/AI/ExpertSystem/Advanced/KnowledgeDB/Base.pm  view on Meta::CPAN

# Author(s): Pablo Fischer (pfischer@cpan.org)
# Created: 11/29/2009 19:14:28 PST 19:14:28
package AI::ExpertSystem::Advanced::KnowledgeDB::Base;

=head1 NAME

AI::ExpertSystem::Advanced::KnowledgeDB::Base - Base class for knowledge DBs.

=head1 DESCRIPTION

All knowledge databases that L<AI::ExpertSystem::Advanced> uses should extend
from this class.

This base class implements the basic methods required for extracting the rules,
causes, goals and questions from the a plain text knowledge database, eg, all
the records remain in the application memory instead of a database engine such
as MySQL or SQLite.

=cut
use Moose;
use AI::ExpertSystem::Advanced::Dictionary;

our $VERSION = '0.03';

=head1 Attributes

=over 4

=item B<rules>

This hash has the rules contained in the knowledge database. It's populated
when an instance of L<AI::ExpertSystem::Advanced::KnowledgeDB::Base> is
created.

B<TIP>: There's no sense in filling this hash if you are going to be using a
database engine such as MySQL, SQLite or others. The hash is useful if your
knowledge database will remain in application memory.

=cut
has 'rules' => (
        is => 'ro',
        isa => 'HashRef');

=item B<questions>

Similar and same concept of C<rules>, but this will have a list (if available)
of what questions should be done to certain facts.

lib/AI/ExpertSystem/Advanced/KnowledgeDB/Factory.pm  view on Meta::CPAN

# Author(s): Pablo Fischer (pfischer@cpan.org)
# Created: 11/29/2009 19:12:25 PST 19:12:25
package AI::ExpertSystem::Advanced::KnowledgeDB::Factory;

=head1 NAME

AI::ExpertSystem::Advanced::KnowledgeDB::Factory - Knowledge DB driver factory

=head1 DESCRIPTION

Uses the factory pattern to create instances of knowledge database drivers.

=head1 SYNOPSIS

    use AI::ExpertSystem::Advanced::KnowledgeDB::Factory;

    my $yaml_kdb = AI::ExpertSystem::Advanced::KnowledgeDB::Factory->new('yaml',
        {
            filename => 'examples/knowledge_db_one.yaml'
        });

lib/AI/ExpertSystem/Advanced/KnowledgeDB/YAML.pm  view on Meta::CPAN

# Author(s): Pablo Fischer (pfischer@cpan.org)
# Created: 12/13/2009 16:12:43 PST 16:12:43
package AI::ExpertSystem::Advanced::KnowledgeDB::YAML;

=head1 NAME

AI::ExpertSystem::Advanced::KnowledgeDB::YAML - YAML Knowledge DB driver

=head1 DESCRIPTION

A YAML knowledge database driver.

It reads a given YAML file and looks for the I<rules> hash key. All of the
elements of C<rules> (causes and goals) are copied to the C<rules> hash
key of L<AI::ExpertSystem::Advanced::KnowledgeDB::Base>.

If no rules are found then it ends unsuccessfully.

It also looks for any available questions under the I<questions> hash key,
however if no questions are found then they are not copied :-)

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.313 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )