facade.cc File Reference

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
c/facade.cc File Reference
`#include "osl/c/facade.h"`
`#include "osl/checkmate/dualDfpn.h"`
`#include "osl/game_playing/alphaBetaPlayer.h"`
`#include "osl/game_playing/gameState.h"`
`#include "osl/game_playing/usiState.h"`
`#include "osl/game_playing/usiResponse.h"`
`#include "osl/search/simpleHashTable.h"`
`#include "osl/search/simpleHashRecord.h"`
`#include "osl/record/csaString.h"`
`#include "osl/record/csa.h"`
`#include "osl/record/kanjiPrint.h"`
`#include "osl/record/usi.h"`
`#include <boost/make_shared.hpp>`
`#include <string>`
`#include <cstdio>`
`#include <cstring>`
Include dependency graph for c/facade.cc:

Go to the source code of this file.

## Functions
void | osl_init ()
int | checkmate_attack (const char *state_str, int &limit, char *move)
int | checkmate_escape (const char *state_str, int limit)
int | search (const char *state_str, int seconds, int verbose, char *move)
int | usiMovesToKanji (const char *command, char *out, int out_size)
| Converts moves in a USI format string to a Kanji representation. More...
int | usiMovesToPositionString (const char *moves_str, char *out, int out_size)
| Generates a Kanji position spcified by moves in a USI format string. More...

## Function Documentation

int checkmate_attack | ( | const char * | state_str,
|  | int & | limit,
|  | char * | move
| ) |  |

Definition at line 27 of file c/facade.cc.

References osl::checkmate::DualDfpn::isWinningState(), osl::record::csa::show(), and osl::checkmate::DualDfpn::totalNodeCount().

int checkmate_escape | ( | const char * | state_str,
|  | int | limit
| ) |  |

Definition at line 46 of file c/facade.cc.

References osl::record::usi::escape(), and osl::checkmate::DualDfpn::isLosingState().

void osl_init | ( | ) |  |

Definition at line 21 of file c/facade.cc.

References osl::OslConfig::setUp().

int search | ( | const char * | state_str,
|  | int | seconds,
|  | int | verbose,
|  | char * | move
| ) |  |

Definition at line 58 of file c/facade.cc.

References osl::container::GeneralSimpleHashTable< Record >::find(), osl::OslConfig::isMemoryLimitEffective(), osl::eval::max(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::SearchPlayer::setDepthLimit(), osl::game_playing::SearchPlayer::setNextIterationCoefficient(), osl::game_playing::SearchPlayer::setNodeLimit(), osl::game_playing::SearchPlayer::setTableLimit(), osl::game_playing::SearchPlayer::setVerbose(), osl::record::csa::show(), osl::game_playing::GameState::state(), and osl::game_playing::SearchPlayer::table().

Referenced by osl::search::CountRecorder::checkmateRatio(), osl::search::SearchState2Core::isWinningState(), main(), osl::search::AlphaBeta3::CallSearch< P >::operator()(), osl::search::AlphaBeta3::CallQuiesce< P >::operator()(), osl::checkmate::Dfpn::CallAttack< P >::operator()(), osl::checkmate::Dfpn::CallDefense< P >::operator()(), osl::checkmate::Dfpn::CallProofOracleAttack< P, UseTable >::operator()(), osl::checkmate::Dfpn::CallProofOracleDefense< P, UseTable >::operator()(), and Analyzer::search().

int usiMovesToKanji | ( | const char * | command,
|  | char * | out,
|  | int | out_size
| ) |  |

Converts moves in a USI format string to a Kanji representation.

Parameters

  command | a command string for gpsusi. ex. "ki2moves 7g7f 3c3d"
  out | a buffer to return a result string.
  out_size | size of the out buffer.

Returns
  the actual size with which the buffer is filled. It does not include a null terminator.

Definition at line 89 of file c/facade.cc.

References osl::game_playing::UsiResponse::hasImmediateResponse(), and osl::eval::min().

int usiMovesToPositionString | ( | const char * | moves_str,
|  | char * | out,
|  | int | out_size
| ) |  |

Generates a Kanji position spcified by moves in a USI format string.

Parameters

  moves_str | USI moves string.
  out | a buffer to return a result string.
  out_size | size of the out buffer.

Returns
  the actual size with which the buffer is filled. It does not include a null terminator.

Definition at line 104 of file c/facade.cc.

References osl::eval::min(), moves, osl::record::KanjiPrint::print(), and osl::record::usi::strToMove().