#include "osl/state/numEffectState.h"
#include "osl/move_generator/legalMoves.h"
#include "osl/container/moveVector.h"
#include "osl/record/csaRecord.h"
#include "osl/record/ki2.h"
#include "osl/record/kakinoki.h"
#include "osl/record/kisen.h"
#include "osl/eval/see.h"
#include "osl/pieceStand.h"
#include <boost/algorithm/string/predicate.hpp>
#include <iostream>
Go to the source code of this file.
Functions | |
void | show () |
int | median () |
void | update () |
void | count (const NumEffectState &state, CArray< int, PTYPE_SIZE > &out) |
void | compare (Player turn, const NumEffectState &selected, const NumEffectState ¬_selected) |
Move | greedymove (const NumEffectState &state) |
void | make_PV (const NumEffectState &src, Move prev, MoveVector &pv) |
void | make_moves (NumEffectState &state, const MoveVector &pv) |
void | run (const osl::vector< Move > &moves) |
int | main (int argc, char **argv) |
Variables | |
CArray< int, PTYPE_SIZE > | weight |
CArray< int, PTYPE_SIZE > | gradient |
void compare | ( | Player | turn, |
const NumEffectState & | selected, | ||
const NumEffectState & | not_selected | ||
) |
Definition at line 69 of file learn-piece.cc.
References count, gradient, osl::playerToSign(), osl::PTYPE_SIZE, and weight.
void count | ( | const NumEffectState & | state, |
CArray< int, PTYPE_SIZE > & | out | ||
) |
Definition at line 62 of file learn-piece.cc.
References osl::Piece::owner(), osl::playerToSign(), osl::Piece::ptype(), and osl::Piece::SIZE.
Move greedymove | ( | const NumEffectState & | state) |
Definition at line 83 of file learn-piece.cc.
References osl::move_generator::capture::generate().
Referenced by make_PV().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 139 of file learn-piece.cc.
References gradient, run(), osl::record::csa::show(), update(), and weight.
void make_moves | ( | NumEffectState & | state, |
const MoveVector & | pv | ||
) |
Definition at line 110 of file learn-piece.cc.
Referenced by run().
void make_PV | ( | const NumEffectState & | src, |
Move | prev, | ||
MoveVector & | pv | ||
) |
Definition at line 97 of file learn-piece.cc.
References greedymove(), and osl::Move::isNormal().
Referenced by run().
int median | ( | ) |
Definition at line 36 of file learn-piece.cc.
References gradient, and osl::PTYPE_SIZE.
void run | ( | const osl::vector< Move > & | moves) |
Definition at line 115 of file learn-piece.cc.
References osl::alt(), compare(), osl::move_generator::capture::generate(), make_moves(), make_PV(), osl::Move::player(), and osl::Move::to().
void show | ( | ) |
Definition at line 18 of file learn-piece.cc.
References osl::canPromote(), gradient, osl::PieceStand::order, osl::promote(), osl::record::csa::show(), and weight.
void update | ( | ) |
Definition at line 45 of file learn-piece.cc.
References osl::canPromote(), gradient, osl::PieceStand::order, osl::promote(), and weight.
Referenced by osl::eval::ml::King8EffectBase::evalWithUpdateCommon(), main(), osl::state::HistoryState::makeMove(), osl::search::SearchState2Core::UpdateWrapper< Function >::operator()(), osl::state::HistoryState::state(), osl::search::DualThreatmateState::updateInLock(), and osl::ntesuki::NtesukiRecord::updateWithChild().
CArray<int,PTYPE_SIZE> gradient |
CArray<int,PTYPE_SIZE> weight |
Definition at line 17 of file learn-piece.cc.
Referenced by osl::stat::Histogram::add(), Histogram8::add(), compare(), doMain(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::PtypeY::evalWithUpdate(), main(), osl::game_playing::WeightTracer::selectMoveAtRandom(), osl::eval::ml::RookPawn< Opening >::setUp(), osl::eval::ml::AllMajor::setUp(), osl::eval::ml::NoPawnOnStand::setUp(), osl::eval::ml::AllGold::setUp(), show(), store(), and update().