Auxilliary Tool:
A class for implementing convolutional logistic policies, which were first used in the IPOMDP domain in Butko and Movellan, 2008 (see Related Publications).
More...
#include <ConvolutionalLogisticPolicy.h>
Inherited by MOConvolutionalLogisticPolicy.
Public Member Functions | |
ConvolutionalLogisticPolicy (CvSize gridSize) | |
Constructor: Create a CLP with space allocated to hold parameters for a grid of size gridSize. | |
ConvolutionalLogisticPolicy (ConvolutionalLogisticPolicy *clpToCopy) | |
Deep Copy Constructor: Create a CLP that is identical to the one to copy. | |
virtual | ~ConvolutionalLogisticPolicy () |
Default Destructor. | |
virtual CvPoint | getFixationPoint (IplImage *currentBelief) |
Pick an appropriate point to fixate for the current belief-state (probability that the object is located at each point). | |
double | getReward (IplImage *currentBelief) |
Compute the infomax reward associated with this belief state. | |
void | setPolicy (int policyNumber) |
Tell the CLP what kind of convolution policy to use in the future. | |
void | setHeuristicPolicyParameters (double softmaxGain, double boxSize) |
Tell the CLP the shape of the convolution kernel to use. | |
Static Public Attributes | |
static const int | BOX = 1 |
static const int | GAUSSIAN = 2 |
static const int | IMPULSE = 3 |
static const int | MAX = 4 |
Friends | |
std::ostream & | operator<< (std::ostream &ofs, ConvolutionalLogisticPolicy *a) |
Write to a file. | |
std::istream & | operator>> (std::istream &ifs, ConvolutionalLogisticPolicy *a) |
Read from a file. |
Auxilliary Tool:
A class for implementing convolutional logistic policies, which were first used in the IPOMDP domain in Butko and Movellan, 2008 (see Related Publications).
Currently, only a few special cases of CLPs are implimented. In the future, we hope to have the most general case coded, along with policy-gradient based optimization methods.
The following policies are implemented:
In the CLP, the belief-image is convolved with some kernel, and then a next fixation is chosen by computing a soft-max over the convolution, and then sampling from the result. The shape of the convolution kernel can be optimized via policy gradient.
ConvolutionalLogisticPolicy::ConvolutionalLogisticPolicy | ( | CvSize | gridSize ) |
Constructor: Create a CLP with space allocated to hold parameters for a grid of size gridSize.
The default kernel is a Gaussian envelope with standard-deviation of five grid cells, and a peak value of 300. Use setPolicy() and setHeuristicPolicyParameters() after instantiating the policy to change this. Generally this is done indirectly via the MIPOMDP setPolicy() and setHeuristicPolicyParameters() functions.
ConvolutionalLogisticPolicy::~ConvolutionalLogisticPolicy | ( | ) | [virtual] |
Default Destructor.
Deallocates all memory associated with the CLP.
CvPoint ConvolutionalLogisticPolicy::getFixationPoint | ( | IplImage * | currentBelief ) | [virtual] |
Pick an appropriate point to fixate for the current belief-state (probability that the object is located at each point).
In the CLP, the belief-image is convolved with some kernel, and then a next fixation is chosen by computing a soft-max over the convolution, and then sampling from the result.
currentBelief | The current posterior probability estimate that the object we are searching for is located in each respective grid-cell. This belief is maintained and updated by an MIPOMDP object. |
double ConvolutionalLogisticPolicy::getReward | ( | IplImage * | currentBelief ) |
Compute the infomax reward associated with this belief state.
currentBelief | The current posterior probability estimate that the object we are searching for is located in each respective grid-cell. This belief is maintained and updated by an MIPOMDP object. |
void ConvolutionalLogisticPolicy::setHeuristicPolicyParameters | ( | double | softmaxGain, |
double | boxSize | ||
) |
Tell the CLP the shape of the convolution kernel to use.
softmaxGain | Has the following effect for:
|
boxSize | Has the following effect for:
|
void ConvolutionalLogisticPolicy::setPolicy | ( | int | policyNumber ) |
Tell the CLP what kind of convolution policy to use in the future.
policyNumber | Must be one of: |
const int ConvolutionalLogisticPolicy::BOX = 1 [static] |
ConvolutionalLogisticPolicy::BOX - Use box-filter for convolution kernel.
const int ConvolutionalLogisticPolicy::GAUSSIAN = 2 [static] |
ConvolutionalLogisticPolicy::GAUSSIAN - Use gaussian-envelope for convolution kernel.
const int ConvolutionalLogisticPolicy::IMPULSE = 3 [static] |
ConvolutionalLogisticPolicy::IMPULSE - Use impulse response for convolution kernel.
const int ConvolutionalLogisticPolicy::MAX = 4 [static] |
ConvolutionalLogisticPolicy::MAX - Use infinite-impulse response for convolution kernel (fixate mode of belief-distribution).