Puzzle Pattern Search

I was wondering which of the most commonly used algorithms are used to search for patterns in puzzle games matching cell grids.

I know that it depends on many factors, such as the types of patterns you want to discover, or the rules of the game ... but I wanted to know which of the most commonly used algorithms are in such problems ...

For example, games such as columns, bejeweled, even tetris.

I also want to know if pattern detection is “brute force” (for example, scanning the entire grid trying to find three neighboring cells of the same color) is significantly worse than using certain algorithms in very small grids, for example 4 X 4 for example (and, again Well, I know that it depends on the type of game and the rules ...)

What structures are commonly used in such games?

+5
source share
3 answers

It always depends on the domain. But there are also two situations in which you would do these types of searches. The situation occurs after the move (a change in the playing field made by the player), and another - if / when the whole board has changed.

In Tetris, you will not need to scan the entire board after the piece has fallen. You just need to look for the lines that the piece touches.

-3 , Bejeweled, , , , , - . , , . , , if , , . .

, 2D-. , , "" , . if , ", , ( )". : if, , , .

: , , / . , , , .

+5

: , , . , tetris , . -, . . .

: 2D-.

+2

, , , , , (EDIT: ). , , , (.. - - JavaScript Windows, ++).

- , .

, .

0

All Articles