PiecePairEvalTable に人為的に手を加える. [詳細]
#include "osl/eval/ppair/piecePairRawEval.h"#include <boost/scoped_ptr.hpp>#include <iostream>#include <cstdlib>#include <cstdio>#include <unistd.h>
関数 | |
| void | usage (const char *prog) |
| void | adjust (PiecePairRawTable &table, Position pos1, PtypeO ptypeo1, Position pos2, PtypeO ptypeo2, int value) |
| void | adjustKingBonus (PiecePairRawTable &table, Position pos1, PtypeO ptypeo1, Position pos2, PtypeO ptypeo2, int bonus) |
| void | adjustDual (PiecePairRawTable &table, Position king, Position attacker, Ptype attackerType, int blackAttackBonus, int whiteAttackBonus) |
| king: white, attacker: black | |
| void | adjustDual (PiecePairRawTable &table, Position black, Ptype black_ptype, Position white, Ptype white_ptype, int value) |
| void | addValue (Player player, PiecePairRawTable &table, Position pos1, Ptype ptype1, Position pos2, Ptype ptype2, int bonus) |
| void | addPenalty (Player player, PiecePairRawTable &table, Position pos1, Ptype ptype1, Position pos2, Ptype ptype2, int bonus) |
| void | addBonus (Player player, PiecePairRawTable &table, Position pos1, Ptype ptype1, Position pos2, Ptype ptype2, int bonus) |
| void | addPenaltyDual (PiecePairRawTable &table, Position pos1, Ptype ptype1, Position pos2, Ptype ptype2, int black_bonus) |
| void | addSelfPenaltyDual (PiecePairRawTable &table, Position pos, Ptype ptype, int black_bonus) |
| int | main (int argc, char **argv) |
変数 | |
| bool | verbose = false |
PiecePairEvalTable に人為的に手を加える.
試しに,玉の周り5x5 端では4x4 にいる敵の駒を+100してみる 歩桂香は玉より下では加点しない,代わりに上を延ばす 下にいる金は半分? 頂点は半分?
参考 http://www32.ocn.ne.jp/~yss/book.html#SEC3 桂、香の駒は玉が実際の位置よりももう1段上にいるとして計算している(桂香では敵玉から3段上が最大となる)
pairedit.cc で定義されています。
| void addPenalty | ( | Player | player, | |
| PiecePairRawTable & | table, | |||
| Position | pos1, | |||
| Ptype | ptype1, | |||
| Position | pos2, | |||
| Ptype | ptype2, | |||
| int | bonus | |||
| ) |
pairedit.cc の 108 行で定義されています。
参照先 addValue(), と osl::eval::betterThan().
参照元 addPenaltyDual(), と main().
| void adjust | ( | PiecePairRawTable & | table, | |
| Position | pos1, | |||
| PtypeO | ptypeo1, | |||
| Position | pos2, | |||
| PtypeO | ptypeo2, | |||
| int | value | |||
| ) |
pairedit.cc の 37 行で定義されています。
参照先 osl::Position::isOnBoard(), osl::eval::max(), osl::eval::min(), と verbose.
参照元 addValue(), adjustDual(), adjustKingBonus(), と main().
| void adjustDual | ( | PiecePairRawTable & | table, | |
| Position | black, | |||
| Ptype | black_ptype, | |||
| Position | white, | |||
| Ptype | white_ptype, | |||
| int | value | |||
| ) |
pairedit.cc の 87 行で定義されています。
参照先 adjust(), osl::BLACK, osl::newPtypeO(), osl::Position::rotate180(), と osl::WHITE.
| void adjustDual | ( | PiecePairRawTable & | table, | |
| Position | king, | |||
| Position | attacker, | |||
| Ptype | attackerType, | |||
| int | blackAttackBonus, | |||
| int | whiteAttackBonus | |||
| ) |
king: white, attacker: black
pairedit.cc の 75 行で定義されています。
参照先 adjustKingBonus(), osl::BLACK, osl::KING, osl::newPtypeO(), osl::Position::rotate180(), と osl::WHITE.
参照元 main().
| void adjustKingBonus | ( | PiecePairRawTable & | table, | |
| Position | pos1, | |||
| PtypeO | ptypeo1, | |||
| Position | pos2, | |||
| PtypeO | ptypeo2, | |||
| int | bonus | |||
| ) |
pairedit.cc の 61 行で定義されています。
参照先 adjust(), osl::BLACK, osl::getOwner(), osl::getPtype(), と osl::KING.
参照元 adjustDual(), と main().
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
pairedit.cc の 144 行で定義されています。
参照先 addBonus(), addPenalty(), addSelfPenaltyDual(), adjust(), adjustDual(), adjustKingBonus(), osl::BISHOP, osl::BLACK, center, osl::GOLD, osl::Position::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::Position::rotate180(), osl::SILVER, usage(), verbose, と osl::WHITE.
| void usage | ( | const char * | prog | ) |
pairedit.cc の 27 行で定義されています。
| bool verbose = false |
pairedit.cc の 35 行で定義されています。
1.6.3