What is the best way to solve this game?

This evening I tried to solve a puzzle for a tree, so I thought that the best way to find a solution to this problem programmatically.

The goal is to combine a set of solids (e.g., tetris pieces in three dimensions) together to form a shape in a possible way that takes into account the fact that the parts can only be attached or placed in the structure if they fit type of movement (ignore turns, only 90 ° turns).

Check this box to understand what I mean.

+3
source share
4 answers

CS , , ++. , . memoization, , . , (.. , , ). , , , , ( ). , memoization ( ) , , . , , , . .

- 3D , .

+4
+2

, , . , , .

, . , .

+1

, , , , , , , , .

, , , , 4 , .

. , 24 , ​​, 4 .

, , , , , .

. , . . - , . , , , , .

If the last paragraph returns without a solution, the puzzle was unsolvable.

+1
source

Source: https://habr.com/ru/post/1712913/


All Articles