Title: HIDA
1HIDA Hierarchical Iterative Deepening A
Jeffery Grajkowski
2Background
Search algorithm test beds - sliding tile
puzzle - macro puzzle - topspin puzzle - pancake
puzzle
3Sliding Tile Puzzle
- NxM grid (usually 4x4) - NxM-1 tiles and 1
blank - move any tile adjacent to the blank into
the blank at a cost of 1
1
1
4Macro Sliding Tile Puzzle
- 15-puzzle with a changed successor function
1
1
- move several tiles in a row or column at once
5Topspin Puzzle
- N-topspin has N tiles on a cyclical track - can
reverse any 4 consecutive tiles - take a cycle
followed by a rotation as a single move
1
1
6Topspin Puzzle Programming Challenges
- consider the 0 tile fixed and the turntable
movable - eliminates multiple goal states, causes
complex successor when turntable includes the
0 tile - rotating disjoint sets of tiles can be
done in any order, imposing an order reduces
successors, adds complexity
7Pancake Puzzle
- N tiles in a stack - reverse the order of any
size group of tiles starting from the first
tile
1
1
1
8Korf's IDA
- solves sliding tile puzzles - iterative
deepening with nodes cutoff if gh
depthbound - manhattan distance for heuristic
(dist from home row dist from home col) -
highly optimized - wicked fast (10 second
average on 15-puzzle)
9Korf's IDA Problems
- only solves sliding tile puzzles - no similar
heuristic for the other puzzles - some of the
optimizations that make it so fast are puzzle
dependent
10Pattern Databases
- define an abstraction which simplifies the
problem
- making some tiles identical reduces the number
of possible states - the distance from a state
to the goal is greater or equal to the
distance from the abstracted state to the
abstracted goal - thus the solution to the
abstracted state is an admissible heuristic
11Pattern Databases
- construct a lookup table of all possible
states and distances to goal for a given
abstraction - use BFS - H value of a state S is
the distance from the abstraction of S to the
abstraction of the goal - hours to build
database, seconds to solve problems - this
technique applies to all the puzzles, not just
the sliding tile puzzle - but if you're not
solving dozens or hundreds of puzzles, build
time for the table is expensive
12HIDA To Save The Day
- Take PDB approach, solve abstracted problems
on the fly with another HIDA level using
further abstractions, forming a hierarchy
13HIDA Details
- there are two recursive steps - within a
search recurse for each child of a state - for
each state starting a new HIDA search on
abstract states - the initial problem space is
referred to as the base level - abstractions
with more unique tiles are fine-grained -
abstractions with fewer unique tiles are
coarse-grained - the most coarse level is so
trivial it can be solved through brute force
or a trivial look-up table
14HIDA Cache
- solutions may be requested for a state at the
coarser levels hundreds of times - within a
search states are often reachable through
multiple paths - a cache is absolutely
necessary - coarse levels will cache a high
percentage of potential states up to 100 -
fine levels will cache fewer states, down to 1 - deciding whether to use a perfect hash and
cache, or a faster hash with collisions needs
to be decided on a puzzle by puzzle basis
15HIDA Abstractions
- it's not immediately obvious which abstraction
is best 15-puzzle abstract tiles 1-7 at
once Macro 15-puzzle same 17-topspin abstract
1-9 at once, working away from the 0 tile in
either direction 14-pancake abstract tiles 0-6
at once, from the top-down only
16HIDA Results
- solves puzzles in a few minutes, instead of
seconds, but no table to build
- but the cache doesn't need to be cleared
between problems since the goal doesn't change
17HIDA Multiple Abstractions
- can have several abstractions at a level and
max the results (and idea from PDB)
18HIDA Multiple Abstractions
- each of the 4 abstractions abstracts more tiles
at once than the first level of the simple
chain of abstractions - together use the same
amount of cache space as the simple chain -
15-puzzle average run time drops by 81 - macro
15-puzzle average run time drops by 33 - pancake
average rises using a particular
multi-abstraction, unless we don't clear the
cache between problems then the average drops
(weird) - 4 dumb heuristics can be better than 1
smart heuristic
19HIDA Custom Abstractions
- may not be the case that each problem performs
best with the same abstraction - we can create
custom abstractions derived from the initial
state Manhattan abstraction - find the
manhattan distance for each tile - abstract the
first seven tiles with the lowest manhattan
distance - each subsequent level abstracts one
more tile with the next lowest distance - 85
less cpu time on 15-puzzle - 25 less cpu time on
macro 15-puzzle
20HIDA Custom Abstractions Problem
- non-trivial to create custom abstraction
methods - similar to creating a heuristic -
topspin custom abstraction performed marginally
better than the simple chain - no good pancake
custom abstraction discovered
21HIDA In Summary
- iterative deepening with a simplified problem
for a heuristic - solve simplified problems
with HIDA - better than a PDB for solving few
problems - abstractions are easy to make, but
crafting an efficient one is hit and miss -
custom abstractions can also be effective, but
are more difficult to craft
22Last Slide, Yay
Thanks go to Rob Holte Brian Tanner
AICML Questions?