DLCalc ports to other platforms

Feb 10, 2013 at 9:08 PM
Edited Feb 10, 2013 at 9:13 PM
It's a bit late in the day for me to ask really as it's been available for a few months, but can I confirm that it is it okay to take your reverse-engineered DLCalc source-code and write a version for another platform? It is freely available, and I do credit you as the author of DLCalc as the in-between route from WinCODA to what I've written.

It is probably laughable what I've ported it to: the now over 30-years old Sinclair ZX Spectrum home computer, but as ZX Spectrum emulators are available for just about every device available these days including all mobile platforms, it makes it available to run on pretty much any smart-phone.

You can find it at

http://www.worldofspectrum.org/infoseekid.cgi?id=0027891

The program is written in BASIC which is readily viewable by BREAKing into it. I have optimised the score computations a bit as the Spectrum only has a 3.5MHz Z80 chip to do all the work, but the end result is it can compute the 500 scores needed for generating a 50-over 10-wicket remaining table in about one minute (which can then be viewed and scrolled up and down in the program).

A question I have is how do you (Jonas) reverse-engineer DLCalc? Is it trial and error, altering the parameters used by the published algorithm until your program gives essentially the same results as WinCODA, or do you disassemble it in some way to get those parameters directly?
Coordinator
Feb 11, 2013 at 5:59 AM
Hi PrinceGaz, it's good to see you've found this project interesting, and actually went on to port it to another platform. I have no issues with others using the source code. In fact, it's open source precisely for this reason. I feel Duckworth/Lewis method should be available to the general cricket fans. I appreciate your effort in reusing my poorly written source code (it was written at a time when I was a novice programmer!)

However, I'm not sure what Duckworth/Lewis and the ICC think of this. So far I have not received any objections from any party.

And yes, I have used a trial and error approach to find the exact values of the secret constants. Once you know the actual formula, and understand the theory behind the method, it's not very difficult to intuitively guess the constant values. To make sure they are 100% accurate, I wrote another small program which compared every single ball-by-ball D/L par scores for 100 runs to 1000 runs. When all of them matched, I was very confident it's extremely accurate. I also check every time the D/L method is used in any match anywhere in the world, and so far my calculator has given 100% accurate info.

If you have any further queries, please contact via email.

Thanks.