Ad
  • Default User Avatar

    Love that you used a bitwise operator. Super clever.

  • Default User Avatar

    Definitely beside math approach, best brute force there, without modulo or repeating multiplication, grants. There is not many of them there :D

  • Custom User Avatar

    Thanks for the reply. 'Guessing' was a poor choice of words. I was referreing to the try/contradict/backtrack... approach. I appreciate the feedback. It was a good exercise nonetheless.

  • Custom User Avatar

    The medved test apparently requires "guessing".

    It still has only one solution, so it's not so much guessing as finding the contradictions. But pure deduction seems to be not enough. Though I feel it should be ( or is ), for appropriate values of deduction.

  • Custom User Avatar

    Hello. May I ask whether your samples and tests require constraint programming (guessing)? I had gotten the impression somewhere that the Katas could be solved solely through logic. My deductive approach has passed all the 4x4's, 6x6's, and the 7's up to the medved tests. Just trying to figure out if I have a bug or have been off-base all along. Thanks.

  • Default User Avatar

    Hi, I created github repository (medved01x/skyscraper) with txt file - 1000 such puzzles
    (full clues - no zeros added).

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar
    *************************
    *  Manual notifiaction  *
    *************************
    
    Please read the message above... x)
    
  • Custom User Avatar

    Your example has a single solution. I'm not statistically sure, I'm mathematically sure: I generated all possible solutions, and there was one of 'em.

    I have added it to tha JavaScript tests; we'll see how many solutions break ( ETA: quite a lot actually, and not just the cheating ones ).

    Translators are kindly invited to add it to their language as well.

    ( Publishing this change actually succeeded. :] This means it may be possible to add random tests as well. )

    If anyone has a random generator that will generate single solution puzzles within a reasonable time, I'm open to suggestions! My own one is a bit of a kludge. Otherwise, I may go with ekaruk's 100 pre-generated puzzles.

  • Default User Avatar

    Hi, I tested about 30+ python3 solutions and most of them fail to give correct answer in about 1/3 of puzzles with unique solutions.
    I currenty generated 700+ such puzzles (with full clues, but it easy to add some zeros to them), for which I'm statistically (very) sure they are really with only one solution.
    One of them is [3,3,2,1,2,2,3,4,3,2,4,1,4,2,2,4,1,4,5,3,2,3,1,4,2,5,2,3], so I ask for somebody to try find more solutions for it and let me know if I'm wrong.
    My solution (I hope unique) for this is [[2, 1, 4, 7, 6, 5, 3], [6, 4, 7, 3, 5, 1, 2], [1, 2, 3, 6, 4, 7, 5], [5, 7, 6, 2, 3, 4, 1],
    [4, 3, 5, 1, 2, 6, 7], [7, 6, 2, 5, 1, 3, 4],[3, 5, 1, 4, 7, 2, 6]]).
    Sorry for my English.