• dheeraj Challenge Author 10 years ago + 2 comments

    These are learning based challenges so, the changes needed for subsequent challenges are minimal. That's the whole point of the exercise.

    These challenges teaches you about different environments in which a rational agent of AI is put into and how it should behave.

    Add Reply Preview cancel

    Sorry, you do not have a permission to answer to this question.

    • yashdeora98294 3 years ago + 0 comments

      here is problem solution in java python and c++ programming. https://www.gyangav.com/2022/03/hackerrank-botclean-stochastic-problem-solution.html

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

      • mohammed_abdali1 3 years ago + 0 comments

        But what was I supposed to have had learned? The original one I programmed as "Check to see if standing on dirty floor. If so, clean it and quit. Otherwise start looking at the top left corner and read the grid like you would a book (the normal method of reading a matrix, that is). As soon as you encounter a dirty floor, make note of it and stop reading the grid. If your robot is too low or too high, move one step up or down as needed, and then exit. However, if you're already at the right level, then move either left or right as needed, and exit."

        This exact logic works for "what if I generate a new dirty floor after you clean the first one?" I guess the only technicality is that I have 200 steps instead of infinity (I think I had infinite in the first challenge), but considering I got full points, it looks like that constraint doesn't matter...

        Unless there was an easier (less complex) solution that was expected for the first challenge. But I mean... what's less complex than the brute force method of "try to find the lowest index of a 1d array that has dirt, and then try to move towards it"?

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

      1. Challenge Walkthrough
        Let's walk through this sample challenge and explore the features of the code editor.1 of 6
      2. Review the problem statement
        Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
      3. Choose a language
        Select the language you wish to use to solve this challenge.3 of 6
      4. Enter your code
        Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
      5. Test your code
        You can compile your code and test it for errors and accuracy before submitting.5 of 6
      6. Submit to see results
        When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
      1. Check your score