The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DCOLLINS::ANN::SimWorld - a simulated world for robots to play in

VERSION

version 0.004

SYNOPSIS

METHODS

new

DCOLLINS::ANN::SimWorld::new( )

Creates a DCOLLINS::ANN::SimWorld object ready to test robots.

Has many parameters. Important may be fitness_function, a coderef to a function that takes age, total_pain, total_battery, battery_used, pain_given, weights, uniq_squares For standardization, these are the parameters that SimWorld will pass to the network: Current battery power (0-1) Current pain value (0-1) Differential battery power ((-1)-1) Differential pain value ((-1)-1) Proximity readings, -45, 0, 45 degrees (0-1) Current X location (0-1) Current Y location (0-1) Currently facing: N, S, E, W (0-1)

These are the parameters that SimWorld will expect as outputs from the network: Rotate L Rotate R Forwards Reverse Stop The largest value will be accepted. If no output is greater than 1, SimWorld will interpret as a stop.

run_robot

$environment->run_robot($robot);

Returns a hashref with the following information: fitness => Num age => Num total_pain => Num total_battery => Num battery_used => Num pain_given => Num

AUTHOR

Dan Collins <dcollin1@stevens.edu>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by Dan Collins.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007