Giter Site home page Giter Site logo

Comments (2)

mtf90 avatar mtf90 commented on June 16, 2024

You are correct, currently the parameter is independent of the hypothesis size and used to insert all tuples of length l \in {0, ..., maxDepth} between elements of the P and W sets. I'll have to look at the paper to see what the authors intentions for this case are (I haven't originally implemented it in AutomataLib and only know the Wp-method with maxDepth = 0).

What I see as a potential problem with shrinking the value is, that a bad estimate will degrade performance in later equivalence checks, because once n > m you basically have no more look-ahead. With a fixed exploration depth (as it is now), you continue to look ahead even in later iterations of refinement cycles. On the contrary, a too low value for the current value of maxDepth probably gives you the same problems in the earlier equivalence checks. Maybe, we can use two parameters (one for m and one for the minimal exploration depth depth), and always choose max(depth, m - n), so users have more fine-grained control over the behaviour. What do you think?

For now, to simulate shrinking exploration depth, you can just instantiate a new equivalence for every refinement loop, like (untested):

DFALearner<I> learner = ...;
learner.startLearning();

int m = ...;
boolean finished = false;

while (!finished) {    
    DFA<?, I> hyp = learner.getHypothesisModel();

    DFAEquivalenceOracle<I> eqOracle = new DFAWpMethodEQOracle<>(mqOracle, m - hyp.size());
    DefaultQuery<I, Boolean> ce;
    
    if ((ce = eqOracle.findCounterExample(hyp, inputs)) != null) {
        learner.refineHypothesis(ce);
    } else {
    	finished = true;
    }
}

from automatalib.

cgvwzq avatar cgvwzq commented on June 16, 2024

Thanks for the quick answer.

My main point is that if I know the upper bound size for the automaton I want to learn (m in the paper), having a fixed value will require a bunch of unnecessary queries when n (size of current hypothesis) gets bigger. But I agree that a bad estimate (or no information) can also be a problem.

Your solution makes sense to me: m would be the upper bound (which can be optional), and depth the minimal exploration depth (in the worst case, i.e. if no counterexamples are found before).

from automatalib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.