5 kyu

Synthesize Boolean Functions From Examples

Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • lilsweetcaligula Avatar

    Thank you. I have enjoyed solving this kata.

  • Madjosz Avatar

    That was a really fun kata. Thanks for letting me dig out my university knowlegde of boolean algebras from 12 years ago.

  • Kacarott Avatar

    Isn't var_count evident from examples? Is there a reason why it is provided as an extra argument?

  • Voile Avatar

    Actual tests always froze the tab and even crashed it when I submit my solution ;-(

    I don't think this is supposed to happen at all.

    • Voile Avatar

      So this happens when test fails and generated boolean expression is too big (which happens in random tests), since the whole boolean expression created by the user is dumped as the test message along with ALL the failed conditions appended to it. It's too big ;-(

      Can we have smaller random test cases first that will show these, and biggest random test cases that won't show these? Then at least the browser tab wouldn't instantly crash leaving us with no output.

    • phantamanta44 Avatar

      I think probably I'll just make the random tests fail-fast so that only one big error is displayed instead of 100. I'll also make the early random tests smaller so that you don't have to parse through a 20-variable example to figure out what went wrong

    • phantamanta44 Avatar
      Issue marked resolved by phantamanta44 4 years ago
  • Blind4Basics Avatar

    Hi,

    • By reading the description, I'm rather surprized when I look at the sample tests. So the description could be enhanced so that it describes more precisely what is the "concrete" task.
    • Other than that, you need to specify the precedences rules if any. Even if that just consists in telling to the user that the precedence rules can be ignored because the task is to return a tree.
    • You have to specify the typical sizes of the inputs
    • the requirement about what to do if no function can be found isn't present in the description

    cheers

    PS: 6kyu...? 'doubt that...

    • Voile Avatar

      PS: 6kyu...? 'doubt that...

      It's actually 6.5 kyu if you know the simple trick ;-)

    • Blind4Basics Avatar

      even with a simple trick, the abstraction level, is clearly not 7-6 kyu

    • Voile Avatar

      Also:

      you need to specify the precedences rules if any

      The returned object is a binary AST tree, precedence rules don't apply here.

    • Blind4Basics Avatar

      :cough:

      Even if that just consists in telling to the user that the precedence rules can be ignored because the task is to return a tree.

      (but if the description is clear enough about what the task is, that part of the issue should "handle itself automatically", yes)

    • Mercy Madmask Avatar

      I would agree with 6kyu if you could brute force it.

      As it is, you need too much knowledge in boolean algebra for a 6kyu.

    • Voile Avatar

      I would agree with 6kyu if you could brute force it.

      I find it baffling that your first reaction to the kata is to write a complicated brute-force search algorithm instead of a 0th-order solution. myjinxin katas are probably all 5kyu to you too then.

    • phantamanta44 Avatar

      I would have given this 5.5 kyu and just rounded down to 6, rationale being that it's 6 kyu implementation difficulty and 5 kyu domain knowledge

    • Blind4Basics Avatar

      6 kyu implementation difficulty and 5 kyu domain knowledge

      ...Which should obviously make it 5, not 6...

    • phantamanta44 Avatar

      added more details to the description and bumped up the kyu

      Issue marked resolved by phantamanta44 4 years ago
    • Voile Avatar

      Please don't artificially deny some rankings to be chosen by others by intentionally adjusting the estimated kata rank. That's really abusing the system. (And if you want it to be approved at a specific rank you can just ask B4B or some other PUs personally to rank it whatever you like. Not like it is any less dodgy but at least you aren't jumping hoops...) I've reverted that change.

      Also @B4B if you don't agree with that ranking, then leave the kata there and wait for more ranking votes? 5 ranking votes is not that much.

    • Blind4Basics Avatar

      because ofc, Voile knows better. For sure, yeah. Maybe you're the one who's disagreeing with others, there. So far, that's the case. So stop the crap, thx.

    • Blind4Basics Avatar

      I've reverted that change.

      And that's not abusing the system? You're not consistent, here.