Polygon divison using AI algorithm