# Appropriate ML algorithm to solve a cutting pattern problem

I have a rectangular area, where I need to place some 2 dimensional geometrical shapes - like a square or circle or a little more complicated shapes. And after the arrangement these shapes should be cut out.

Requirements to the disposal of shapes:

• These shapes are not allowed to intersect
• And also they must disposed on the recatangular area
• They must have at least a minimum distance
• The waste should be minimized
• When more than one shape is arranged on this area it is desirably that the shapes have a certain quantity (e.g. shape A: 50 %, shape B: 30 %, shape C: 20 %)

After the arrangement I get the coordinates of the single shapes so that I can cut out my shapes...

To solve this I thought of (deep) reinforcement learning but because I'm new to ML I'm not sure if there is a more appropriate method to solve this problem.

I hope that you can give me some hints or simply confirm my assumption that (deep) reinforcement learning is appropriate. And perhaps you can also offer me some useful links...

And lastly a little picture which is showing a possible bad result because shape A and shape E intersect. And probably there is to much waste.

• Have you looked at en.wikipedia.org/wiki/Knapsack_problem ? Commented Sep 30, 2021 at 7:48
• @OliverMason: I know the Knapsack problem, but I‘m not sure how I can solve my problem with this. For me it‘s necessary to know the distinct position of the shapes on the rectangular area. After a proper positioning I want to cut the shapes out. I edited also my question for hope of being more precise... Commented Sep 30, 2021 at 8:23