My Project
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
osl::move_probability::PatternBase< TestPromotable > Class Template Reference

#include <feature.h>

Inheritance diagram for osl::move_probability::PatternBase< TestPromotable >:
osl::move_probability::PatternCommon osl::move_probability::Feature

Public Types

enum  { PromotionSize = TestPromotable ? 3 : 1 , DIM = PromotionSize * OneDim }
 
- Public Types inherited from osl::move_probability::PatternCommon
enum  {
  SupportSize = PTYPE_SIZE , AttackSize = PTYPE_SIZE , AttackBase = SupportSize , EffectSize = 9 ,
  EffectBase = AttackBase+AttackSize , OpKingSize = 4 , OpKingBase = EffectBase+EffectSize , MyKingSize = 3 ,
  MyKingBase = OpKingBase+OpKingSize , PromotionSize = 2 , PromotionBase = MyKingBase+MyKingSize , PinOpenSize = 4 ,
  PinOpenBase = PromotionBase + PromotionSize , LastToSize = 4 , LastToBase = PinOpenBase + PinOpenSize , LastEffectChangedSize = 6 ,
  LastEffectChangedBase = LastToBase + LastToSize , SquareDim = LastEffectChangedBase + LastEffectChangedSize , PatternCacheSize = PTYPEO_SIZE*SquareDim , OneDim = PTYPE_SIZE*PatternCacheSize
}
 

Public Member Functions

 PatternBase (int x, int y)
 
double match (const StateInfo &state, const MoveInfo &info, int offset, const double *w) const
 
- Public Member Functions inherited from osl::move_probability::PatternCommon
 PatternCommon (const std::string &name, int dim)
 
double addOne (const StateInfo &state, int offset, const double *w, Square position) const
 
- Public Member Functions inherited from osl::move_probability::Feature
 Feature (std::string n, size_t d)
 
virtual ~Feature ()
 
std::string name () const
 
size_t dimension () const
 

Static Public Member Functions

static std::string name (int x, int y)
 
- Static Public Member Functions inherited from osl::move_probability::PatternCommon
static void updateCache (StateInfo &info)
 
- Static Public Member Functions inherited from osl::move_probability::Feature
static int classifyEffect9 (const NumEffectState &state, Player player, Square to)
 

Private Attributes

int dx
 
int black_dy
 

Detailed Description

template<bool TestPromotable>
class osl::move_probability::PatternBase< TestPromotable >

Definition at line 510 of file move_probability/feature.h.

Member Enumeration Documentation

◆ anonymous enum

template<bool TestPromotable>
anonymous enum
Enumerator
PromotionSize 
DIM 

Definition at line 514 of file move_probability/feature.h.

Constructor & Destructor Documentation

◆ PatternBase()

template<bool TestPromotable>
osl::move_probability::PatternBase< TestPromotable >::PatternBase ( int  x,
int  y 
)
inline

Definition at line 518 of file move_probability/feature.h.

Member Function Documentation

◆ match()

template<bool TestPromotable>
double osl::move_probability::PatternBase< TestPromotable >::match ( const StateInfo state,
const MoveInfo info,
int  offset,
const double *  w 
) const
inlinevirtual

◆ name()

template<bool TestPromotable>
static std::string osl::move_probability::PatternBase< TestPromotable >::name ( int  x,
int  y 
)
inlinestatic

Definition at line 550 of file move_probability/feature.h.

Member Data Documentation

◆ black_dy

template<bool TestPromotable>
int osl::move_probability::PatternBase< TestPromotable >::black_dy
private

◆ dx

template<bool TestPromotable>
int osl::move_probability::PatternBase< TestPromotable >::dx
private

The documentation for this class was generated from the following file: