Can any #PHP experts who also know a bit about #AI please have a look at my failing #K-Means implementation? I've included the source code (don't worry, it's well commented and of fairly good quality) and a description of what I think is the problem. http://waterpigs.co.uk/electronics/ai/k-means/ Mucho Grathias!

Can any experts who also know a bit about please have a look at my failing implementation? I've included the source code (don't worry, it's well commented and of fairly good quality) and a description of what I think is the problem.

http://waterpigs.co.uk/electronics/ai/k-means/

Mucho Gratias!

updated: