Ad
  • Default User Avatar

    Approval given. Thank you for the contribution!

  • Default User Avatar

    Here endeth the lesson ;)
    Nothing more and nothing less to say ;-)
    Kind regards!

  • Default User Avatar

    I was just referring to the example given in the kata's description, but now I see that we should return single "?" iff it is impossible to determine with 100% certainty a safe position to be uncovered in the next step of computation. Am I right?

    On the first impression I just didn't get this: "If the game can not got a valid result, should return "?"
    What do you mean by saying "the game can not got a valid result"? What is your definition of a valid result?

    Taking the example you have put in kata description:
    0 ? ?
    0 ? ?

    If the number of hidden mines is n=1,
    after opening two squares in the middle, we obtain:
    0 1 ?
    0 1 ?
    Let's call it a state (X).
    Based on the above state we could finally come up with two acceptable results:

    The first is:
    0 1 x
    0 1 1
    and the second:
    0 1 1
    0 1 x

    Both of them are valid in the sense that they both could represent initial playing board. Nevertheless, having reached a state (X), only nondeterministic oracle-aided choice could theoretically lead to not being blown up by the blast with 100% probability. The essence of a statement about the game's inability to get a valid result. I hope I explained my thoughts clearly :)

  • Default User Avatar

    I know what the aim of this game is. From your explanation I see that the condition for returning "?" is not in line with what has been said in a description of the task. Providing there are several possibilities to replace question marks with known symbols, all hidden positions can still be opened :)

  • Default User Avatar

    Hi myjinxin2015,
    Correct me if I'm wrong, but just wanted to make sure I touched it properly.. The description implies that an algorithm should answer "?" any time it detects there is either zero or more than one possible assignment of numbers and mines (x's) onto a given grid so that the constraints are met?

  • Default User Avatar

    Just a few words about the kata.. Remarkably good, one of the hardest, very interesting, forcing to really think and investigate. Hence, giving lots of satisfaction when finally completed. I believe this task could even be made much more difficult by not telling anything about the K-means algorithm. Solved. Good night! :)

  • Default User Avatar

    Many good wishes and all the best for a nice myjinxin2015's kata invention! :) Enjoyed it much.

  • Default User Avatar

    Pretty nice kata. One thing I would strongly recommend is adding random test cases. Just to prevent completion of the task by returning expected results once the test inputs have been discovered with syso.

  • Default User Avatar

    It lacks random test cases for Java solutions.

  • Default User Avatar

    Very good, quite small and not so easy kata. Forces to keep thinking and seeking for alternative ideas. I like that. Best wishes to the author!

  • Default User Avatar

    Nice kata. Would give a rate of 4 kyu. Best whishes!

  • Default User Avatar

    Kind of a seriously nice programming task that truly runs the show... gives a lot and tears may fall recalling the time when some of us used to study and started getting familiar with combinatorial analysis, discrete math and all the stuff like that. Yeah.. I still remember :) A valuable kata worth solving and coding it. Good job, Giacomo!

  • Default User Avatar

    Hi geoffp,
    Just a few words to you as a feedback..
    This is undoubtedly tough and really beautiful programming assignment which touches many important aspects and techniques of computational geometry. I found the kata a challenging exercise that made me think, analyze and debug my solution during the last couple of days and nights :) Congratulations on the author's invention! I'm very happy with the task as it falls into a category of katas that require lots of tries, code checkings, as well as a bit of patience. Good test coverage preparation, especially randomly generated. I'm also waiting for other code submissions, just for comparison and would give a rank estimation either 2 or 1 kyu. Best wishes!

  • Default User Avatar

    I share the opinion that the level of difficulty for this should even be ranked somewhere between 3 and 2 kyu. Finally, I succeeded in completing the task. It's definitely one of the hardest I came across here.

  • Default User Avatar

    It would be reasonable to add more test cases as for m not exceeding 3 there are non recursive formulas to quickly get the answer regardless of n.

  • Loading more items...