Implemented the adaptation scoring function