Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: RFC: A Beginners Guide to Fuzzy Rules-Based Systems

by lin0 (Curate)
on Oct 12, 2006 at 16:55 UTC ( #577906=note: print w/ replies, xml ) Need Help??


in reply to Re^3: RFC: A Beginners Guide to Fuzzy Rules-Based Systems
in thread RFC: A Beginners Guide to Fuzzy Rules-Based Systems

Hi talexb,

Now, I got it!

It will be hard to change that particular chunk of code for an array because of the way those statements are treated in the AI::FuzzyInference module (please, see the code below). However, I will think about your idea and see if I can suggest some improvements to the module

thank you

lin0


# sub addRule() - public method. # # Adds fuzzy if-then inference rules. # # $obj->addRule('x=medium' => 'z = slow', # 'x=low & y=small' => 'z = fast', # 'x=high & y=tiny' => 'z=veryfast'); # spaces are optional. The characters [&=|] are special. sub addRule { my ($self, %rules) = @_; for my $k (keys %rules) { my $v = $rules{$k}; s/\s+//g for $v, $k; push @{$self->{RULES}} => [$k, $v]; } return 1; }


Comment on Re^4: RFC: A Beginners Guide to Fuzzy Rules-Based Systems
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://577906]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-07-03 17:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls