Ad
  • Custom User Avatar

    Added performance tests to ruby and python, js is still lacking.

  • Default User Avatar

    Hey, just had time to take a look at it. The spec makes sense. Awesome!

  • Custom User Avatar

    I also updated JS and CS translations now, so this suggestion is fully implemented, from my perspective. Marking this as resolved. Thank you.

  • Custom User Avatar

    I updated Ruby Example Tests, please try it and tell me if you find it okay like this.

  • Custom User Avatar

    That makes sense. I've added a case with custom k-factor algorithm to Python:

    Test.describe('Testing custom K algorithm')
    def k_algo(exp):
        return 800//len(exp)
    Test.assert_equals(elo([1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, 1200, 1225,
                            1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, 1450, 1475,
                            1500, 1525, 1550, 1575, 1600, 1625, 1650, 1675, 1700, 1725], 1000, 0, k_algo), 1699)
    

    But I'm no Rubist, so I would be thankful if somebody translates that into Ruby. Don't have much time at the moment, so I did not touch JS and CS yet as well, let's put it into todo-list.

  • Default User Avatar

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

  • Default User Avatar

    I am sorry for not being clear enough. I mean the sample tests, not the full suite of tests.

  • Default User Avatar

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

  • Custom User Avatar

    What do you mean by that? I look at Ruby test suite and I can see several packs with custom K factor algos actually there. Please explain what you want.

  • Default User Avatar

    Ruby test cases would save some headache if they included at least one k_factor being passed along

  • Default User Avatar

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

  • Default User Avatar

    I think this question should have more aggressive constraints for performance.

  • Custom User Avatar

    Just a reminder:
    The return type is a dict rather than a struct for Python, if you are new to Python and it confused you...

  • Default User Avatar

    for Python:
    should support finding peaks, despite the plateau
    ✘ {'pos': [2, 3], 'peaks': [3, 2]} should equal {'pos': [2], 'peaks': [3]}

    I feel like I'm missing something, but I have no idea what exactly... is the algorithm supposed to ignore all plateaus if a certain parameter is given? If so the description doesn't mention this requirement at all. This test case is very vague and I can't decipher it's meaning or purpose.
    Right now I feel like this is impossible to finish without the proper info.

  • Default User Avatar

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

  • Loading more items...