Implemented evaluation function for the simulation