moved some ai logic to board namespace