Image recognition, similar to Go Alphago, so you can judge the board from the graphics.
The grassIt supports full Python and can be done on your own.