Abstract:This study applies deep reinforcement learning to the nesting problem of two-dimensional irregular polygons. The shape characteristics of polygons are mapped into one-dimensional vectors according to the distances from the centroid to the contours. For randomly generated polygons, the compression losses are less than 1%. With a given sequence of the polygon items, this study employs a multi-task deep reinforcement learning model to predict the sequence and rotation angle of the irregular nesting items and obtains a nesting result 5%–10% higher than those of the traditional heuristic algorithms. A result better than that of the optimized genetic algorithm is also achieved under a sufficient sampling number. The model can deliver a better initial solution in the shortest time and, therefore, has a generalization ability.