Added server side AI logic and AJAX endpoint. It is problematic, but committing anyways. May continue work tonight, or tomorrow. It is close... so close.