对比经典与AI方法求解网格三点共线难题,发现两者各具优势。
Three methods, one problem: Classical and AI approaches to no-three-in-line
- 用ILP、PatternBoost和PPO三种方法解决该问题
- ILP可解至19×19,PPO在10×10完美求解但11×11失败
- 小规模上AI表现接近最优,混合方法更利于扩展
无三点共线问题要求在n×n网格上放置尽可能多的点,且任意三点不共线,是组合几何中的经典难题。传统方法如整数线性规划(ILP)能保证最优解,但随网格增大呈指数级增长;近年机器学习提供了基于模式的近似新路径。本文首次系统比较经典优化与AI方法在此问题上的表现,首次应用PatternBoost Transformer学习与强化学习(PPO)算法。ILP在19×19网格内获得证明最优解,PatternBoost在14×14网格上达到最优,测试损失降低96%;PPO在10×10网格中实现完美解,但在11×11网格因约束违反无法生成有效配置。结果表明,经典优化仍为精确解所必需,而AI方法在小规模上表现优异,混合策略是最有前景的扩展方向。
原文摘要 · Abstract (English)
The No-Three-In-Line problem asks for the maximum number of points that can be placed on an n by n grid with no three collinear, representing a famous problem in combinatorial geometry. While classical methods like Integer Linear Programming (ILP) guarantee optimal solutions, they face exponential scaling with grid size, and recent advances in machine learning offer promising alternatives for pattern-based approximation. This paper presents the first systematic comparison of classical optimization and AI approaches to this problem, evaluating their performance against traditional algorithms. We apply PatternBoost transformer learning and reinforcement learning (PPO) to this problem for the first time, comparing them against ILP. ILP achieves provably optimal solutions up to 19 by 19 grids, while PatternBoost matches optimal performance up to 14 by 14 grids with 96% test loss reduction. PPO achieves perfect solutions on 10 by 10 grids but fails at 11 by 11 grids, where constraint violations prevent valid configurations. These results demonstrate that classical optimization remains essential for exact solutions while AI methods offer competitive performance on smaller instances, with hybrid approaches presenting the most promising direction for scaling to larger problem sizes.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。