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

#import <CogitoAgent.h>

Inheritance diagram for CogitoAgent:
Lemming GameObject DecisionTreeAgent QLearningAgent ShortestRouteAgent

Public Member Functions

(Action- selectAction:
(Action- chooseRandomAction:
(CCArray *) - calculateAvailableActions:
(State *) - getStateForGameObject:

Protected Attributes

BOOL learningMode

Detailed Description

Definition at line 14 of file CogitoAgent.h.


Member Function Documentation

- (CCArray *) calculateAvailableActions: (State*)  _state

Returns a list of actions available for the agent to take only needs to be called once per-state

Parameters:
thecurrent object type
Returns:
an array of actions

Definition at line 73 of file CogitoAgent.m.

- (Action) chooseRandomAction: (CCArray*)  _actions

Randomly selects an action from the options

Parameters:
theavailable options
Returns:
the action

Definition at line 57 of file CogitoAgent.m.

Looks up the state for the passed object

Parameters:
objectto search for
Returns:
the matching state

Definition at line 105 of file CogitoAgent.m.

- (Action) selectAction: (State*)  _state

Decides which action to take based on knowledgebase

Parameters:
theobject colliding with
Returns:
the action to take

Definition at line 40 of file CogitoAgent.m.


Field Documentation

- (BOOL) learningMode [protected]

Definition at line 17 of file CogitoAgent.h.


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