PiecePairEvalTable に人為的に手を加える More...
#include "osl/eval/ppair/piecePairRawEval.h"
#include <boost/scoped_ptr.hpp>
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <unistd.h>
Go to the source code of this file.
Functions | |
void | usage (const char *prog) |
void | adjust (PiecePairRawTable &table, Square pos1, PtypeO ptypeo1, Square pos2, PtypeO ptypeo2, int value) |
void | adjustKingBonus (PiecePairRawTable &table, Square pos1, PtypeO ptypeo1, Square pos2, PtypeO ptypeo2, int bonus) |
void | adjustDual (PiecePairRawTable &table, Square king, Square attacker, Ptype attackerType, int blackAttackBonus, int whiteAttackBonus) |
king: white, attacker: black More... | |
void | adjustDual (PiecePairRawTable &table, Square black, Ptype black_ptype, Square white, Ptype white_ptype, int value) |
void | addValue (Player player, PiecePairRawTable &table, Square pos1, Ptype ptype1, Square pos2, Ptype ptype2, int bonus) |
void | addPenalty (Player player, PiecePairRawTable &table, Square pos1, Ptype ptype1, Square pos2, Ptype ptype2, int bonus) |
void | addBonus (Player player, PiecePairRawTable &table, Square pos1, Ptype ptype1, Square pos2, Ptype ptype2, int bonus) |
void | addPenaltyDual (PiecePairRawTable &table, Square pos1, Ptype ptype1, Square pos2, Ptype ptype2, int black_bonus) |
void | addSelfPenaltyDual (PiecePairRawTable &table, Square pos, Ptype ptype, int black_bonus) |
int | main (int argc, char **argv) |
Variables | |
bool | verbose = false |
PiecePairEvalTable に人為的に手を加える
試しに,玉の周り5x5 端では4x4 にいる敵の駒を+100してみる 歩桂香は玉より下では加点しない,代わりに上を延ばす 下にいる金は半分? 頂点は半分?
参考 http://www32.ocn.ne.jp/~yss/book.html#SEC3 桂、香の駒は玉が実際の位置よりももう1段上にいるとして計算している(桂香では敵玉から3段上が最大となる)
Definition in file pairedit.cc.
void addBonus | ( | Player | player, |
PiecePairRawTable & | table, | ||
Square | pos1, | ||
Ptype | ptype1, | ||
Square | pos2, | ||
Ptype | ptype2, | ||
int | bonus | ||
) |
Definition at line 117 of file pairedit.cc.
References addValue(), and osl::eval::betterThan().
Referenced by main().
void addPenalty | ( | Player | player, |
PiecePairRawTable & | table, | ||
Square | pos1, | ||
Ptype | ptype1, | ||
Square | pos2, | ||
Ptype | ptype2, | ||
int | bonus | ||
) |
Definition at line 108 of file pairedit.cc.
References addValue(), and osl::eval::betterThan().
Referenced by addPenaltyDual(), and main().
void addPenaltyDual | ( | PiecePairRawTable & | table, |
Square | pos1, | ||
Ptype | ptype1, | ||
Square | pos2, | ||
Ptype | ptype2, | ||
int | black_bonus | ||
) |
Definition at line 126 of file pairedit.cc.
References addPenalty(), osl::BLACK, and osl::WHITE.
Referenced by addSelfPenaltyDual().
void addValue | ( | Player | player, |
PiecePairRawTable & | table, | ||
Square | pos1, | ||
Ptype | ptype1, | ||
Square | pos2, | ||
Ptype | ptype2, | ||
int | bonus | ||
) |
Definition at line 98 of file pairedit.cc.
References adjust(), and osl::newPtypeO().
Referenced by addBonus(), addPenalty(), osl::eval::endgame::AttackDefense::AttackDefense(), osl::eval::endgame::AttackDefense::update(), and osl::eval::endgame::AttackDefense::updateKingMove().
void adjust | ( | PiecePairRawTable & | table, |
Square | pos1, | ||
PtypeO | ptypeo1, | ||
Square | pos2, | ||
PtypeO | ptypeo2, | ||
int | value | ||
) |
Definition at line 37 of file pairedit.cc.
References osl::Square::isOnBoard(), osl::eval::max(), osl::eval::min(), and verbose.
Referenced by addValue(), adjustDual(), adjustKingBonus(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::KingXBothBlocked::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::PtypeYY::evalWithUpdate(), osl::eval::ml::KingXBlockedYBase::evalWithUpdateBang(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), main(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), and osl::game_playing::AlphaBeta4Player::searchWithSecondsForThisMove().
void adjustDual | ( | PiecePairRawTable & | table, |
Square | king, | ||
Square | attacker, | ||
Ptype | attackerType, | ||
int | blackAttackBonus, | ||
int | whiteAttackBonus | ||
) |
king: white, attacker: black
Definition at line 75 of file pairedit.cc.
References adjustKingBonus(), osl::BLACK, osl::KING, osl::newPtypeO(), osl::Square::rotate180(), and osl::WHITE.
Referenced by main().
void adjustDual | ( | PiecePairRawTable & | table, |
Square | black, | ||
Ptype | black_ptype, | ||
Square | white, | ||
Ptype | white_ptype, | ||
int | value | ||
) |
Definition at line 87 of file pairedit.cc.
References adjust(), osl::BLACK, osl::newPtypeO(), osl::Square::rotate180(), and osl::WHITE.
void adjustKingBonus | ( | PiecePairRawTable & | table, |
Square | pos1, | ||
PtypeO | ptypeo1, | ||
Square | pos2, | ||
PtypeO | ptypeo2, | ||
int | bonus | ||
) |
Definition at line 61 of file pairedit.cc.
References adjust(), osl::BLACK, osl::getOwner(), osl::getPtype(), and osl::KING.
Referenced by adjustDual(), and main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 144 of file pairedit.cc.
References addBonus(), addPenalty(), addSelfPenaltyDual(), adjust(), adjustDual(), adjustKingBonus(), osl::BISHOP, osl::BLACK, center, osl::GOLD, osl::Square::index(), osl::isPiece(), osl::KING, osl::KNIGHT, osl::LANCE, osl::eval::min(), osl::newPtypeO(), osl::PAWN, osl::PBISHOP, osl::PKNIGHT, osl::PLANCE, osl::PPAWN, osl::PROOK, osl::PSILVER, osl::ROOK, osl::Square::rotate180(), osl::SILVER, usage(), verbose, and osl::WHITE.
void usage | ( | const char * | prog) |
Definition at line 27 of file pairedit.cc.
bool verbose = false |
Definition at line 35 of file pairedit.cc.