Energy converted to sum of squares, only normalized for gray; LOTS of Hungarian stuff... still attempting an improvement for finding min, but obviously overlooking how it can get invalidated