I agree. The formula should be something like: minimize the length of the edges of every district, so that the total length (of all district edges) is as small as possible.
Exceptions should be made for political boundaries: counties, cities, etc -- so that a city or county is not split between two districts unless there is simply no way to draw the districts equally without doing so.
However, I don't know how you require every state to do it, without trampling on state's rights.
I’m thinking it’s simple geometry - every district has to be as close to a square as possible, and make the squares large enough or small enough to encompass the same number of people in each Congressional District.