3 #ifndef OSL_MOVE_PROBABILITY_FEATURESET_H 4 #define OSL_MOVE_PROBABILITY_FEATURESET_H 9 #include <boost/ptr_container/ptr_vector.hpp> 10 #include <boost/scoped_array.hpp> 15 namespace move_probability
39 bool load(
const char *base_filename,
double *weights)
const;
40 bool load_binary(
const char *base_filename,
double *weights)
const;
45 WeightedMoveVector& out,
const double *weights)
const;
52 static boost::scoped_array<double>
weights, tactical_weights;
59 static bool healthCheck();
63 int logProbTakeBack(
const StateInfo& state,
Move target)
const;
64 int logProbSeePlus(
const StateInfo& state,
Move target)
const;
68 bool setUp(
bool verbose=
false);
69 bool ok()
const {
return initialized; }
71 int tacticalLogProb(
int offset,
double sum)
const;
double matchLight(const StateInfo &, Move, const double *weights) const
std::pair< double, Move > WeightedMove
std::vector< int > offsets
double matchNoExp(const StateInfo &, Move, const double *weights) const
static void ratingToLogProb(const WeightedMoveVector &rating, double sum, MoveLogProbVector &out)
void generateLogProb(const StateInfo &state, MoveLogProbVector &out, const double *weights) const
static boost::scoped_array< double > weights
void pushBack(Feature *, bool light=false)
bool load_binary(const char *base_filename, double *weights) const
void showSummary(const double *weights) const
double matchExp(const StateInfo &, Move, const double *weights) const
FixedCapacityVector< WeightedMove, Move::MaxUniqMoves > WeightedMoveVector
double generateRating(const StateInfo &state, WeightedMoveVector &out, const double *weights) const
bool load(const char *base_filename, double *weights) const
void analyze(const StateInfo &state, Move move, const double *weights) const
std::vector< int > light_features
boost::ptr_vector< Feature > features