Skip to content

Commit

Permalink
Rename classes from GoUct to Go after move to this module
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.code.sf.net/p/fuego/code/trunk@2029 2e953b5c-c64d-0410-be54-f773e93e544c
  • Loading branch information
mmueller65 committed May 23, 2016
1 parent d27633e commit 16444af
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions go/GoAdditiveKnowledge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

//----------------------------------------------------------------------------

GoUctAdditiveKnowledgeParam::GoUctAdditiveKnowledgeParam()
GoAdditiveKnowledgeParam::GoAdditiveKnowledgeParam()
{ }

GoUctAdditiveKnowledgeParam::~GoUctAdditiveKnowledgeParam()
GoAdditiveKnowledgeParam::~GoAdditiveKnowledgeParam()
{ }

//----------------------------------------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions go/GoAdditiveKnowledge.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};


Expand Down Expand Up @@ -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)
{ }

Expand All @@ -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;
}
Expand Down
12 changes: 6 additions & 6 deletions go/GoPattern3x3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ int MinEdgeCode(const GoBoard& bd, SgPoint p)
}

void PrintVector(const std::vector<int>& codes,
SgBWArray<GoPattern3x3::GoUctEdgePatternTable>& edgeTable)
SgBWArray<GoPattern3x3::GoEdgePatternTable>& edgeTable)
{
SgDebug() << "Shared: ";

Expand All @@ -442,7 +442,7 @@ void PrintVector(const std::vector<int>& codes,
}

void PrintVector(const std::vector<int>& codes,
SgBWArray<GoPattern3x3::GoUctPatternTable>& table)
SgBWArray<GoPattern3x3::GoPatternTable>& table)
{
SgDebug() << "Shared: ";

Expand Down Expand Up @@ -592,7 +592,7 @@ int GoPattern3x3::MapEdgePatternsToMinimum(EdgeCodeTable& indexCode)
return static_cast<int>(last - uniqueCode.begin());
}

