• ###### rottenfishbonecommented on "Optical character recognition " kata

This was by far the most interesting kata I have done on this site.

Thanks

• ###### geoffpresolved a question on "Centre of attention" kata

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

• ###### neerajgopalcreated a question for "Centre of attention" kata

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

• ###### Ciprian Amzacommented on "Centre of attention" kata

Lovely kata! Thanks for it! :)

• ###### geoffpcommented on "Centre of attention" kata

That can happen if your algorithm isn't efficient. Any method that relies on finding the depth of each pixel separately will likely be too slow on the large images.

• ###### Hesenelicommented on "Centre of attention" kata

running big test, my program always runs out of time...

• ###### geoffpresolved a question on "Find the centre of a sphere" kata

An ill-conditioned problem is one where small changes to the inputs can cause a large change in the answer. In this kata, the most ill-conditioned test cases are ones where all the given points lie on a relatively small part of the sphere. (Imagine trying to determine where the centre of the Earth is, given only the 3D coordinates of some points on one small Pacific island.) In computational terms, this means that small floating-point errors can cause a relatively large error in the final answer -- so you need to come up with an algorithm that minimizes the effects of such errors.

The "proper test" you propose is much less stringent than the one the kata actually uses. In an ill-conditioned test case, there will be many points P with the property that the distances from P to the given points are all approximately the same. But most of them are relatively far away from the real centre of the sphere; some are even outside the sphere. That "real centre" is the point that was used as the centre when constructing the test case; that's the point you need to get close to.

Don't give up; it can be done. :)

• ###### eurydice5717created a question for "Find the centre of a sphere" kata

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

• ###### defnamecommented on "Tiptoe through the circles" kata

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

• ###### geoffpresolved a question on "Centre of attention" kata

Here's the relevant region of the test image, consisting of pixels of colour 5.

5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,
5,5,5,E,E,A,5,5,5,
5,5,5,E,A,A,5,5,5,
5,5,5,5,5,5,
5,5,5,5,5,5,
5,5,5,5,5,5,

The Es represent the expected answer: pixels 212, 213, and 241. The As are the additional pixels present in your actual solution : 214, 242, and 243.

All the E pixels have depth 4, which is the maximum depth for any pixel in this region. But one of the A pixels (pixel 243) has depth 2: you can get out of the region of 5s by taking just one step to the right and one step down. The other two A pixels have depth 3.

• ###### pcordoncreated a question for "Centre of attention" kata

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

• ###### geoffpresolved a question on "Centre of attention" kata

Your alternative solution timed out when I tried it. It's not really what I'd call a one-pass solution, as there's a lot of recursive hard work involved in each iteration of the single pass. Effectively, it finds the depth of each pixel separately, without using any of the previously-found depths of other pixels.

• ###### TimurTimur1created a question for "Centre of attention" kata

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

• ###### LewisSabercommented on "Optical character recognition " kata

Ty for this kata! Did it without any googling, took a while, it feels so cool to find your own way to do things without someones help, im so excited

• ###### geoffpcommented on "Unwanted dollars" kata

Try to narrow it down to a specific test case. Find out what your code is returning in that case. That'll probably tell you what the problem is.

The only asserts in the JS version of this kata are standard ones (`Test.expect()`).