Working (random) AI based on AJAX IO method.