Ad
  • Custom User Avatar

    This kata needs serious work.

    • I fail to see how the classes can be defined, as there's no way to place them in separate .java files.
    • The test cases expect types Human, Man, Woman. So inner classes won't do the trick (God.Man != Man)
    • If there is a solution, it's far from trivial and more of a gimmick. It's certainly not idiomatic Java, which is what I'd expect at 8 kyu.
    • Broken English, especially in test cases. I'm not a native speaker myself, but it's rather painful to see things like "Adam are a man" and 'Eva' instead of Eve.

    Java

  • Custom User Avatar

    Now this is a high quality, well-written kata! It was fun to solve and the method scaffolding is appreciated.

    Not having any previous genetic algorithm experience, one suggestion I have is to clarify the procedure of forming a new population.
    At first it was unclear to me where the selected chromosomes had to go. Was the new population the old one with the two chromosomes replaced? Only after reading an article on the subject did I figure out that growing a new population is a separate concept from the evolution cycles. (Or at least I think it is, since my solution was accepted.)

  • Custom User Avatar

    Something fishy is going on with the test cases on submit:

    finalSearchTestRareCases(WildsTest)
    expected:<0> but was:<-1>
    nonCharTest(WildsTest)
    expected:<0> but was:<-1>
    

    So I made a single change in my code, I now return 0 on non-match to see what it reports:

    finalSearchTestRareCases(WildsTest)
    expected:<-1> but was:<0>
    nonCharTest(WildsTest)
    expected:<11> but was:<0>
    

    What is going on here?!
    Are the test strings pseudo randomly generated with the hash of my code as the seed?