- or download this
sub sortIndividuals {
my ($self, $list) = @_;
return [sort {$b->score <=> $a->score} map {$_->score;$_} @$list];
}
- or download this
sort {$b->score <=> $a->score}
- or download this
sort {$b->score <=> $a->score} map {$_->score;$_}
- or download this
#!/usr/bin/perl
use strict;
...
## show_individual($ga->getFittest);
return 0; # do not terminate
}
- or download this
my $ga = AI::Genetic->new
(
...
);
$ga->init([map {[0,100]} @CLASSES]);
- or download this
sub make_config {
my (@genes) = @_;
...
}
$config;
}
- or download this
--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
map{y/X_/\n /;print}map{pop@$_}@/for@/