void GoPattern3x3::InitEdgePatternTable(SgBWArray<GoUctEdgePatternTable>&
void GoPattern3x3::InitEdgePatternTable(SgBWArray<GoEdgePatternTable>&
edgeTable)
{
GoBoard bd(5);
Expand All @@ -611,7 +611,7 @@ void GoPattern3x3::InitEdgePatternTable(SgBWArray<GoUctEdgePatternTable>&
//ReduceEdgeSymmetry(edgeTable);
}

void GoPattern3x3::InitCenterPatternTable(SgBWArray<GoUctPatternTable>& table)
void GoPattern3x3::InitCenterPatternTable(SgBWArray<GoPatternTable>& table)
{
GoBoard bd(5);
const SgPoint p = SgPointUtil::Pt(3, 3);
Expand Down Expand Up @@ -698,14 +698,14 @@ void GoPattern3x3::TwoWay3x3Map::Init()
SG_ASSERT_EQUAL(m_centerSwapTable[m_centerSwapTable[i]], i);
}

void GoPattern3x3::ReduceCenterSymmetry(SgBWArray<GoUctPatternTable>& table)
void GoPattern3x3::ReduceCenterSymmetry(SgBWArray<GoPatternTable>& table)
{
TwoWay3x3Map m;
for (int i = 0; i < m.m_nuUnique; ++i)
PrintVector(m.m_uniqueCode[i], table); // TODO white
}

void GoPattern3x3::ReduceEdgeSymmetry(SgBWArray<GoUctEdgePatternTable>&
void GoPattern3x3::ReduceEdgeSymmetry(SgBWArray<GoEdgePatternTable>&
edgeTable)
{
boost::array<int, POWER3_5> indexCode;
Expand Down
12 changes: 6 additions & 6 deletions go/GoPattern3x3.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ namespace GoPattern3x3
static const int POWER3_8 = 3 * 3 * 3 * 3 * 3 * 3 * 3 * 3;

/** See m_edgeTable. */
typedef SgArray<PatternInfo, POWER3_5> GoUctEdgePatternTable;
typedef SgArray<PatternInfo, POWER3_5> GoEdgePatternTable;
typedef boost::array<int, POWER3_5> EdgeCodeTable;

/** See m_table. */
typedef SgArray<PatternInfo, POWER3_8> GoUctPatternTable;
typedef SgArray<PatternInfo, POWER3_8> GoPatternTable;
typedef boost::array<int, POWER3_8> CenterCodeTable;

template<class BOARD>
Expand All @@ -97,9 +97,9 @@ namespace GoPattern3x3
/** Inverse mapping for Map2x3EdgeCode */
int DecodeEdgeIndex(int index);

void InitCenterPatternTable(SgBWArray<GoUctPatternTable>& table);
void InitCenterPatternTable(SgBWArray<GoPatternTable>& table);

void InitEdgePatternTable(SgBWArray<GoUctEdgePatternTable>& edgeTable);
void InitEdgePatternTable(SgBWArray<GoEdgePatternTable>& edgeTable);

/** Utility mapping function. Warning: global array, not threadsafe */
int Map3x3CenterCode(int code, SgBlackWhite toPlay);
Expand All @@ -122,9 +122,9 @@ namespace GoPattern3x3
/** Procedural matching function - used to initialize the table. */
bool MatchAnyPattern(const GoBoard& bd, SgPoint p);

void ReduceCenterSymmetry(SgBWArray<GoUctPatternTable>& table);
void ReduceCenterSymmetry(SgBWArray<GoPatternTable>& table);

void ReduceEdgeSymmetry(SgBWArray<GoUctEdgePatternTable>& edgeTable);
void ReduceEdgeSymmetry(SgBWArray<GoEdgePatternTable>& edgeTable);

int SwapCenterColor(int code);

Expand Down
2 changes: 1 addition & 1 deletion gouct/GoUctAdditiveKnowledgeFuego.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gouct/GoUctAdditiveKnowledgeFuego.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//----------------------------------------------------------------------------

class GoUctAdditiveKnowledgeFuego
: public GoUctAdditiveKnowledgeStdProb
: public GoAdditiveKnowledgeStdProb
{
public:
/** TODO tunable constant */
Expand Down
2 changes: 1 addition & 1 deletion gouct/GoUctAdditiveKnowledgeGreenpeep.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const int NUMPATTERNS19X19 = 1<<24;

//----------------------------------------------------------------------------

class GoUctAdditiveKnowledgeParamGreenpeep: public GoUctAdditiveKnowledgeParam
class GoUctAdditiveKnowledgeParamGreenpeep: public GoAdditiveKnowledgeParam
{
private:
public:
Expand Down
4 changes: 2 additions & 2 deletions gouct/GoUctPatterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ class GoUctPatterns
const BOARD& m_bd;

/** lookup table for 8-neighborhood of a move candidate */
SgBWArray<GoPattern3x3::GoUctPatternTable> m_table;
SgBWArray<GoPattern3x3::GoPatternTable> m_table;

/** lookup table on the edge of board */
SgBWArray<GoPattern3x3::GoUctEdgePatternTable> m_edgeTable;
SgBWArray<GoPattern3x3::GoEdgePatternTable> m_edgeTable;

/** Match any of the center patterns. */
bool MatchAnyCenter(SgPoint p) const;
Expand Down
8 changes: 4 additions & 4 deletions gouct/test/GoUctAdditiveKnowledgeMultipleTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace {

//----------------------------------------------------------------------------

class Knowledge1 : public GoUctAdditiveKnowledgeStdProb
class Knowledge1 : public GoAdditiveKnowledgeStdProb
{
public:
Knowledge1(const GoBoard& bd);
Expand All @@ -31,7 +31,7 @@ class Knowledge1 : public GoUctAdditiveKnowledgeStdProb
};

Knowledge1::Knowledge1(const GoBoard& bd)
: GoUctAdditiveKnowledgeStdProb(bd)
: GoAdditiveKnowledgeStdProb(bd)
{ }

void Knowledge1::ProcessPosition(std::vector<SgUctMoveInfo>& moves)
Expand All @@ -43,7 +43,7 @@ void Knowledge1::ProcessPosition(std::vector<SgUctMoveInfo>& moves)

//----------------------------------------------------------------------------

class Knowledge2 : public GoUctAdditiveKnowledgeStdProb
class Knowledge2 : public GoAdditiveKnowledgeStdProb
{
public:
Knowledge2(const GoBoard& bd);
Expand All @@ -53,7 +53,7 @@ class Knowledge2 : public GoUctAdditiveKnowledgeStdProb
};

Knowledge2::Knowledge2(const GoBoard& bd)
: GoUctAdditiveKnowledgeStdProb(bd)
: GoAdditiveKnowledgeStdProb(bd)
{ }

void Knowledge2::ProcessPosition(std::vector<SgUctMoveInfo>& moves)
Expand Down

0 comments on commit 16444af

Please sign in to comment.