Task 106 - Random Search Optimization - Possible Checker Bug

Back to General discussions forum

gimkram_jr     2015-01-14 06:04:46

I've been stumped on this one for a while. I can't seem to figure out why, in the example, (1 +0.7) is not valid at that point where it appears. Here's what I've come up with:

Last good array (hand-checked): [3.0, 4.8, 3.5, 3.6, 1.0]

Array with changes (1 +0.7): [3.0, 5.5, 3.5, 3.6, 1.0]

I can't understand why this change is not valid in the example... My solution produces the correct answer for the example data, and I checked my simulation results against the Javascript widget in the page, but the actual problem submission always fails. I think I'm missing something here.

Anybody else having issues with this one?

Quandray     2015-01-14 16:49:44
User avatar

After (2 +0.5) the array is [3.0, 5.6, 3.5, 3.6, 1.0] which is the final array value.

(1 -0.8) doesn't change the array because it doesn't make any improvement.

gimkram_jr     2015-01-14 22:11:10

AH! That's what it was; I misunderstood the speeds array update condition. The adjustments in the given sequence are kept only if they produce a valid array AND they result in a better time. Thanks for the help, Quandray!

kawasaki     2020-05-03 02:52:45

My question was moved to a new topic.

Please login and solve 5 problems to be able to post at forum