dropped non-deterministic tests
reduced method scope
factor memoization upwards
added type annotation for intellij
accumulate best solutions by fitness