00001 #include "osl/progress/ml/newProgress.h"
00002 #include "osl/eval/ml/weights.h"
00003 #include "osl/eval/ml/midgame.h"
00004 #include "osl/eval/ml/minorPiece.h"
00005 #include "osl/pieceStand.h"
00006 #include "osl/oslConfig.h"
00007 #include <boost/foreach.hpp>
00008 #include <iostream>
00009 #include <fstream>
00010
00011 osl::misc::CArray<int, 81*15*10>
00012 osl::progress::ml::NewProgress::attack_relative;
00013 osl::misc::CArray<int, 81*15*10>
00014 osl::progress::ml::NewProgress::defense_relative;
00015 osl::misc::CArray<int, osl::Piece::SIZE>
00016 osl::progress::ml::NewProgress::stand_weight;
00017 osl::misc::CArray<int, 1125>
00018 osl::progress::ml::NewProgress::attack5x5_weight;
00019 osl::misc::CArray<int, 5625>
00020 osl::progress::ml::NewProgress::attack5x5_x_weight;
00021 osl::misc::CArray<int, 10125>
00022 osl::progress::ml::NewProgress::attack5x5_y_weight;
00023 osl::misc::CArray<int, 75>
00024 osl::progress::ml::NewProgress::effectstate_weight;
00025 osl::misc::CArray<int, 4284>
00026 osl::progress::ml::NewProgress::king_relative_weight;
00027 osl::CArray<int, 262144>
00028 osl::progress::ml::NewProgress::attacked_ptype_pair_weight;
00029 int osl::progress::ml::NewProgress::max_progress;
00030 bool osl::progress::ml::NewProgress::initialized_flag;
00031
00032 bool osl::progress::ml::NewProgress::setUp(const char *filename)
00033 {
00034 if (initialized_flag)
00035 return true;
00036
00037 static CArray<int, 25> effect_weight;
00038 static CArray<int, 225> effect_x_weight, effect_y_weight;
00039 static CArray<int, 25> effect_defense_weight;
00040 static CArray<int, 225> effect_per_effect;
00041 static CArray<int, 225> effect_per_effect_defense;
00042 static CArray<int, 2025> effect_per_effect_y, effect_per_effect_x;
00043 std::ifstream is(filename);
00044 int read_count = 0;
00045
00046 osl::eval::ml::Weights weights(25);
00047 for (size_t i = 0; i < weights.dimension(); ++i)
00048 {
00049 int val;
00050 is >> val;
00051 effect_weight[i] = val;
00052 ++read_count;
00053 }
00054 for (size_t i = 0; i < 225; ++i)
00055 {
00056 int val;
00057 is >> val;
00058 effect_x_weight[i] = val;
00059 ++read_count;
00060 }
00061 for (size_t i = 0; i < 225; ++i)
00062 {
00063 int val;
00064 is >> val;
00065 effect_y_weight[i] = val;
00066 ++read_count;
00067 }
00068 weights.resetDimension(25);
00069 for (size_t i = 0; i < weights.dimension(); ++i)
00070 {
00071 int val;
00072 is >> val;
00073 effect_defense_weight[i] = val;
00074 ++read_count;
00075 }
00076 weights.resetDimension(225);
00077 for (size_t i = 0; i < weights.dimension(); ++i)
00078 {
00079 int val;
00080 is >> val;
00081 effect_per_effect[i] = val;
00082 ++read_count;
00083 }
00084 weights.resetDimension(225);
00085 for (size_t i = 0; i < weights.dimension(); ++i)
00086 {
00087 int val;
00088 is >> val;
00089 effect_per_effect_defense[i] = val;
00090 ++read_count;
00091 }
00092
00093 weights.resetDimension(2025);
00094 for (size_t i = 0; i < weights.dimension(); ++i)
00095 {
00096 int val;
00097 is >> val;
00098 effect_per_effect_y[i] = val;
00099 ++read_count;
00100 }
00101 weights.resetDimension(2025);
00102 for (size_t i = 0; i < weights.dimension(); ++i)
00103 {
00104 int val;
00105 is >> val;
00106 effect_per_effect_x[i] = val;
00107 ++read_count;
00108 }
00109 weights.resetDimension(Piece::SIZE);
00110 for (size_t i = 0; i < weights.dimension(); ++i)
00111 {
00112 int val;
00113 is >> val;
00114 stand_weight[i] = val;
00115 ++read_count;
00116 }
00117 weights.resetDimension(1125);
00118 for (size_t i = 0; i < weights.dimension(); ++i)
00119 {
00120 int val;
00121 is >> val;
00122 attack5x5_weight[i] = val;
00123 ++read_count;
00124 }
00125 weights.resetDimension(75);
00126 for (size_t i = 0; i < weights.dimension(); ++i)
00127 {
00128 int val;
00129 is >> val;
00130 effectstate_weight[i] = val;
00131 ++read_count;
00132 }
00133 weights.resetDimension(5625);
00134 for (size_t i = 0; i < weights.dimension(); ++i)
00135 {
00136 int val;
00137 is >> val;
00138 attack5x5_x_weight[i] = val;
00139 ++read_count;
00140 }
00141 weights.resetDimension(10125);
00142 for (size_t i = 0; i < weights.dimension(); ++i)
00143 {
00144 int val;
00145 is >> val;
00146 attack5x5_y_weight[i] = val;
00147 ++read_count;
00148 }
00149 weights.resetDimension(4284);
00150 for (size_t i = 0; i < weights.dimension(); ++i)
00151 {
00152 int val;
00153 is >> val;
00154 king_relative_weight[i] = val;
00155 ++read_count;
00156 }
00157 weights.resetDimension(262144);
00158 for (size_t i = 0; i < weights.dimension(); ++i)
00159 {
00160 int val;
00161 is >> val;
00162 attacked_ptype_pair_weight[i] = val;
00163 ++read_count;
00164 }
00165 {
00166 int val;
00167 is >> val;
00168 max_progress = val;
00169 ++read_count;
00170 #ifdef EVAL_QUAD
00171 while (((max_progress/ProgressScale) % 3) && max_progress > 0)
00172 --max_progress;
00173 #endif
00174 }
00175 for(int king_x=1;king_x<=9;king_x++){
00176 for(int king_y=1;king_y<=9;king_y++){
00177 Position king(king_x,king_y);
00178 int king_index=(king_x-1)*9+king_y-1;
00179 const Position center = Centering5x3::adjustCenter(king);
00180 const int min_x = center.x() - 2;
00181 const int min_y = center.y() - 1;
00182 int i=0;
00183 for (int dx=0; dx<5; ++dx)
00184 {
00185 for (int dy=0; dy<3; ++dy,++i)
00186 {
00187 const Position target(min_x+dx,min_y+dy);
00188 int index0=king_index*15+i;
00189 int index_a=index0*10;
00190 int index_d=index0*10;
00191 attack_relative[index_a]=
00192 effect_weight[index<BLACK>(king, target)] +
00193 effect_x_weight[indexX<BLACK>(king, target)] +
00194 effect_y_weight[indexY<BLACK>(king, target)];
00195 defense_relative[index_d]=
00196 effect_defense_weight[index<BLACK>(king, target)];
00197 for(int count=0;count<=8;count++){
00198 attack_relative[index_a+count+1]=
00199 effect_per_effect[indexPerEffect<BLACK>(king, target, count)] +
00200 effect_per_effect_y[indexPerEffectY<BLACK>(king, target, count)] +
00201 effect_per_effect_x[indexPerEffectX<BLACK>(king, target, count)];
00202 defense_relative[index_d+count+1]=
00203 effect_per_effect_defense[indexPerEffect<BLACK>(king, target, count)];
00204 }
00205 }
00206 }
00207 }
00208 }
00209 for(int king_x=1;king_x<=5;king_x++)
00210 for(int promoted=0;promoted<=4;promoted++)
00211 for(int silver=0;silver<=4;silver++)
00212 for(int gold=0;gold<=4;gold++)
00213 for(int bishop=0;bishop<=2;bishop++)
00214 for(int rook=0;rook<=2;rook++){
00215 int index0=promoted + 5 * (silver + 5 * (gold + 5 * (bishop + 3 * rook)));
00216 int index1=king_x - 1 + 5 * (promoted + 5 * (silver + 5 * (gold + 5 * (bishop + 3 * rook))));
00217 attack5x5_x_weight[index1]+=attack5x5_weight[index0];
00218 }
00219 for (int i=0; i<PTYPE_SIZE*2*PTYPE_SIZE; ++i)
00220 for (int j=i+1; j<PTYPE_SIZE*2*PTYPE_SIZE; ++j) {
00221 attacked_ptype_pair_weight[eval::ml::NonPawnAttackedPtypePair::index2(j,i)]
00222 = attacked_ptype_pair_weight[eval::ml::NonPawnAttackedPtypePair::index2(i,j)];
00223 }
00224
00225
00226 initialized_flag = is;
00227 if (!initialized_flag)
00228 {
00229 std::cerr << "Failed to load NewProgress data " << read_count << std::endl;
00230 }
00231 return initialized_flag;
00232 }
00233
00234 bool osl::progress::ml::NewProgress::setUp()
00235 {
00236 std::string filename = OslConfig::home();
00237 filename += "/data/progress.txt";
00238 return setUp(filename.c_str());
00239 }
00240
00241 template <osl::Player P>
00242 void osl::progress::ml::NewProgress::progressOne(
00243 const NumEffectState &state, int &attack, int &defense)
00244 {
00245 const Position king = state.getKingPosition<P>();
00246 const Position center = Centering5x3::adjustCenter(king);
00247 const int min_x = center.x() - 2;
00248 const int min_y = center.y() - 1;
00249
00250 attack = defense = 0;
00251 Position kingRel=king;
00252 if(P==WHITE){
00253 kingRel=kingRel.rotate180();
00254 }
00255 int index0=((kingRel.x()-1)*9+kingRel.y()-1)*15;
00256 int index_a=index0*10 + (P==WHITE ? 10*14 : 0);
00257 for (int dx=0; dx<5; ++dx)
00258 {
00259 for (int dy=0; dy<3; ++dy)
00260 {
00261 const Position target(min_x+dx,min_y+dy);
00262 const int attack_count =
00263 state.countEffect(PlayerTraits<P>::opponent, target);
00264 const int defense_count =
00265 state.countEffect(P, target);
00266 attack += attack_count *attack_relative[index_a]+
00267 attack_relative[index_a+std::min(attack_count,8)+1];
00268 defense +=
00269 defense_count * defense_relative[index_a]+
00270 defense_relative[index_a+std::min(defense_count,8)+1];
00271 if(P==BLACK){
00272 index_a+=10;
00273 }
00274 else{
00275 index_a-=10;
00276 }
00277 }
00278 }
00279 }
00280
00281 template <osl::Player P>
00282 void osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState(
00283 const NumEffectState &state)
00284 {
00285 const Position king = state.getKingPosition<P>();
00286 const int min_x = std::max(1, king.x() - 2);
00287 const int max_x = std::min(9, king.x() + 2);
00288 const int min_y = std::max(1, king.y() - 2);
00289 const int max_y = std::min(9, king.y() + 2);
00290 effect_progresses[PlayerTraits<P>::index] = 0;
00291
00292 PieceMask mask;
00293 for (int y = min_y; y <= max_y; ++y)
00294 {
00295 for (int x = min_x; x <= max_x; ++x)
00296 {
00297 const Position target(x, y);
00298 const NumBitmapEffect effect = state.getEffect(target);
00299 const int effect_diff =
00300 effect.countEffect(PlayerTraits<P>::opponent) -
00301 effect.countEffect(P);
00302 const int x_diff = std::abs(x - king.x());
00303 const int y_diff = (P == WHITE ? king.y() - y : y - king.y());
00304 int index = std::max(std::min(effect_diff, 2), -2) + 2 + 5 * x_diff +
00305 5 * 3 * (y_diff + 2);
00306 effect_progresses[PlayerTraits<P>::index] += effectstate_weight[index];
00307 mask |= effect;
00308 }
00309 }
00310 updateAttack5x5Pieces<P>(mask, state);
00311 }
00312
00313 template <osl::Player P>
00314 void osl::progress::ml::NewProgress::updateAttack5x5Pieces(
00315 PieceMask mask, const NumEffectState& state)
00316 {
00317 const Player attack = PlayerTraits<P>::opponent;
00318 mask &= state.getOnBoardMask(attack);
00319
00320 rook[attack] = mask.selectBit<ROOK>().countBit();
00321 bishop[attack] = mask.selectBit<BISHOP>().countBit();
00322 gold[attack] = mask.selectBit<GOLD>().countBit();
00323 silver[attack] =
00324 (mask & ~state.promotedPieces()).selectBit<SILVER>().countBit();
00325 PieceMask promoted_pieces = mask & state.promotedPieces();
00326 promoted_pieces.clearBit<ROOK>();
00327 promoted_pieces.clearBit<BISHOP>();
00328 promoted[attack] =
00329 std::min(promoted_pieces.countBit(), 4);
00330 }
00331
00332 template <osl::Player P>
00333 int osl::progress::ml::NewProgress::attack5x5Value(
00334 const NumEffectState &state) const
00335 {
00336 const Player attack = PlayerTraits<P>::opponent;
00337 int king_x = state.getKingPosition<P>().x();
00338 if (king_x > 5)
00339 king_x = 10 - king_x;
00340 const int king_y = (P == BLACK ? state.getKingPosition<P>().y() :
00341 10 - state.getKingPosition<P>().y());
00342 return (attack5x5_x_weight[index5x5x(
00343 rook[attack] + state.countPiecesOnStand<ROOK>(attack),
00344 bishop[attack] + state.countPiecesOnStand<BISHOP>(attack),
00345 gold[attack] + state.countPiecesOnStand<GOLD>(attack),
00346 silver[attack] + state.countPiecesOnStand<SILVER>(attack),
00347 promoted[attack], king_x)] +
00348 attack5x5_y_weight[index5x5y(
00349 rook[attack] + state.countPiecesOnStand<ROOK>(attack),
00350 bishop[attack] + state.countPiecesOnStand<BISHOP>(attack),
00351 gold[attack] + state.countPiecesOnStand<GOLD>(attack),
00352 silver[attack] + state.countPiecesOnStand<SILVER>(attack),
00353 promoted[attack], king_y)]);
00354 }
00355
00356 void
00357 osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(
00358 const NumEffectState &state)
00359 {
00360 const CArray<Position,2> kings = {{
00361 state.getKingPosition(BLACK),
00362 state.getKingPosition(WHITE),
00363 }};
00364 king_relative_attack.fill(0);
00365 king_relative_defense.fill(0);
00366 for (int i = 0; i < Piece::SIZE; ++i)
00367 {
00368 const Piece piece = state.getPieceOf(i);
00369 if (piece.ptype() == osl::KING || !piece.isOnBoard())
00370 continue;
00371 Player pl = piece.owner();
00372 const int index_attack = indexRelative(piece.owner(), kings[alt(pl)],
00373 piece);
00374 const int index_defense = indexRelative(piece.owner(), kings[pl],
00375 piece) + 2142;
00376 king_relative_attack[pl] += king_relative_weight[index_attack];
00377 king_relative_defense[pl] += king_relative_weight[index_defense];
00378 }
00379 }
00380
00381 template <osl::Player Owner>
00382 void osl::progress::ml::NewProgress::
00383 updateNonPawnAttackedPtypePairOne(const NumEffectState& state)
00384 {
00385 PieceMask attacked = state.effectedMask(alt(Owner)) & state.getOnBoardMask(Owner);
00386 attacked.reset(state.getKingPiece<Owner>().number());
00387 mask_t ppawn = state.promotedPieces().getMask<PAWN>() & attacked.selectBit<PAWN>();
00388 attacked.clearBit<PAWN>();
00389 attacked.orMask(PtypeFuns<PAWN>::indexNum, ppawn);
00390 PieceVector pieces;
00391 while (attacked.any())
00392 {
00393 const Piece piece = state.getPieceOf(attacked.takeOneBit());
00394 pieces.push_back(piece);
00395 }
00396 typedef eval::ml::NonPawnAttackedPtypePair feature_t;
00397 int result = 0;
00398 MultiInt result_eval;
00399 for (size_t i=0; i+1<pieces.size(); ++i) {
00400 const int i0 = feature_t::index1(state, pieces[i]);
00401 for (size_t j=i+1; j<pieces.size(); ++j) {
00402 const int i1 = feature_t::index1(state, pieces[j]);
00403 result += attacked_ptype_pair_weight[feature_t::index2(i0,i1)];
00404 if (Owner == BLACK)
00405 result_eval += feature_t::table[feature_t::index2(i0, i1)];
00406 else
00407 result_eval -= feature_t::table[feature_t::index2(i0, i1)];
00408 }
00409 }
00410 non_pawn_ptype_attacked_pair[Owner] = result;
00411 non_pawn_ptype_attacked_pair_eval[Owner] = result_eval;
00412 }
00413
00414 void osl::progress::ml::NewProgress::
00415 updateNonPawnAttackedPtypePair(const NumEffectState& state)
00416 {
00417 updateNonPawnAttackedPtypePairOne<BLACK>(state);
00418 updateNonPawnAttackedPtypePairOne<WHITE>(state);
00419 }
00420
00421 osl::progress::ml::NewProgress::NewProgress(
00422 const NumEffectState &state)
00423 {
00424 assert(initialized_flag);
00425
00426 progressOne<BLACK>(state,
00427 progresses[PlayerTraits<BLACK>::index],
00428 defenses[PlayerTraits<WHITE>::index]);
00429 progressOne<WHITE>(state,
00430 progresses[PlayerTraits<WHITE>::index],
00431 defenses[PlayerTraits<BLACK>::index]);
00432 updateAttack5x5PiecesAndState<BLACK>(state);
00433 updateAttack5x5PiecesAndState<WHITE>(state);
00434 attack5x5_progresses[PlayerTraits<BLACK>::index] =
00435 attack5x5Value<BLACK>(state);
00436 attack5x5_progresses[PlayerTraits<WHITE>::index] =
00437 attack5x5Value<WHITE>(state);
00438 stand_progresses.fill(0);
00439 BOOST_FOREACH(Ptype ptype, PieceStand::order)
00440 {
00441 const int black_count =
00442 state.countPiecesOnStand(BLACK, ptype);
00443 const int white_count =
00444 state.countPiecesOnStand(WHITE, ptype);
00445 for (int j = 0; j < black_count; ++j)
00446 {
00447 stand_progresses[PlayerTraits<WHITE>::index] +=
00448 stand_weight[Ptype_Table.getIndexMin(ptype) + j];
00449 }
00450 for (int j = 0; j < white_count; ++j)
00451 {
00452 stand_progresses[PlayerTraits<BLACK>::index] +=
00453 stand_weight[Ptype_Table.getIndexMin(ptype) + j];
00454 }
00455 }
00456 updatePieceKingRelativeBonus(state);
00457 updateNonPawnAttackedPtypePair(state);
00458 }
00459
00460 template<osl::Player P>
00461 inline
00462 void osl::progress::ml::NewProgress::updateMain(
00463 const NumEffectState &new_state,
00464 Move last_move)
00465 {
00466 const Player altP=PlayerTraits<P>::opponent;
00467 assert(new_state.getTurn()==altP);
00468 assert(last_move.player()==P);
00469 const Position kb = new_state.getKingPosition<BLACK>(), kw = new_state.getKingPosition<WHITE>();
00470 const BoardMask mb = new_state.changedEffects(BLACK), mw = new_state.changedEffects(WHITE);
00471 const bool king_move = last_move.ptype() == KING;
00472 if ((king_move && altP == BLACK) || mb.anyInRange(Board_Mask_Table5x3_Center.mask(kw)) || mw.anyInRange(Board_Mask_Table5x3_Center.mask(kw)))
00473 {
00474 progressOne<WHITE>(new_state,
00475 progresses[PlayerTraits<WHITE>::index],
00476 defenses[PlayerTraits<BLACK>::index]);
00477 }
00478 if ((king_move && altP == WHITE) || mw.anyInRange(Board_Mask_Table5x3_Center.mask(kb)) || mb.anyInRange(Board_Mask_Table5x3_Center.mask(kb)))
00479 {
00480 progressOne<BLACK>(new_state,
00481 progresses[PlayerTraits<BLACK>::index],
00482 defenses[PlayerTraits<WHITE>::index]);
00483 }
00484
00485 const Ptype captured = last_move.capturePtype();
00486
00487 if (last_move.isDrop())
00488 {
00489 const int count =
00490 new_state.countPiecesOnStand(P, last_move.ptype()) + 1;
00491 const int value =
00492 stand_weight[Ptype_Table.getIndexMin(last_move.ptype()) + count - 1];
00493 stand_progresses[altP] -= value;
00494 }
00495 else if (captured != PTYPE_EMPTY)
00496 {
00497 Ptype ptype = unpromote(captured);
00498 const int count = new_state.countPiecesOnStand(P, ptype);
00499 const int value =
00500 stand_weight[(Ptype_Table.getIndexMin(ptype) + count - 1)];
00501 stand_progresses[altP] += value;
00502 }
00503
00504 if (king_move)
00505 {
00506 updatePieceKingRelativeBonus(new_state);
00507 }
00508 else
00509 {
00510 const CArray<Position,2> kings = {{
00511 new_state.getKingPosition(BLACK),
00512 new_state.getKingPosition(WHITE),
00513 }};
00514 if (!last_move.isDrop())
00515 {
00516 const int index_attack =
00517 indexRelative<P>(kings[altP],
00518 last_move.oldPtype(), last_move.from());
00519 const int index_defense =
00520 indexRelative<P>(kings[P],
00521 last_move.oldPtype(), last_move.from()) + 2142;
00522 king_relative_attack[P] -=
00523 king_relative_weight[index_attack];
00524 king_relative_defense[P] -=
00525 king_relative_weight[index_defense];
00526 }
00527 {
00528 const int index_attack =
00529 indexRelative<P>(kings[altP],
00530 last_move.ptype(), last_move.to());
00531 const int index_defense =
00532 indexRelative<P>(kings[P],
00533 last_move.ptype(), last_move.to()) + 2142;
00534 king_relative_attack[P] +=
00535 king_relative_weight[index_attack];
00536 king_relative_defense[P] +=
00537 king_relative_weight[index_defense];
00538 }
00539 if (captured != PTYPE_EMPTY)
00540 {
00541 const int index_attack =
00542 indexRelative<altP>(kings[P],
00543 captured, last_move.to());
00544 const int index_defense =
00545 indexRelative<altP>(kings[altP],
00546 captured, last_move.to()) + 2142;
00547 king_relative_attack[altP] -=
00548 king_relative_weight[index_attack];
00549 king_relative_defense[altP] -=
00550 king_relative_weight[index_defense];
00551 }
00552 }
00553 updateNonPawnAttackedPtypePair(new_state);
00554 }
00555
00556 template<osl::Player P>
00557 void osl::progress::ml::NewProgress::updateSub(
00558 const NumEffectState &new_state,
00559 Move last_move)
00560 {
00561 const Player altP=PlayerTraits<P>::opponent;
00562 assert(new_state.getTurn()==altP);
00563 if (last_move.isPass())
00564 return;
00565 const Position kb = new_state.getKingPosition<BLACK>(), kw = new_state.getKingPosition<WHITE>();
00566 const BoardMask mb = new_state.changedEffects(BLACK), mw = new_state.changedEffects(WHITE);
00567 const bool king_move = last_move.ptype() == KING;
00568 const Ptype captured = last_move.capturePtype();
00569
00570 if ((king_move && altP == BLACK) ||
00571 mb.anyInRange(Board_Mask_Table5x5.mask(kw)) ||
00572 mw.anyInRange(Board_Mask_Table5x5.mask(kw)))
00573 {
00574 updateAttack5x5PiecesAndState<WHITE>(new_state);
00575 attack5x5_progresses[PlayerTraits<WHITE>::index] =
00576 attack5x5Value<WHITE>(new_state);
00577 }
00578 else if (altP == WHITE &&(last_move.isDrop() || captured != PTYPE_EMPTY))
00579 {
00580 attack5x5_progresses[PlayerTraits<WHITE>::index] =
00581 attack5x5Value<WHITE>(new_state);
00582 }
00583 if ((king_move && altP == WHITE) ||
00584 mw.anyInRange(Board_Mask_Table5x5.mask(kb)) ||
00585 mb.anyInRange(Board_Mask_Table5x5.mask(kb)))
00586 {
00587 updateAttack5x5PiecesAndState<BLACK>(new_state);
00588 attack5x5_progresses[PlayerTraits<BLACK>::index] =
00589 attack5x5Value<BLACK>(new_state);
00590 }
00591 else if (altP == BLACK && (last_move.isDrop() || captured != PTYPE_EMPTY))
00592 {
00593 attack5x5_progresses[PlayerTraits<BLACK>::index] =
00594 attack5x5Value<BLACK>(new_state);
00595 }
00596 updateMain<P>(new_state, last_move);
00597 }
00598
00599 namespace osl
00600 {
00601 namespace progress
00602 {
00603 namespace ml
00604 {
00605 template void osl::progress::ml::NewProgress::updateSub<osl::BLACK>(const NumEffectState &new_state,Move last_move);
00606 template void osl::progress::ml::NewProgress::updateSub<osl::WHITE>(const NumEffectState &new_state,Move last_move);
00607 }
00608 }
00609 }
00610
00611
00612
00613
00614