Ad
  • Custom User Avatar

    That's a very nice test-map.
    I run a 10^6 simulations of a try-random-move-from-options-at-any-point solver and it finds the solution roughly once in 4000 attempts.

    It helped me avoid trying a lot of bad heuristics, and to find a relatively elegant approach to the puzzle.

  • Custom User Avatar

    I don't have an idea for an algorithm that would be significantly faster than a naive solution.

    if you do then go ahead and create a performance version :)

  • Custom User Avatar

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

  • Custom User Avatar

    As I recently mentioned on discord, I changed my mind. Do what you think is the best

  • Custom User Avatar

    I don't understand what i'm supposed to do with the suits. I don't understand how are some not isomorphic and some are. The hand rank does not change

  • Custom User Avatar

    These boards aren't isomorphic:

    • first board has 3h that is the only heart on board
    • the second board has 3c and 8c.

    So the hearts on the first board aren't isomorphic to any suit on the second board

  • Custom User Avatar

    Compare 8c3hJsQd8s, Js8s3cQd8c: True should equal False

    I didn't quite understand this part. If you change 3h to 3c in the first suit, they become the same, hence isomorphic, and there are no other h's in the first suit. Is it the problem with the second suit, where if you swap c with h, 8h and 8c become different? Or anything else?

  • Custom User Avatar

    Thanks!

    1. I have fixed the missing suits for the example

    2. This is mentioned in the problem description. I have added the fixed tests for this example (there was one actually - that tested full deck of cards in two different orders, but I added some better examples to the flop section.

  • Custom User Avatar
    1. This kind of situation only appears in the final tests :

      @test.it("Several same type of cards")
      def same_type():
          single_test("Jc4dJd", "4dJhJd", True)
          single_test("6s4c5d6c", "6s5d4s6c", True)
          single_test("8hJcQdJdJs", "Js8hQsJcJd", True)        
      
    2. In the fifth example , the 4 shouln't be there or should be followed by something.

      As 9s Js 5s 4 and Ac 9c Jc 5c 4 are isomorphic

  • Custom User Avatar

    Wait, one-to-one mapping does mean it's both ways, nevermind

  • Custom User Avatar

    "isomorphism" kinda implies that, but yeah, a "bidirectional" here or there could help.

  • Custom User Avatar
    We define two sets of cards (we'll call them boards) to be isomorphic if there exists a one-to-one mapping between the suits such that replacing each suit in the first board using this mapping produces the second board.

    Does not imply that it should work both ways. And I'm finished yet, so should it?

  • Custom User Avatar

    Thank you. This comment saved me a lot of time!

  • Custom User Avatar

    Fixed also in the sample tests.

  • Custom User Avatar

    Expected and actual are in the wrong order in the sample tests.

  • Loading more items...