diff --git a/go/GoAdditiveKnowledge.cpp b/go/GoAdditiveKnowledge.cpp index d3f1edf5..fa09277c 100644 --- a/go/GoAdditiveKnowledge.cpp +++ b/go/GoAdditiveKnowledge.cpp @@ -8,10 +8,10 @@ //---------------------------------------------------------------------------- -GoUctAdditiveKnowledgeParam::GoUctAdditiveKnowledgeParam() +GoAdditiveKnowledgeParam::GoAdditiveKnowledgeParam() { } -GoUctAdditiveKnowledgeParam::~GoUctAdditiveKnowledgeParam() +GoAdditiveKnowledgeParam::~GoAdditiveKnowledgeParam() { } //---------------------------------------------------------------------------- diff --git a/go/GoAdditiveKnowledge.h b/go/GoAdditiveKnowledge.h index b9fd9fd0..f9cc32ec 100644 --- a/go/GoAdditiveKnowledge.h +++ b/go/GoAdditiveKnowledge.h @@ -43,12 +43,12 @@ enum GoKnowledgeCombinationType /** Base class for predictor param; constructed once and shared by threads. */ -class GoUctAdditiveKnowledgeParam +class GoAdditiveKnowledgeParam { public: - GoUctAdditiveKnowledgeParam(); + GoAdditiveKnowledgeParam(); - virtual ~GoUctAdditiveKnowledgeParam(); + virtual ~GoAdditiveKnowledgeParam(); }; @@ -103,10 +103,10 @@ inline float GoAdditiveKnowledge::RaiseToMinValue(float value) const //---------------------------------------------------------------------------- /** Utility class to provide a standard probability-based additive predictor */ -class GoUctAdditiveKnowledgeStdProb : public GoAdditiveKnowledge +class GoAdditiveKnowledgeStdProb : public GoAdditiveKnowledge { public: - GoUctAdditiveKnowledgeStdProb(const GoBoard& bd) + GoAdditiveKnowledgeStdProb(const GoBoard& bd) : GoAdditiveKnowledge(bd) { } @@ -117,12 +117,12 @@ class GoUctAdditiveKnowledgeStdProb : public GoAdditiveKnowledge }; //---------------------------------------------------------------------------- -inline float GoUctAdditiveKnowledgeStdProb::MinValue() const +inline float GoAdditiveKnowledgeStdProb::MinValue() const { return 0.0001f; } -inline GoPredictorType GoUctAdditiveKnowledgeStdProb::PredictorType() const +inline GoPredictorType GoAdditiveKnowledgeStdProb::PredictorType() const { return GO_PRED_TYPE_PROBABILITY_BASED; } diff --git a/go/GoPattern3x3.cpp b/go/GoPattern3x3.cpp index 59dfaa68..a8c0ab26 100644 --- a/go/GoPattern3x3.cpp +++ b/go/GoPattern3x3.cpp @@ -426,7 +426,7 @@ int MinEdgeCode(const GoBoard& bd, SgPoint p) } void PrintVector(const std::vector& codes, - SgBWArray& edgeTable) + SgBWArray& edgeTable) { SgDebug() << "Shared: "; @@ -442,7 +442,7 @@ void PrintVector(const std::vector& codes, } void PrintVector(const std::vector& codes, - SgBWArray& table) + SgBWArray& table) { SgDebug() << "Shared: "; @@ -592,7 +592,7 @@ int GoPattern3x3::MapEdgePatternsToMinimum(EdgeCodeTable& indexCode) return static_cast(last - uniqueCode.begin()); } -void GoPattern3x3::InitEdgePatternTable(SgBWArray& +void GoPattern3x3::InitEdgePatternTable(SgBWArray& edgeTable) { GoBoard bd(5); @@ -611,7 +611,7 @@ void GoPattern3x3::InitEdgePatternTable(SgBWArray& //ReduceEdgeSymmetry(edgeTable); } -void GoPattern3x3::InitCenterPatternTable(SgBWArray& table) +void GoPattern3x3::InitCenterPatternTable(SgBWArray& table) { GoBoard bd(5); const SgPoint p = SgPointUtil::Pt(3, 3); @@ -698,14 +698,14 @@ void GoPattern3x3::TwoWay3x3Map::Init() SG_ASSERT_EQUAL(m_centerSwapTable[m_centerSwapTable[i]], i); } -void GoPattern3x3::ReduceCenterSymmetry(SgBWArray& table) +void GoPattern3x3::ReduceCenterSymmetry(SgBWArray& table) { TwoWay3x3Map m; for (int i = 0; i < m.m_nuUnique; ++i) PrintVector(m.m_uniqueCode[i], table); // TODO white } -void GoPattern3x3::ReduceEdgeSymmetry(SgBWArray& +void GoPattern3x3::ReduceEdgeSymmetry(SgBWArray& edgeTable) { boost::array indexCode; diff --git a/go/GoPattern3x3.h b/go/GoPattern3x3.h index 31129331..1cede387 100644 --- a/go/GoPattern3x3.h +++ b/go/GoPattern3x3.h @@ -78,11 +78,11 @@ namespace GoPattern3x3 static const int POWER3_8 = 3 * 3 * 3 * 3 * 3 * 3 * 3 * 3; /** See m_edgeTable. */ - typedef SgArray GoUctEdgePatternTable; + typedef SgArray GoEdgePatternTable; typedef boost::array EdgeCodeTable; /** See m_table. */ - typedef SgArray GoUctPatternTable; + typedef SgArray GoPatternTable; typedef boost::array CenterCodeTable; template @@ -97,9 +97,9 @@ namespace GoPattern3x3 /** Inverse mapping for Map2x3EdgeCode */ int DecodeEdgeIndex(int index); - void InitCenterPatternTable(SgBWArray& table); + void InitCenterPatternTable(SgBWArray& table); - void InitEdgePatternTable(SgBWArray& edgeTable); + void InitEdgePatternTable(SgBWArray& edgeTable); /** Utility mapping function. Warning: global array, not threadsafe */ int Map3x3CenterCode(int code, SgBlackWhite toPlay); @@ -122,9 +122,9 @@ namespace GoPattern3x3 /** Procedural matching function - used to initialize the table. */ bool MatchAnyPattern(const GoBoard& bd, SgPoint p); - void ReduceCenterSymmetry(SgBWArray& table); + void ReduceCenterSymmetry(SgBWArray& table); - void ReduceEdgeSymmetry(SgBWArray& edgeTable); + void ReduceEdgeSymmetry(SgBWArray& edgeTable); int SwapCenterColor(int code); diff --git a/gouct/GoUctAdditiveKnowledgeFuego.cpp b/gouct/GoUctAdditiveKnowledgeFuego.cpp index fd7eecf6..216b6341 100644 --- a/gouct/GoUctAdditiveKnowledgeFuego.cpp +++ b/gouct/GoUctAdditiveKnowledgeFuego.cpp @@ -18,7 +18,7 @@ const float GoUctAdditiveKnowledgeFuego::VALUE_MULTIPLIER = 4.0f; //---------------------------------------------------------------------------- GoUctAdditiveKnowledgeFuego::GoUctAdditiveKnowledgeFuego(const GoBoard& bd) - : GoUctAdditiveKnowledgeStdProb(bd) + : GoAdditiveKnowledgeStdProb(bd) { } // m_raveValue is a SgUctValue which is double by default, but holds diff --git a/gouct/GoUctAdditiveKnowledgeFuego.h b/gouct/GoUctAdditiveKnowledgeFuego.h index fe729231..8ff9e531 100644 --- a/gouct/GoUctAdditiveKnowledgeFuego.h +++ b/gouct/GoUctAdditiveKnowledgeFuego.h @@ -16,7 +16,7 @@ //---------------------------------------------------------------------------- class GoUctAdditiveKnowledgeFuego - : public GoUctAdditiveKnowledgeStdProb + : public GoAdditiveKnowledgeStdProb { public: /** TODO tunable constant */ diff --git a/gouct/GoUctAdditiveKnowledgeGreenpeep.h b/gouct/GoUctAdditiveKnowledgeGreenpeep.h index 55697265..1d577ae8 100644 --- a/gouct/GoUctAdditiveKnowledgeGreenpeep.h +++ b/gouct/GoUctAdditiveKnowledgeGreenpeep.h @@ -26,7 +26,7 @@ const int NUMPATTERNS19X19 = 1<<24; //---------------------------------------------------------------------------- -class GoUctAdditiveKnowledgeParamGreenpeep: public GoUctAdditiveKnowledgeParam +class GoUctAdditiveKnowledgeParamGreenpeep: public GoAdditiveKnowledgeParam { private: public: diff --git a/gouct/GoUctPatterns.h b/gouct/GoUctPatterns.h index aecb1f78..1ff0896b 100644 --- a/gouct/GoUctPatterns.h +++ b/gouct/GoUctPatterns.h @@ -118,10 +118,10 @@ class GoUctPatterns const BOARD& m_bd; /** lookup table for 8-neighborhood of a move candidate */ - SgBWArray m_table; + SgBWArray m_table; /** lookup table on the edge of board */ - SgBWArray m_edgeTable; + SgBWArray m_edgeTable; /** Match any of the center patterns. */ bool MatchAnyCenter(SgPoint p) const; diff --git a/gouct/test/GoUctAdditiveKnowledgeMultipleTest.cpp b/gouct/test/GoUctAdditiveKnowledgeMultipleTest.cpp index 51915759..1160488c 100644 --- a/gouct/test/GoUctAdditiveKnowledgeMultipleTest.cpp +++ b/gouct/test/GoUctAdditiveKnowledgeMultipleTest.cpp @@ -21,7 +21,7 @@ namespace { //---------------------------------------------------------------------------- -class Knowledge1 : public GoUctAdditiveKnowledgeStdProb +class Knowledge1 : public GoAdditiveKnowledgeStdProb { public: Knowledge1(const GoBoard& bd); @@ -31,7 +31,7 @@ class Knowledge1 : public GoUctAdditiveKnowledgeStdProb }; Knowledge1::Knowledge1(const GoBoard& bd) -: GoUctAdditiveKnowledgeStdProb(bd) +: GoAdditiveKnowledgeStdProb(bd) { } void Knowledge1::ProcessPosition(std::vector& moves) @@ -43,7 +43,7 @@ void Knowledge1::ProcessPosition(std::vector& moves) //---------------------------------------------------------------------------- -class Knowledge2 : public GoUctAdditiveKnowledgeStdProb +class Knowledge2 : public GoAdditiveKnowledgeStdProb { public: Knowledge2(const GoBoard& bd); @@ -53,7 +53,7 @@ class Knowledge2 : public GoUctAdditiveKnowledgeStdProb }; Knowledge2::Knowledge2(const GoBoard& bd) -: GoUctAdditiveKnowledgeStdProb(bd) +: GoAdditiveKnowledgeStdProb(bd) { } void Knowledge2::ProcessPosition(std::vector& moves)