Creating an algorithm to solve Number Match
Hey, I've recently discovered a new logical game called "Number Match".
Link to the game
Here is the set or rules describing it:
Any ideas how to approach this problem?
Link to the game
Here is the set or rules describing it:
The game is played on a grid filled with numbers. Grid is x cells wide and infinitely high (it expands vertically if needed)
You remove pairs of the same number, or pairs that add up to 10.
Numbers must be next to each other horizontally, vertically, or diagonally. There can't be any number between them. Distance between the cells has no limit. You can also pair the last number of one row with the first number of the next row. If the next row is empty it just checks the next row until it finds a number.
When pairs are cleared, they disappear. If row is empty then its removed and all the rows under it are moved up.
You can add numbers 5 times. When you add numbers, it collects all the remaining numbers, skipping the empty cells, and appends them starting from the cell after the last number in the grid.
Each pair cleared gives 1 point. Each row cleared gives 5 rows.
The goal is to either clear the board or get the highest score possible.
If no moves remain, game ends. The game is played on a grid filled with numbers. Grid is x cells wide and infinitely high (it expands vertically if needed)
You remove pairs of the same number, or pairs that add up to 10.
Numbers must be next to each other horizontally, vertically, or diagonally. There can't be any number between them. Distance between the cells has no limit. You can also pair the last number of one row with the first number of the next row. If the next row is empty it just checks the next row until it finds a number.
When pairs are cleared, they disappear. If row is empty then its removed and all the rows under it are moved up.
You can add numbers 5 times. When you add numbers, it collects all the remaining numbers, skipping the empty cells, and appends them starting from the cell after the last number in the grid.
Each pair cleared gives 1 point. Each row cleared gives 5 rows.
The goal is to either clear the board or get the highest score possible.
If no moves remain, game ends. Any ideas how to approach this problem?