Sunday, September 13, 2015

Action iteration controller - Perkun 0.0.9.

You may have noticed that the feature described recently in Perkun ( 0.0.9 allows breaking the computation in any moment. This ability is not so great, though, if we process the actions in a strict, a-priori defined order. A new class has been introduced to relax this order. It is called action_iteration_controller. It is derived from class_with_tracking, and so can benefit of its stack of trackers. It contains three virtual functions:

virtual std::list<action*>::const_iterator get_action_iteration_begin() const;

virtual void action_iteration_increment(std::list<action*>::const_iterator & target) const;

virtual bool get_action_iteration_terminated(const std::list<action*>::const_iterator & i) const;

It is inherited by the class optimizer. Whenever the get_optimal_action iterates over the actions it uses these three functions. In your own programs you are free to override them providing a new (possibly random) order of the action iteration. And you can base these new orders (permutations of actions) on the knowledge stored in the stack of trackers!

No comments:

Post a Comment