Transfemoral amputees modify their gait in order to compensate for their prosthetic leg. This compensation causes harmful secondary physical conditions due to an over-dependence on the intact limb and deficiencies of the prosthesis. Even with more advanced prostheses, amputees still have to alter their gait to compensate for the prosthesis. We present a novel way to quantify how much an amputee has to compensate for a prosthetic leg. We train a newly-developed prosthetic leg testing robot to walk with a prosthesis using an evolutionary algorithm called biogeography-based optimization (BBO). The robot is initially commanded to follow able-bodied hip and thigh trajectories, and BBO then modifies these reference inputs. We adjust the reference inputs to minimize the error between the ground reaction force (GRF) of able-bodied gait data, and that of the robot while walking with the prosthesis. Experimental results show a 62% decrease in the GRF error, effectively demonstrating the robot\u27s compensation for the prosthesis