The points from the chain reaction are calculated using the _get_points() function from the Match class. It is equal to OriginalPoints * (2^Chain). Right now my algorithm delays 250 milliseconds for every chain level, so
"Good Job" results in 1/4 second delay, "Fantastic" 1/2 second, etc. The appropriate delay time would vary based on the lag. My algorithm does overcreate match possibilities. Out of all the possible moves it generates, only about half of them can be made concurrently without conflicts since making some moves will invalidate others. Currently the bot does not try to reset the board.
Right now each "cycle" (which involves screen grab -> OCR -> decision -> make move) takes about 200 - 250 milliseconds. Breakdown is as follows:
Screen grab -- 150 ms
OCR -- 20 ms
Decision -- 30 ms
Make moves -- 10 ms
So screen grab takes the most of the time. 7 screenshots a minute isn't really that fast, I'd rather prefer 20 but it seems unlikely. I'm currently using pyscreenshot module for this which is the fastest library I could find. I tried other ones but they were 2-3x slower.. I think I could definitely speed up each cycle to 100-150ms if I either rewrote the bot in a faster language like Java, or ran it on Windows with a faster computer (I'm currently using a 1.7 GHZ ultra-low-voltage processor which obviously don't help).
Here's a video of the bot in action:
https://dl.dropboxusercontent.com/u/32170031/StarJeweled.mp4