#include "osl/container/moveVector.h"
#include "osl/oslConfig.h"
#include "osl/game_playing/weightTracer.h"
#include "osl/record/csaRecord.h"
#include "osl/record/checkDuplicate.h"
#include "osl/record/opening/openingBook.h"
#include <boost/algorithm/string/trim.hpp>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <boost/multi_array.hpp>
#include <boost/program_options.hpp>
#include <fstream>
#include <iostream>
#include <vector>
Go to the source code of this file.
Classes | |
struct | WinLoss |
struct | Result |
Enumerations | |
enum | GameResult { BLACK_WIN = 0, WHITE_WIN, OTHERS, BLACK_WIN = 0, WHITE_WIN, OTHERS } |
Functions | |
std::ostream & | operator<< (std::ostream &out, const WinLoss &wl) |
osl::record::opening::WeightedBook | book (osl::OslConfig::openingBook()) |
GameResult | getGameResult (const std::string &csa_file, const vector< Move > &moves) |
void | increment (const vector< Move > &moves, const Player player, const bool win) |
void | readFile (const std::string &player_name, const std::string &csa_file, osl::record::CheckDuplicate &duplicates) |
int | main (int argc, char **argv) |
Variables | |
static Result | result |
enum GameResult |
Enumerator | |
---|---|
BLACK_WIN | |
WHITE_WIN | |
OTHERS | |
BLACK_WIN | |
WHITE_WIN | |
OTHERS |
Definition at line 19 of file win-rate-openingbook-weight-level.cc.
osl::record::opening::WeightedBook book | ( | osl::OslConfig:: | openingBook()) |
Referenced by osl::game_playing::BookPlayer::bookAvailable(), osl::game_playing::BookPlayer::clone(), doMain(), osl::move_probability::StateInfo::finishUpdate(), increment(), osl::record::opening::BookInMemory::instance(), main(), osl::game_playing::BookPlayer::moveByBook(), osl::game_playing::BookPlayer::popMove(), osl::game_playing::BookPlayer::pushMove(), osl::record::opening::BookInMemory::readAll(), osl::record::opening::BookInMemory::readRecursive(), osl::game_playing::WinCountTracer::selectMove(), osl::game_playing::WeightTracer::selectMove(), osl::game_playing::DeterminateWeightTracer::selectMove(), osl::game_playing::BookPlayer::setInitialState(), osl::game_playing::WinCountTracer::update(), and osl::game_playing::WeightTracer::update().
GameResult getGameResult | ( | const std::string & | csa_file, |
const vector< Move > & | moves | ||
) |
Definition at line 159 of file win-rate-openingbook-weight-level.cc.
Definition at line 191 of file win-rate-openingbook-weight-level.cc.
References Result::add(), osl::alt(), osl::BLACK, book(), depth, osl::record::opening::WeightedBook::getMoves(), osl::record::opening::WeightedBook::getStartState(), and result.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 272 of file win-rate-openingbook-weight-level.cc.
References check_duplicate, files, osl::record::CheckDuplicate::print(), Result::printByDepth(), Result::printByLevel(), readFile(), result, run(), store(), and vm.
std::ostream& operator<< | ( | std::ostream & | out, |
const WinLoss & | wl | ||
) |
Definition at line 49 of file win-rate-openingbook-weight-level.cc.
References WinLoss::getRate(), WinLoss::losses, out, and WinLoss::wins.
void readFile | ( | const std::string & | player_name, |
const std::string & | csa_file, | ||
osl::record::CheckDuplicate & | duplicates | ||
) |
Definition at line 235 of file win-rate-openingbook-weight-level.cc.
References osl::BLACK, BLACK_WIN, getGameResult(), osl::record::Record::getMoves(), osl::record::Record::getPlayer(), osl::record::csa::CsaFile::getRecord(), increment(), moves, OTHERS, osl::record::CheckDuplicate::regist(), osl::WHITE, and WHITE_WIN.
|
static |
Definition at line 151 of file win-rate-openingbook-weight-level.cc.
Referenced by osl::eval::ml::KnightFork::accumulate(), osl::game_playing::HistoryToTable::adjustTable(), osl::ntesuki::NtesukiTable::Table::allocate(), osl::container::GeneralSimpleHashTable< Record >::Table::allocate(), osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearch(), osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), analyze_root(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::analyzeWithSeconds(), osl::checkmate::ProofTreeDepthDfpn::andNode(), osl::checkmate::ProofPieces::attack(), osl::ntesuki::NtesukiSimulationSearcher::attackForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::attackForProof(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackBonusEach(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackBonusOne(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateGoldPenalty(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateSilverPenalty(), osl::Move::capturePtype(), osl::search::MoveGenerator::captureValue(), osl::game_playing::GameState::clone(), osl::eval::ProgressEvalGeneral< progress_eval_opening_t >::composeValue(), osl::SquareCompressor::compress(), osl::stl::copy_if(), osl::effect_util::AdditionalOrShadow::count(), Searcher::count(), osl::search::SearchState2Core::countCheckAfterThreatmate(), osl::search::SearchState2Core::countCheckAfterThreatmateSacrifice(), osl::game_playing::CsaTime::curruntTime(), osl::checkmate::DisproofPieces::defense(), osl::ntesuki::NtesukiSimulationSearcher::defenseForDisproof(), osl::ntesuki::NtesukiSimulationSearcher::defenseForProof(), osl::rating::ImmediateAddSupport::Test::doAction(), osl::eval::ml::King8Effect::eval(), osl::eval::ml::PieceStand::eval(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::NonPawnPieceStandCombination::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::PawnDropBoth::eval(), osl::eval::ml::PtypeYY::eval(), osl::eval::ml::PieceStandY::eval(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::King8EffectAll::eval(), osl::eval::ml::KingXBothBlocked::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::King25EmptySquareNoEffectOpening::eval(), osl::eval::ml::King25EmptySquareNoEffectEnding::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::RookRook::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::BishopStandFile5::eval(), osl::eval::ml::King3Pieces::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::KingMobility::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KingMobilitySum::eval(), osl::eval::ml::KnightCheck::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::King25Mobility::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::PromotedMinorPieces::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::SilverFork::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::KnightFork::eval(), osl::eval::ml::King8EffectBase::evalCommon(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::RookEffectBase::evalOne(), osl::eval::ml::BishopEffectBase::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::KingRookBishop::evalOne(), osl::eval::ml::King25EffectEach< Stage >::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::AnagumaEmpty::evalOne(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::KingMobility::evalOne(), osl::eval::ml::KingMobilitySum::evalOne(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::King25EffectCountCombination::evalOne(), osl::eval::ml::GoldAndSilverNearKing::evalOne(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::NonPawnAttackedPtype::evalOnePiece(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::PtypeYY::evalWithUpdate(), osl::eval::ml::PawnDropBoth::evalWithUpdate(), osl::eval::ml::PieceStandY::evalWithUpdate(), osl::eval::ml::King25EmptyAbs< Opening >::evalWithUpdate(), osl::eval::ml::PtypeY::evalWithUpdate(), osl::eval::ml::PtypeX::evalWithUpdate(), osl::eval::ml::PawnPtypeOPtypeO::evalWithUpdate(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::eval::ml::King8EffectBase::evalWithUpdateCommon(), osl::search::QuiescenceSearch2< EvalT >::examineMoves(), osl::search::AlphaBeta2Tree< EvalT >::examineMovesRoot(), osl::search::QuiescenceSearch2< EvalT >::examineTakeBack(), osl::search::QuiescenceSearch2< EvalT >::examineTakeBack2(), osl::eval::PieceEval::expect(), osl::ntesuki::NtesukiRecord::find_split_right(), osl::checkmate::DfpnTable::List::findProofOracle(), osl::Move::from(), osl::search::QuiescenceSearch2< EvalT >::generateAndExamineTakeBack2(), osl::game_playing::GameState::generateMoves(), osl::RepetitionCounter::getFirstMove(), osl::record::Record::getResult(), osl::game_playing::CsaTime::getStart(), osl::ntesuki::NtesukiRecord::getValueOr(), increment(), osl::rating::ImmediateAddSupport::index(), osl::eval::ppair::PiecePairIndex::indexOf(), osl::record::Record::init(), osl::PieceStand::isSuperiorOrEqualTo(), osl::eval::MinorPieceBonus::knightBonus(), osl::eval::MinorPieceBonus::lanceBonus(), osl::checkmate::DisproofPieces::leaf(), osl::checkmate::ProofPieces::leaf(), osl::checkmate::ProofNumberTable::libertyAfterAllDrop(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::record::ki2::InputStream::load(), main(), make_history(), make_prob(), osl::effect_util::Pin::makeByPiece(), osl::effect_util::Pin::makeByPieceKing(), osl::OslConfig::makeHome(), osl::effect_util::Pin::makeNaive(), osl::OslConfig::makeTest(), osl::OslConfig::makeTestPublic(), osl::rating::Threatmate::match(), osl::rating::ImmediateAddSupport::match(), osl::Move::newAddFrom(), osl::Move::newFrom(), osl::PieceStand::nextStand(), osl::Move::oldPtypeO(), osl::container::operator&(), osl::misc::operator&(), osl::ntesuki::OracleProverLight::DefenseHelper< Searcher, P >::operator()(), osl::ntesuki::NtesukiSearcher::AttackHelper< Search, T >::operator()(), osl::search::AlphaBeta2Tree< EvalT >::NextQMove< P >::operator()(), osl::search::AlphaBeta2Tree< EvalT >::NextMove< P >::operator()(), osl::misc::operator+(), osl::Offset::operator+(), osl::Square::operator+(), osl::misc::CArrayIterator< T >::operator++(), osl::Offset::operator-(), osl::Square::operator-(), osl::misc::CArrayIterator< T >::operator--(), osl::misc::operator<<(), osl::misc::operator>>(), osl::misc::operator^(), osl::container::operator|(), osl::misc::operator|(), osl::search::QuiescenceSearch2< EvalT >::passValue(), osl::eval::MinorPieceBonus::pawnBonus(), osl::game_playing::SpeculativeAllMoves::SearchAllMoves::Generator::pickUpMove(), osl::Move::player(), osl::misc::PointerQueue< void >::pop_front(), osl::misc::PointerQueue< void >::pop_front_in_lock(), osl::game_playing::GameState::popMove(), osl::eval::ppair::PiecePairIndex::positionIndexOf(), osl::PieceStand::previousStand(), osl::checkmate::DfpnTable::List::probe(), osl::game_playing::GnuShogiClient::processComputerMove(), osl::game_playing::CsaClient::processComputerMove(), osl::Move::ptype(), osl::Move::ptypeO(), osl::ptypeOIndex(), osl::game_playing::GameState::pushMove(), osl::game_playing::GameManager::pushMove(), osl::search::AlphaBeta2Tree< EvalT >::quiesceExp(), osl::search::AlphaBeta2Tree< EvalT >::quiesceStable(), osl::search::AlphaBeta2Tree< EvalT >::quiesceWithMove(), rating_to_probability(), osl::game_playing::GnuShogiClient::readAndProcessCommand(), osl::game_playing::CsaClient::readAndProcessCommand(), osl::game_playing::SpeculativeAllMoves::SearchAllMoves::run(), search(), osl::ntesuki::NtesukiSearcher::search(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchInternal(), osl::search::QuiescenceSearch2< EvalT >::searchIteratively(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::game_playing::SpeculativeSearchPlayer::selectBestMove(), osl::checkmate::Dfpn::Node::setCheckmateDefense(), osl::checkmate::Dfpn::setIllegal(), osl::checkmate::Dfpn::Node::setNoCheckmateAttack(), osl::eval::ppair::PiecePairEvalTableBase< Table >::setUp(), osl::record::psn::show(), osl::record::psn::showXP(), osl::misc::sjis2euc(), osl::game_playing::SpeculativeSearchPlayer::standardSearchSeconds(), osl::eval::ppair::PiecePairWithStand< Table >::standBonus(), osl::ntesuki::NtesukiSimulationSearcher::startFromAttackDisproof(), osl::ntesuki::NtesukiSimulationSearcher::startFromAttackProof(), osl::ntesuki::NtesukiSimulationSearcher::startFromDefenseDisproof(), osl::ntesuki::NtesukiSimulationSearcher::startFromDefenseProof(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat(), osl::container::PieceValues::sum(), osl::eval::ml::NonPawnPieceStandCombination::sumUp(), osl::search::QuiescenceSearch2< EvalT >::takeBackOrChase(), osl::game_playing::SpeculativeAllMoves::SearchAllMoves::testMove(), osl::Move::to(), tos(), osl::rating::FeatureSet::tryLoad(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), osl::search::AlphaBeta2Tree< EvalT >::updateRootPV(), osl::game_playing::SpeculativeAllMoves::waitResult(), and RecordPrinter2::withChildMove().