Add AI interface

A problem remains(how to judge a new block)