AI player make random moves but is still buggy