tables.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
tables.cc
Go to the documentation of this file.
1 #include "osl/ptype.h"
2 #include "osl/direction.h"
3 #include "osl/effect/liberty8Table.h"
4 #include "osl/pieceTable.h"
5 #include "osl/hash/hashKey.h"
6
7 #include "osl/move_generator/addEffect8Table.h"
8 #include "osl/progress/ptypeProgress.h"
9 #include "osl/progress/effect5x3Table.h"
10 #include "osl/pathEncoding.h"
11 #include "osl/effect/moveSignature.h"
12
13 #include "osl/centering3x3.h"
14 #include "osl/centering5x3.h"
15 #include "osl/effect_util/neighboring8Direct.h"
16 #include "osl/effect_util/neighboring8Effect.h"
17 #include "osl/effect_util/sendOffSquare.h"
18
19 #include "osl/checkmate/immediateCheckmateTable.h"
20 #include "osl/checkmate/proofNumberTable.h"
21
22 #include "osl/rating/featureSet.h"
23
24 #include "osl/eval/pieceEval.h"
25 #include "osl/eval/ppair/piecePairRawEval.h"
26 #include "osl/eval/ppair/piecePairPieceEval.h"
27 #include "osl/eval/endgame/attackKing.h"
28 #include "osl/eval/endgame/defenseKing.h"
29 #include "osl/eval/mobilityTable.h"
30 #include "osl/eval/progressEval.h"
31 #include "osl/eval/ml/openMidEndingEval.h"
32
33 #include "osl/container/boardMask.h"
34 namespace osl
35 {
37 const osl::CArray<int,10> osl::progress::PtypeProgressTable::yVals =
38 {{
39 0,4,4,4,3,2,1,0,0,0
40 }};
41
42 const CArray<Offset,DIRECTION_SIZE> BoardTable::offsets = { {
43 DirectionTraits<static_cast<Direction>(0)>::blackOffset(),
44 DirectionTraits<static_cast<Direction>(1)>::blackOffset(),
45 DirectionTraits<static_cast<Direction>(2)>::blackOffset(),
46 DirectionTraits<static_cast<Direction>(3)>::blackOffset(),
47 DirectionTraits<static_cast<Direction>(4)>::blackOffset(),
48 DirectionTraits<static_cast<Direction>(5)>::blackOffset(),
49 DirectionTraits<static_cast<Direction>(6)>::blackOffset(),
50 DirectionTraits<static_cast<Direction>(7)>::blackOffset(),
51 DirectionTraits<static_cast<Direction>(8)>::blackOffset(),
52 DirectionTraits<static_cast<Direction>(9)>::blackOffset(),
53 DirectionTraits<static_cast<Direction>(10)>::blackOffset(),
54 DirectionTraits<static_cast<Direction>(11)>::blackOffset(),
55 DirectionTraits<static_cast<Direction>(12)>::blackOffset(),
56 DirectionTraits<static_cast<Direction>(13)>::blackOffset(),
57 DirectionTraits<static_cast<Direction>(14)>::blackOffset(),
58 DirectionTraits<static_cast<Direction>(15)>::blackOffset(),
59 DirectionTraits<static_cast<Direction>(16)>::blackOffset(),
60 DirectionTraits<static_cast<Direction>(17)>::blackOffset()
61 } };
62 const CArray<int,DIRECTION_SIZE> BoardTable::dxs = { {
63 DirectionTraits<static_cast<Direction>(0)>::blackDx,
64 DirectionTraits<static_cast<Direction>(1)>::blackDx,
65 DirectionTraits<static_cast<Direction>(2)>::blackDx,
66 DirectionTraits<static_cast<Direction>(3)>::blackDx,
67 DirectionTraits<static_cast<Direction>(4)>::blackDx,
68 DirectionTraits<static_cast<Direction>(5)>::blackDx,
69 DirectionTraits<static_cast<Direction>(6)>::blackDx,
70 DirectionTraits<static_cast<Direction>(7)>::blackDx,
71 DirectionTraits<static_cast<Direction>(8)>::blackDx,
72 DirectionTraits<static_cast<Direction>(9)>::blackDx,
73 DirectionTraits<static_cast<Direction>(10)>::blackDx,
74 DirectionTraits<static_cast<Direction>(11)>::blackDx,
75 DirectionTraits<static_cast<Direction>(12)>::blackDx,
76 DirectionTraits<static_cast<Direction>(13)>::blackDx,
77 DirectionTraits<static_cast<Direction>(14)>::blackDx,
78 DirectionTraits<static_cast<Direction>(15)>::blackDx,
79 DirectionTraits<static_cast<Direction>(16)>::blackDx,
80 DirectionTraits<static_cast<Direction>(17)>::blackDx
81 } };
82 const CArray<int,DIRECTION_SIZE> BoardTable::dys = { {
83 DirectionTraits<static_cast<Direction>(0)>::blackDy,
84 DirectionTraits<static_cast<Direction>(1)>::blackDy,
85 DirectionTraits<static_cast<Direction>(2)>::blackDy,
86 DirectionTraits<static_cast<Direction>(3)>::blackDy,
87 DirectionTraits<static_cast<Direction>(4)>::blackDy,
88 DirectionTraits<static_cast<Direction>(5)>::blackDy,
89 DirectionTraits<static_cast<Direction>(6)>::blackDy,
90 DirectionTraits<static_cast<Direction>(7)>::blackDy,
91 DirectionTraits<static_cast<Direction>(8)>::blackDy,
92 DirectionTraits<static_cast<Direction>(9)>::blackDy,
93 DirectionTraits<static_cast<Direction>(10)>::blackDy,
94 DirectionTraits<static_cast<Direction>(11)>::blackDy,
95 DirectionTraits<static_cast<Direction>(12)>::blackDy,
96 DirectionTraits<static_cast<Direction>(13)>::blackDy,
97 DirectionTraits<static_cast<Direction>(14)>::blackDy,
98 DirectionTraits<static_cast<Direction>(15)>::blackDy,
99 DirectionTraits<static_cast<Direction>(16)>::blackDy,
100 DirectionTraits<static_cast<Direction>(17)>::blackDy
101 } };
102 }
103
104 namespace osl
105 {
106 const PieceTable Piece_Table;
107 const BoardTable Board_Table;
108 // PtypeTable depends on BoardTable
109 const PtypeTable Ptype_Table;
110 // BoardTable, PtypeTable -> Liberty8Table
111 const effect::Liberty8Table effect::Liberty8_Table;
112 #ifndef DFPNSTATONE
113 const eval::PtypeEvalTable eval::Ptype_Eval_Table;
114 const eval::PtypeEvalTable eval::PieceEval::Piece_Value = eval::Ptype_Eval_Table;
115 const eval::PtypeEvalTable eval::ProgressEval::Piece_Value = eval::Ptype_Eval_Table;
116 eval::ml::OpenMidEndingPtypeTable eval::ml::OpenMidEndingEval::Piece_Value;
117 #endif
118 const hash::HashGenTable hash::Hash_Gen_Table;
119 const hash::HashKey128::StandHash hash::HashKey128::Stand_Hash;
120 // PtypeTable, BoardTable -> AddEffectTable
121 // PtypeTable, BoardTable -> AddEffect8Table
122 #ifndef DFPNSTATONE
123 const move_generator::addeffect8::AddEffect8Table move_generator::Add_Effect8_Table;
124 #endif
125
126 #ifndef MINIMAL
127 const effect::MoveSignatureTable effect::Move_Signature_Table;
128 #endif
129 const PathEncodingTable Path_Encoding_Table;
130
131 #ifndef MINIMAL
132 const progress::PtypeProgressTable progress::Ptype_Progress_Table;
133 #endif
134
135 const Centering3x3::Table Centering3x3::table;
136 const Centering5x3::Table Centering5x3::table;
137 const effect_util::Neighboring8Direct::Table Neighboring8Direct::table;
138 const effect_util::Neighboring8Effect::Table Neighboring8Effect::table;
139 const effect_util::SendOffSquare::Table effect_util::SendOffSquare::table;
140
141 const container::BoardMaskTable5x5 container::Board_Mask_Table5x5;
142 const container::BoardMaskTable3x3 container::Board_Mask_Table3x3;
143 const container::BoardMaskTable5x3Center container::Board_Mask_Table5x3_Center;
144
145 const checkmate::ImmediateCheckmateTable checkmate::Immediate_Checkmate_Table;
146 const checkmate::ProofNumberTable checkmate::Proof_Number_Table;
147 const checkmate::EdgeTable checkmate::Edge_Table;
148 #ifndef MINIMAL
149 const eval::ppair::PiecePairRawTable eval::ppair::PiecePairRawTable::Table;
150 const eval::ppair::PiecePairPieceTable eval::ppair::PiecePairPieceTable::Table;
151 eval::PtypeEvalTable eval::ppair::PiecePairPieceTable::Piece_Value
152 = eval::Ptype_Eval_Table;
153
154 eval::endgame::AttackKing::Table eval::endgame::AttackKing::table;
155 eval::endgame::DefenseKing::Table eval::endgame::DefenseKing::table;
156 #endif
157 #ifndef DFPNSTATONE
158 const progress::Effect5x3Table progress::Effect5x3_Table;
159 #endif
160 #ifndef MINIMAL
161 const CArray<int, 9> eval::MobilityTable::rookVertical = { {
162 -61,-43,-22,-9,-2,9,12,17,17,
163 } };
164
165 const CArray<int, 9> eval::MobilityTable::rookHorizontal={{
166 -72,-47,-18,4,10,28,21,27,27,
167 }};
168 const CArray<int, 9> eval::MobilityTable::prookVertical={{
169 -45,-26,-17,-13,-1,1,10,8,8,
170 }};
171 const CArray<int, 9> eval::MobilityTable::prookHorizontal={{
172 -35,-23,-16,-10,-4,4,11,12,12,
173 }};
174 const CArray<int, 17> eval::MobilityTable::bishop={{
175 -60,-30,-6,2,4,8,10,12,
176 12,13,15,17,19,21,23,25,27
177 }};
178 const CArray<int, 17> eval::MobilityTable::pbishop={{
179 -39,-30,-9,-6,-2,2,0,5,
180 13,15,17,19,21,23,25,27,29
181 }};
182 const CArray<int, 9> eval::MobilityTable::lance={{
183 -10,-7,2,6,18,25,27,24,24
184 }};
185 #endif
186 }
187
188
189 // ;;; Local Variables:
190 // ;;; mode:c++
191 // ;;; c-basic-offset:2
192 // ;;; End: