15 #include <boost/make_shared.hpp>
31 osl::NumEffectState state(osl::CsaString(state_str).getInitialState());
32 osl::HashKey key(state);
38 const std::string checkmate_move_str =
40 sprintf(move,
"%s", checkmate_move_str.c_str());
50 osl::NumEffectState state(osl::CsaString(state_str).getInitialState());
51 osl::HashKey key(state);
78 sprintf(move,
"%s", best_move_str.c_str());
80 const osl::SimpleHashTable *table = player.
table();
81 const osl::HashKey key(state.
state());
83 const osl::SimpleHashRecord *record = table->
find(key);
84 int value = record ? record->lowerBound() : 0;
98 const int size =
std::min(out_size, static_cast<int>(ret.size()));
99 memcpy(out, ret.c_str(), size);
108 osl::NumEffectState state;
109 osl::vector<osl::Move>
moves;
110 std::istringstream is(moves_str);
114 moves.push_back(move);
115 state.makeMove(move);
117 assert(!moves.empty());
120 if (! moves.empty()) {
121 last_move = moves.back();
124 std::ostringstream os;
126 printer.
print(state, &last_move);
128 const std::string ret = os.str();
129 const int size =
std::min(out_size, static_cast<int>(ret.size()));
130 memcpy(out, ret.c_str(), size);