AI-ExpertSystem-Advanced
view release on metacpan or search on metacpan
This array will be converted to initial_facts_dict. And all the data
(ids or or names) will be made of only IDs.
my $ai = AI::ExpertSystem::Advanced->new(
viewer_class => 'terminal',
knowledge_db => $yaml_kdb,
initial_facts => ['I', ['F', '-'], ['G', '+']);
As you can see if you want to provide the sign of a fact, just
*encapsulate* it in an array, the first item should be the fact and
the second one the sign.
initial_facts_dict
This dictionary (see AI::ExpertSystem::Advanced::Dictionary has the
sasme data of initial_facts but with the additional feature(s) of
proviing iterators and a quick way to find elements.
goals_to_check
my $ai = AI::ExpertSystem::Advanced->new(
viewer_class => 'terminal',
knowledge_db => $yaml_kdb,
inc/Module/Install/Metadata.pm view on Meta::CPAN
$self->provides( %{ $build->find_dist_packages || {} } );
}
sub feature {
my $self = shift;
my $name = shift;
my $features = ( $self->{values}->{features} ||= [] );
my $mods;
if ( @_ == 1 and ref( $_[0] ) ) {
# The user used ->feature like ->features by passing in the second
# argument as a reference. Accomodate for that.
$mods = $_[0];
} else {
$mods = \@_;
}
my $count = 0;
push @$features, (
$name => [
map {
lib/AI/ExpertSystem/Advanced.pm view on Meta::CPAN
This array will be converted to L<initial_facts_dict>. And all the data (ids or
or names) will be made of only IDs.
my $ai = AI::ExpertSystem::Advanced->new(
viewer_class => 'terminal',
knowledge_db => $yaml_kdb,
initial_facts => ['I', ['F', '-'], ['G', '+']);
As you can see if you want to provide the sign of a fact, just I<encapsulate>
it in an array, the first item should be the fact and the second one the
sign.
=cut
has 'initial_facts' => (
is => 'rw',
isa => 'ArrayRef[Str]',
default => sub { return []; });
=item B<initial_facts_dict>
( run in 1.055 second using v1.01-cache-2.11-cpan-39bf76dae61 )