Running out of coding optimizations, moving to the tests on the Pi.


It has been an exhaustive search, and I am at the point now that I can not further refine and compact the code to run and still get the desired output.

The next phase is to update the draw histories and move the whole project to the raspberry pi and run the timed test.

The expectation is that the pure Python solution will generate near the same result, which is not a feasible solution. BUT... enter Cython! 

Cython will convert the pure Python code into the C language, compiled specifically for the device it is running on and remove all of the overhead of Python, which is an interpreted high level language and reduce it to compiled C, which runs machine code at the processor level.

The first experiment... run the "cythonized" time reporting version, from this we can accurately predict the total run time.

The second experiment... IF that run time is reasonable, start the production code. On a rough estimate IF Cython operates as documented, total run time becomes a function of the clock speed, and the new ARM processor can handle roughly 2,400,000,000 instructions per second. Holding to the complexity of the code this could run in approximately 23 days... over 1/4 TRILLION calculations without overclocking! I am willing to accept any run time under 60 days.

I believe I have done the software engineering properly, chose the correct data structures and implemented the algorithm as efficiently as possible. Memory management was also considered. By only storing the top 3 lists for each pass of 10 billion, storage requirements are low and the computationally intensive parts like writing to a file or reading from a file are the bare minimum (8 reads, 28 writes, 28 screen prints total)

There are no shortcuts, in the replacement genre, where you transform the last draw into another number, there are exactly 10 billion possibilities. The game histories vary between 5k and 17k.

The order of operations

Pick 5 mid

Pick 5 eve

Pick 3 mid

Pick 3 eve

Pick 2 mid

Pick 2 eve

Pick 4 mid

Pick 4 eve

Hopefully it can launch this week..

Entry #282


This Blog entry currently has no comments.

Post a Comment

Please Log In

To use this feature you must be logged into your Lottery Post account.

Not a member yet?

If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.