Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: FuzzyPyKnow #6

Open
Bazmundi opened this issue Jan 26, 2018 · 2 comments
Open

Enhancement: FuzzyPyKnow #6

Bazmundi opened this issue Jan 26, 2018 · 2 comments

Comments

@Bazmundi
Copy link

Inline with fuzzyClips, fuzzy extensions to facts please.

@nilp0inter
Copy link
Contributor

This is a desirable feature for a future release and is definitely in the long-term roadmap.

Because we are no experts in fuzzyClips we are open to know if you have any ideas on how to implement this. If you want to contribute with a pull request, please feel free to do so.

@nilp0inter nilp0inter added this to the v2.0.0 milestone May 7, 2018
@Angular-Angel
Copy link

Angular-Angel commented May 23, 2019

You can technically do it now, it's just a bit of a pain. Oh, and OR rules will ditch after the first success, even if there are other matches with relevant variables. See:

 @Rule(FuzzyFact(name="C", probability=MATCH.c), FuzzyFact(name="E", probability=MATCH.e))
    def fuzzy_rule_c_and_e_equals_f(self, c, e):
        self.declare(FuzzyFact(name="F", probability= c * e));
        
    def fuzzy_or(self, a, b):
        return a + b - a * b;
    
    @Rule(OR(FuzzyFact(name="E", probability=MATCH.e), FuzzyFact(name="F", probability=MATCH.f), FuzzyFact(name="G", probability=MATCH.g)))
    def fuzzy_rule_e_f_or_g_equals_f(self, e = 0, f = 0, g = 0):
        
        self.declare(FuzzyFact(name="H", probability= self.fuzzy_or(self.fuzzy_or(e, f), g)));
      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants