AI-ExpertSystem-Advanced
    
    
  
  
  
view release on metacpan or search on metacpan
Constants
    * FACT_SIGN_NEGATIVE
        Used when a fact is negative, aka, a fact doesn't happen.
    * FACT_SIGN_POSITIVE
        Used for those facts that happen.
    * FACT_SIGN_UNSURE
        Used when there's no straight answer of a fact, eg, we don't know if
        an answer will change the result.
Methods
  shoot($rule, $algorithm)
    Shoots the given rule. It will do the following verifications:
    *   Each of the facts (causes) will be compared against the
        initial_facts_dict, inference_facts and asked_facts (in this order).
    *   If any initial, inference or asked fact matches with a cause but
        it's negative then all of its goals (usually only one by rule) will
lib/AI/ExpertSystem/Advanced.pm view on Meta::CPAN
=item * B<FACT_SIGN_POSITIVE>
Used for those facts that happen.
=cut
use constant FACT_SIGN_POSITIVE => '+';
=item * B<FACT_SIGN_UNSURE>
Used when there's no straight answer of a fact, eg, we don't know if an answer
will change the result.
=back
=cut
use constant FACT_SIGN_UNSURE   => '~';
=head1 Methods
=head2 B<shoot($rule, $algorithm)>
lib/AI/ExpertSystem/Advanced/Dictionary.pm view on Meta::CPAN
=cut
has 'iterable_array' => (
        is => 'ro',
        isa => 'ArrayRef');
=head1 Methods
=head2 B<find($look_for, $find_by)>
Looks for a given value (C<$look_for>). By default it will look for the value
by reading the C<id> of each item, however this can be changed by passing
a different hash key (C<$find_by>).
In case there's no match C<undef> is returned.
=cut
sub find {
    my ($self, $look_for, $find_by) = @_;
    if (!defined($find_by)) {
        if (defined $self->{'stack_hash'}->{$look_for}) {
( run in 1.019 second using v1.01-cache-2.11-cpan-c333fce770f )