Ad
  • Custom User Avatar

    I can confirm it can be solved.

  • Custom User Avatar

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

  • Custom User Avatar

    Excellent. I will try it out soon. Im working right now on an more efficient solution. I will try it with the old program which could solve in time until it reached 10x10 and the newer potentially faster one.

  • Custom User Avatar

    I will also double check it again. Maybe it was an error in the program.

  • Custom User Avatar

    Sounds great. I could find 2 11by11 Puzzles somewhere in the internet and used them for my unit tests.

  • Custom User Avatar

    Yes I read about that. In the meantime I discussed my solution with some people and we came up that it is not that efficient yet. I try now an completly different approach to solve the puzzles faster. We will see If thats enough for the tests.

  • Custom User Avatar

    According to the Test I can solve test for Size 10 in ~500ms. But then I always get a time out for cases with size = 11.

    I also run tests on my machine and can run all test including 11 in less than 4 seconds. Still these time outs appear.

    I already try for days with crazy optimizations to make the code faster and start to wonder if its a test suite issue.

    Right now I feelt his way harder than the 1 Kyu 7by7.

    Please Check it it is still solveable.

  • Custom User Avatar

    any good ressources to find 10x10 and 11x11 puzzles with solution for the unit tests?

    could not find any in the internet.

  • Custom User Avatar

    The last two test cases provided are broken:

    {
    	{
    		{ 0, 0, 0, 0, 0, 3, 0 },
    		{ 0, 1, 0, 0, 0, 0, 0 },
    		{ 0, 0, 0, 0, 0, 0, 0 },
    		{ 0, 0, 0, 5, 0, 0, 0 },
    		{ 0, 0, 0, 7, 0, 0, 0 },
    		{ 4, 0, 0, 2, 0, 0, 0 },
    		{ 0, 0, 2, 0, 0, 0, 0}
    
    	},
    	{
    		{ 5, 7, 6, 4, 2, 3, 1 },
    		{ 3, 1, 5, 6, 4, 2, 7 },
    		{ 2, 3, 7, 1, 6, 5, 4 },
    		{ 6, 2, 1, 5, 7, 4, 3 },
    		{ 1, 5, 4, 7, 3, 6, 2 },
    		{ 4, 6, 3, 2, 1, 7, 5 },
    		{ 7, 4, 2, 3, 5, 1, 6}
    
    	},
    	{ 
    		{ 3, 1, 2, 3, 4, 4, 2, 5, 1, 4, 3, 3, 2, 2, 2, 2, 2, 2, 4, 3, 1, 1, 3, 3, 2, 3, 4, 2 }
    	}
    },
    {
    	{
    		{ 0, 0, 0, 0, 0, 3, 0 },
    		{ 0, 1, 0, 0, 0, 0, 0 },
    		{ 0, 0, 0, 0, 0, 0, 0 },
    		{ 0, 0, 0, 5, 0, 0, 0 },
    		{ 0, 0, 0, 7, 0, 0, 0 },
    		{ 4, 0, 0, 2, 0, 0, 0 },
    		{ 0, 0, 2, 0, 0, 0, 0}
    
    	},
    	{
    		{ 5, 7, 6, 4, 2, 3, 1 },
    		{ 3, 1, 5, 6, 4, 2, 7 },
    		{ 2, 3, 7, 1, 6, 5, 4 },
    		{ 6, 2, 1, 5, 7, 4, 3 },
    		{ 1, 5, 4, 7, 3, 6, 2 },
    		{ 4, 6, 3, 2, 1, 7, 5 },
    		{ 7, 4, 2, 3, 5, 1, 6}
    
    	},
    	{ 
    		{ 3, 1, 2, 3, 4, 4, 2, 5, 1, 4, 3, 3, 2, 2, 2, 2, 2, 2, 4, 3, 1, 1, 3, 3, 2, 3, 4, 2 }
    	}
    }
    

    There is no valid solution

  • Custom User Avatar

    Wow after optimizing my C++ solution I got it from ~40ms per solve to ~2ms.I think im ready for 7x7. Im happy with the code it is readable and fast but quite long. Wonder whats the speed record here.

  • Custom User Avatar

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

  • Custom User Avatar

    I would love to see a c++ version. Is it right if I sole it in Python I could translate it too C++ after?

  • Custom User Avatar

    For C++ the function signature should be really changed to:

    std::array<std::array<int>,4>, 4> SolvePuzzle (std::array<int, 16>& clues) 
    

    Nobody in modern C++ would use pointer parameters like int** for an function parameter.

  • Custom User Avatar

    () can be omitted

  • Custom User Avatar

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

  • Loading more items...