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

    AI::Evolve::Befunge::Critter::Result - results object

DESCRIPTION

This object stores the fate of a critter. It stores whether it died or lived, what the error message was (if it died), whether it won, and if it was playing a board game, whether it choose a move. It also stores some statistical information about how many moves it made, and stuff like that.

CONSTRUCTOR

new

    Result->new();

Create a new Result object.

METHODS

Automatically generated accessor methods exist for the following fields:

choice

Indicates the choice of positions to play (for board game physics engines).

died

Integer value, true if the critter died.

fate

String value, indicates the error message returned by eval, to indicate the reason for a critter's death.

name

Name of the critter, according to its blueprint.

score

Integer value supplied by the Physics engine, indicates how well it thought the critter did.

stats

Some additional statistics generated by the run_board_game method in Physics.pm.

tokens

Integer value indicating how much "currency" the critter had left over. Higher numbers mean the critter consumed fewer resources.

won

Integer value, true if the critter won (as determined by the Physics engine).

These values may be set using the accessors (like: $result->died(1) ), or they may be initialized by the constructor (like: Result->new(died => 1) ).