Simple clustering algorithm added to solver.py wiht analysis function