Recreate fitness sharing algorithm according to the book