Implementation of the dot games with a.i. in prolog