Changed the evolutionary algorithm loop a bit, added using average_mar