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

#import <QState.h>

Inheritance diagram for QState:
State

Public Member Functions

(id) - initStateForObject:withReward:
(float) - calculateMaxQValue
(Action- getOptimumAction
(float) - getQValueForAction:
(void) - setQValue:forAction:
(float) - getReward

Protected Attributes

float reward

Detailed Description

Definition at line 15 of file QState.h.


Member Function Documentation

- (float) calculateMaxQValue

Returns the max possible Q value for the passed state

Parameters:
state
Returns:
the max Q value

Definition at line 72 of file QState.m.

Checks all of the possible actions, and selects the one with the highest Q-value

Returns:
the optimum action

Reimplemented from State.

Definition at line 45 of file QState.m.

- (float) getQValueForAction: (Action _action

Looks up the Q-value for the action

Parameters:
actionto look up
Returns:
the Q-value

Definition at line 94 of file QState.m.

- (float) getReward

Returns the reward

Returns:
the reward

Definition at line 173 of file QState.m.

- (id) initStateForObject: (GameObject*)  _object
withReward: (float)  _reward 

Initialises the state

Returns:
self

Definition at line 27 of file QState.m.

- (void) setQValue: (float)  _qValue
forAction: (Action _action 

Sets the Q-value for the action

Parameters:
actionto look up
Returns:
the Q-value

Definition at line 114 of file QState.m.


Field Documentation

- (float) reward [protected]

Definition at line 18 of file QState.h.


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