Used slice detection and make AI less buggy and more intelligent

Signed-off-by: UltimateGoDLikE <lohtonghong@hotmail.com>