Jonathan M Davis:
It would probably have to be tweaked to matchwhatever Bearophile's code does though as far is input goes (I haven't looked at the code that he linked to).
And the original Python code is not mine, it's from the AI researcher Peter Norvig :-)
Bye, bearophile