Ad
  • Custom User Avatar

    the fitness function takes the chromosome in as a string parameter not an array. if you have an array of 50 strings and you wanted to find the fitness of one, you'd do the following. fitness( chromosomes[index]).

  • Custom User Avatar

    ok, i know what i did wrong. i was rewriting the coefficient of the object after exponential product and returning it instead of returning a new object. subsequent calls were made to that original object with the modified coefficients. all fixed. good kata.

  • Custom User Avatar

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

  • Custom User Avatar

    vms is an object. "i" is a key in the object.
    you can access the key via vms[i].vend() but you can't use a "foreach" on it because it's not an array. you'd have to use a different looping algorithm

  • Custom User Avatar

    i keep getting server timeouts with my solution. Now obviously this could be that my implementation is not optimized, however, there are times where it passes certain tests one time and doesn't pass it other times. If I increase my population over 100 and my iterations are over 100 I'd imagine I'd pass the tests more frequently but due to the timeout issue, I can't test this.

  • Custom User Avatar

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