Implemented fitness calculation and mutation