All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
pairedit.cc File Reference

PiecePairEvalTable に人為的に手を加える More...

#include "osl/eval/ppair/piecePairRawEval.h"
#include <boost/scoped_ptr.hpp>
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <unistd.h>
Include dependency graph for pairedit.cc:

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
 

Detailed Description

PiecePairEvalTable に人為的に手を加える

試しに,玉の周り5x5 端では4x4 にいる敵の駒を+100してみる 歩桂香は玉より下では加点しない,代わりに上を延ばす 下にいる金は半分? 頂点は半分?

参考 http://www32.ocn.ne.jp/~yss/book.html#SEC3 桂、香の駒は玉が実際の位置よりももう1段上にいるとして計算している(桂香では敵玉から3段上が最大となる)

Definition in file pairedit.cc.

Function Documentation

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 addSelfPenaltyDual ( PiecePairRawTable &  table,
Square  pos,
Ptype  ptype,
int  black_bonus 
)

Definition at line 136 of file pairedit.cc.

References addPenaltyDual().

Referenced by main().

void addValue ( Player  player,
PiecePairRawTable &  table,
Square  pos1,
Ptype  ptype1,
Square  pos2,
Ptype  ptype2,
int  bonus 
)
void adjust ( PiecePairRawTable &  table,
Square  pos1,
PtypeO  ptypeo1,
Square  pos2,
PtypeO  ptypeo2,
int  value 
)
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 
)
void usage ( const char *  prog)

Definition at line 27 of file pairedit.cc.

Variable Documentation

bool verbose = false

Definition at line 35 of file pairedit.cc.