Work Functions
Function on configurations: Dynamic programming
The optimal cost of being there then