00001
00002
00003 #ifndef _NTESUKI_ORACLE_PROVER_LIGHT_H
00004 #define _NTESUKI_ORACLE_PROVER_LIGHT_H
00005
00006 #include "osl/ntesuki/ntesukiTable.h"
00007 #include "osl/state/numEffectState.h"
00008 #include "osl/hash/hashKey.h"
00009 #include "osl/player.h"
00010 #include "osl/pathEncoding.h"
00011
00012 namespace osl
00013 {
00014 namespace ntesuki
00015 {
00016 class OracleProverLight
00017 {
00018 public:
00019 typedef NtesukiTable table_t;
00020 typedef NumEffectState state_t;
00021 typedef NtesukiMoveGenerator gen_t;
00022 private:
00023 state_t& state;
00024 gen_t *mg;
00025 PathEncoding path;
00026 table_t& table;
00027 NtesukiRecord::ISScheme isscheme;
00028 int fixed_search_depth;
00029
00030 template<class Searcher, Player P> class AttackHelper;
00031 template<class Searcher, Player P> class DefenseHelper;
00032
00033 public:
00034 explicit OracleProverLight(state_t& s,
00035 gen_t *g,
00036 PathEncoding p,
00037 table_t& t,
00038 NtesukiRecord::ISScheme isscheme = NtesukiRecord::no_is)
00039 : state(s), mg(g), path(p), table(t), isscheme(isscheme)
00040 {
00041 }
00042
00043 template <Player P>
00044 bool startFromAttack(NtesukiRecord* record,
00045 const NtesukiRecord* record_orig,
00046 const unsigned int pass_left);
00047 template <Player P>
00048 bool startFromDefense(NtesukiRecord* record,
00049 const NtesukiRecord* record_orig,
00050 const unsigned int pass_left);
00051
00052 private:
00053 template <Player P>
00054 bool attack(const NtesukiRecord *oracle,
00055 const unsigned int pass_left);
00056 template <Player P>
00057 bool defense(const NtesukiRecord *oracle,
00058 const unsigned int pass_left);
00059
00060 };
00061 }
00062 }
00063
00064 #endif
00065
00066
00067
00068