AI-Pathfinding-OptimizeMultiple
view release on metacpan or search on metacpan
- See https://rt.cpan.org/Ticket/Display.html?id=121485 .
- Thanks to Toby Inkster.
v0.0.14 2017-05-01
- Convert dist.ini to use the @SHLOMIF bundle.
- Fix a bug where a pdl was passed instead of an int.
- See https://rt.cpan.org/Ticket/Display.html?id=121478
- Thanks to Slaven Rezic and Toby Inkster.
v0.0.13 2016-04-20
- Improve the exception handling due to a non-Exception::Class error:
- http://www.cpantesters.org/cpan/report/f631b3e2-03b5-11e6-b1a3-5205ef11d1c8
- Thanks also to the example code in
https://metacpan.org/pod/Exception::Class .
- Add Test::Kwalitee::Extra.
v0.0.12 2015-03-26
- Add the stats_factors option to the
lib/AI/Pathfinding/OptimizeMultiple.pm constructor.
- Contains some factors to normalise the iters of specific scans.
- Add the --stats-factors option to ::CmdLine.
lib/AI/Pathfinding/OptimizeMultiple.pm view on Meta::CPAN
my $num_solved_in_iter = 0;
my $selected_scan_idx;
# If no boards were solved, then try with a larger quota
while ( $num_solved_in_iter == 0 )
{
my $q_more = $self->_get_next_quota();
if ( !defined($q_more) )
{
AI::Pathfinding::OptimizeMultiple::Error::OutOfQuotas->throw(
error => "No q_more", );
}
$iters_quota += $q_more;
my $iters = $self->_scans_data()->slice(":,:,0");
my $solved = ( ( $iters <= $iters_quota ) & ( $iters > 0 ) );
my $num_moves = $self->_scans_data->slice(":,:,2");
my $solved_moves = $solved * $num_moves;
my $solved_moves_sums = _my_sum_over($solved_moves);
lib/AI/Pathfinding/OptimizeMultiple.pm view on Meta::CPAN
my $num_solved_in_iter = 0;
my $selected_scan_idx;
# If no boards were solved, then try with a larger quota
while ( $num_solved_in_iter == 0 )
{
my $q_more = $self->_get_next_quota();
if ( !defined($q_more) )
{
AI::Pathfinding::OptimizeMultiple::Error::OutOfQuotas->throw(
error => "No q_more", );
}
$iters_quota += $q_more;
my $iters = $self->_scans_data()->slice(":,:,0");
my $solved = ( ( $iters <= $iters_quota ) & ( $iters > 0 ) );
my $num_moves = $self->_scans_data->slice(":,:,2");
my $solved_moves = $solved * $num_moves;
my $solved_moves_maxima = $solved_moves->maximum()->slice(":,(0),(0)");
lib/AI/Pathfinding/OptimizeMultiple.pm view on Meta::CPAN
my $num_solved_in_iter = 0;
my $selected_scan_idx;
# If no boards were solved, then try with a larger quota
while ( $num_solved_in_iter == 0 )
{
my $q_more = $self->_get_next_quota();
if ( !defined($q_more) )
{
AI::Pathfinding::OptimizeMultiple::Error::OutOfQuotas->throw(
error => "No q_more" );
}
$iters_quota += $q_more;
( undef, $num_solved_in_iter, undef, $selected_scan_idx ) =
PDL::minmaximum(
PDL::sumover(
( $self->_scans_data() <= $iters_quota ) &
( $self->_scans_data() > 0 )
)
( run in 0.329 second using v1.01-cache-2.11-cpan-65fba6d93b7 )