Machine Learning and Agent-based Computing
by Zhimin Ding and Li Liu


Listing One
typedef state int;
typefef action int;

class MLEngine {
public:
    MLEngine(int dim_sate, int dim_action, int dim_order);
    ~MLEngine();

    void SetGoal(state);       //one of the states is assigned as the goal
    void SetGoal(state*, int); //when multiple states are assigned as the goal
    action Perform(state);     //0--explore, 1--associate, 2--optimize and perform
    void SetPhase(int);

    void Associate();
    double GetAssociateEntropy();

    void Optimize();
    double GetOptimizeEntropy();
    double GetGoalProbability();

    void SetAssociationRate(double r);  //0<r<1
    void SetOptimizationRate(double r); //0<r<1
}








1


