A generalized public goods game with coupling of individual ability and project benefit