Extract possible moves and their cost.