All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 >:
Inheritance graph
[legend]
Collaboration diagram for osl::move_probability::PatternBase< TestPromotable >:
Collaboration graph
[legend]

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 512 of file move_probability/feature.h.

Member Enumeration Documentation

template<bool TestPromotable>
anonymous enum
Enumerator
PromotionSize 
DIM 

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

Constructor & Destructor Documentation

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

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

Member Function Documentation

template<bool TestPromotable>
double osl::move_probability::PatternBase< TestPromotable >::match ( const StateInfo state,
const MoveInfo info,
int  offset,
const double *  w 
) const
inlinevirtual
template<bool TestPromotable>
static std::string osl::move_probability::PatternBase< TestPromotable >::name ( int  x,
int  y 
)
inlinestatic

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

Member Data Documentation

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

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

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

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


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