All Data Structures Files Functions Variables Enumerations Enumerator Properties Defines
Public Member Functions | Static Public Member Functions | Protected Attributes
AgentStats Class Reference

#import <AgentStats.h>

Public Member Functions

(void) - addEpisodeWithLength:andActions:learningMode:
(void) - addEpisode
(int) - averageTimeLearning
(int) - averageTimeNonLearning
(int) - averageActionsLearning
(int) - averageActionsNonLearning
(int) - episodesCompleted
(void) - clearTempData

Static Public Member Functions

(AgentStats *) + sharedAgentStats

Protected Attributes

int episodesCompleted
CCArray * learningLengths
CCArray * nonLearningLengths
CCArray * learningActions
CCArray * nonLearningActions

Detailed Description

Definition at line 13 of file AgentStats.h.


Member Function Documentation

- (void) addEpisode

Increments the episode counter

Definition at line 88 of file AgentStats.m.

- (void) addEpisodeWithLength: (int)  _time
andActions: (int)  _actions
learningMode: (BOOL)  _learning 

Adds an episode to the correct array for later analysis

Parameters:
timetaken
actionsperformed
whetherstill learning

Definition at line 99 of file AgentStats.m.

Calculates the average actions taken when learning

Returns:
the average

Definition at line 149 of file AgentStats.m.

Calculates the average actions taken when not learning

Returns:
the average

Definition at line 163 of file AgentStats.m.

Calculates the average of all of the learning times

Returns:
the average

Definition at line 121 of file AgentStats.m.

Calculates the average of all of the non-learning times

Returns:
the average

Definition at line 135 of file AgentStats.m.

- (void) clearTempData

Resets the temporary variables

Definition at line 184 of file AgentStats.m.

Returns the AgentStats instance

Returns:
the instance

Definition at line 74 of file AgentStats.m.


Field Documentation

- (int) episodesCompleted [protected]

Returns how many episodes have been completed

Definition at line 16 of file AgentStats.h.

- (CCArray*) learningActions [protected]

Definition at line 19 of file AgentStats.h.

- (CCArray*) learningLengths [protected]

Definition at line 17 of file AgentStats.h.

- (CCArray*) nonLearningActions [protected]

Definition at line 20 of file AgentStats.h.

- (CCArray*) nonLearningLengths [protected]

Definition at line 18 of file AgentStats.h.


The documentation for this class was generated from the following files: