Graph drawing concerns the algorithmic visualization of graphs. A good drawing of a graph is easy to read and facilitates solving tasks on the graph. Several properties have been identified to occur in good drawings of graphs. Such properties include a low number of crossings, large angles between edges, short edges, and depicting symmetries. Many of these properties are explicitly measurable metrics. This brings us to the insight that graph drawing can be seen as a game. In this paper, we study a single-player optimization game in which the player iteratively moves vertices of a straight-line graph drawing to reduce edge crossings. This game arose naturally from the automatic track of the Graph Drawing Challenge, where solutions are obtained by repeatedly performing local vertex movements. We formalize this process as a game with full information and investigate whether reinforcement learning can discover effective strategies for playing it. Our reinforcement-learning agent observes the local geometric and structural context of a vertex and selects a movement direction with the goal of reducing either the global or the local crossing number, that is, the total number of crossings or the maximum number of crossings per edge. We compare the resulting strategies to existing methods and established crossing-minimization heuristics on standard benchmark graphs. While our approach does not out-compete state-of-the-art methods for minimizing the global crossing number, it is competitive and often superior for minimizing the local crossing number.
翻译:图绘制涉及图的算法可视化。一个良好的图绘制易于阅读,并有助于在图上完成任务。已识别出良好图绘制中的若干特性,包括较低的交叉数、边之间的大角度、短边以及对称性的呈现。这些特性中许多都是明确可衡量的指标。这使我们认识到,图绘制可以看作一种游戏。本文研究一种单人优化游戏,其中玩家通过反复移动直线图绘制的顶点来减少边交叉。该游戏自然源自图绘制挑战赛的自动赛道,其中解决方案通过重复执行局部顶点移动获得。我们将此过程形式化为一个具有完全信息的游戏,并探究强化学习能否发现玩此游戏的有效策略。我们的强化学习代理观察顶点的局部几何和结构上下文,并选择移动方向,目标是减少全局或局部交叉数,即总交叉数或每条边的最大交叉数。我们将所得策略与现有方法及标准基准图上已建立的交叉最小化启发式算法进行比较。虽然我们的方法在最小化全局交叉数方面并未超越最先进的方法,但在最小化局部交叉数上具有竞争力且通常更优。