package Evo::Immune::MetaFunction;

use parent 'Evo:::GA::MetaFunction';

sub new {
	my ($class, $func) = @_;

	my $self = $class->SUPER::new($func);
}

### (partial) fitness function, sum of differ between antigens and antibodies
sub fitness_M0 ($antigen_genome, $antibody_genome, @args)
	my $sum = 0;

	for (my $i = 0; $i < scalar $antigen_genome->{genes}; $i++) {
		if ($antigen_genome->{genes}[$i] == $antibody_genome->{genes}[$i]) {
			$sum ++;
		}	
	}	
	
	return $sum;
}
1;
