A
A
Alexander risok2018-11-18 23:31:33
JavaScript
Alexander risok, 2018-11-18 23:31:33

What tasks does the one described by me belong to, and what algorithms can be used to solve it?

There is a problem of 2D packaging of a container (plane) with certain shapes and there are algorithms for solving it. And if the task is complicated and now you need not only to arrange the figures in the best way, but also to connect all these figures to each other with an "expensive" width of 1 cell.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Sokolov, 2018-11-18
@sergiks

Should there be a road around the perimeter of each figure? Maybe take it into account right away and “thicken” each figure into half a cell? And then decide as before)

P
profesor08, 2018-11-18
@profesor08

He arranged the figures, determined the center in each, drew a line from one to the other, and so on for everyone.

A
Alexander Zachinalov, 2018-11-19
@SanDiesel

Your logic reminded me of the ship placement algorithms in the Sea Battle game. There are guides on the net, you can study and adapt them for yourself. For example: cleanjs.ru/articles/igra-morskoj-boj-na-chistom-ja...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question