Go to the documentation of this file.00001
00002
00003 #ifndef OSL_USIRESPONSE_H
00004 #define OSL_USIRESPONSE_H
00005 #include "osl/game_playing/usiState.h"
00006 #include "osl/state/numEffectState.h"
00007 #include "osl/container/moveVector.h"
00008 #include "osl/container/moveLogProbVector.h"
00009 #include <string>
00010 namespace osl
00011 {
00012 namespace game_playing
00013 {
00014 struct UsiState;
00015 class UsiResponse
00016 {
00017 const UsiState& usi_state;
00018 const bool new_move_probability, verbose;
00019 public:
00020 UsiResponse(const UsiState&, bool new_move_probability, bool verbose);
00021 ~UsiResponse();
00022
00023 bool hasImmediateResponse(const std::string& command,
00024 std::string& out);
00025 void genmoveProbability(int limit, MoveLogProbVector& out);
00026 private:
00027 MoveVector generateGoodMoves();
00028 void genmoveProbability(int limit, std::string& out);
00029 void genmove(std::string& out);
00030 void csashow(const NumEffectState& state, std::string& out);
00031 void csamove(const NumEffectState& state, const std::string& str,
00032 std::string& out);
00033 void ki2moves(const NumEffectState& current,
00034 const std::string& moves_str, std::string& out);
00035 void ki2currentinfo(const NumEffectState& current, std::string& out);
00036 void isValidPosition(const std::string& line, std::string& out);
00037 };
00038 }
00039 using game_playing::UsiResponse;
00040 }
00041
00042 #endif
00043
00044
00045
00046