Wow, thanks for all the responses so far. Even if I'm still far from grasping what I need to do to implement this, it's much appreciated.
For some extra information, I do actually want to solve this for a real world application. Ultimately, accuracy is my main aim, but will settle for...