• ###### yxo2commented on "Multiples of 3 or 5" python solution

Love that you used a bitwise operator. Super clever.

• ###### Guazcommented on "Multiples of 3 or 5" python solution

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

• ###### rlf24commented on "7×7 Skyscrapers" kata

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.

• ###### JohanWiltinkcommented on "7×7 Skyscrapers" kata

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.

• ###### rlf24commented on "7×7 Skyscrapers" kata

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.

• ###### medved01commented on "7×7 Skyscrapers" kata

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

• ###### medved01commented on "7×7 Skyscrapers" kata

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

• ###### Blind4Basicscommented on "7×7 Skyscrapers" kata

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

• ###### JohanWiltinkcommented on "7×7 Skyscrapers" kata

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

• ###### Blind4Basicscommented on "7×7 Skyscrapers" kata
``````*************************
*  Manual notifiaction  *
*************************

``````
• ###### JohanWiltinkcommented on "7×7 Skyscrapers" kata

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.

• ###### medved01commented on "7×7 Skyscrapers" kata

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.