DCOLLINS-ANN-Locals

 view release on metacpan or  search on metacpan

t/02_network_basic.t  view on Meta::CPAN


# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.

$network=new DCOLLINS::ANN::Robot ();

ok(defined $network, "new() works");
ok($network->isa("AI::ANN"), "Right class");
ok($network->isa("DCOLLINS::ANN::Robot"), "Right class");

ok($out=$network->execute([1]), "executed and still alive");
is($#{$out}, 4, "execute() output for a single neuron is the right length");

($inputs, $neurons, $outputs) = $network->get_state();

is($#{$inputs}, 0, "get_state inputs is correct length");
is($#{$neurons}, 64, "get_state neurons is correct length");
is($#{$outputs}, 4, "get_state outputs is correct length");

$evolver=new AI::ANN::Evolver ({});



( run in 1.517 second using v1.01-cache-2.11-cpan-39bf76dae61 )