0 votes
In the context of n-puzzle, consider a variation that we can slide multiple tiles in one row or column, if they are touching each other.  The cost of this slide operation is the same as that of sliding one tile.

Design an admissible and useful heuristic for this problem.
in Informed Search by AlgoMeister (1.6k points)

1 Answer

0 votes
for any tile, it can swap with the empty tileļ¼Œand each swap counts for max(|y1-y2|,|x1-x2|) moves, and if they are in the same row or same col, this move will count for 0. every time, if the empty tile is not in the right place(the tile the empty tile should be in goal position), then swap it with the number should be in this tile in the goal position(to make this number matched). If the empty tile is in goal position, then swap it with the farthest mismatched number, do until to the goal position. And heuristic is the sum of moves.
by (116 points)

Related questions

0 votes
2 answers
+1 vote
1 answer
asked Apr 30, 2019 in Informed Search by Ruan XiangNing AlgoMeister (968 points)
0 votes
3 answers
asked Mar 19, 2023 in Informed Search by Amrinder Arora AlgoMeister (1.6k points)
0 votes
1 answer
The Book: Analysis and Design of Algorithms | Presentations on Slideshare | Lecture Notes, etc
...