fixedDepthSearchPerf.cc
Go to the documentation of this file.
00001 #include "osl/record/csaString.h"
00002 #include "osl/checkmate/fixedDepthSearcher.tcc"
00003 #include "osl/state/numEffectState.h"
00004 #include "osl/misc/perfmon.h"
00005 #include <time.h>
00006 #include <sys/time.h>
00007 #include <iostream>
00008 using namespace osl;
00009 using namespace osl::checkmate;
00010 
00011 int main()
00012 {
00013   SimpleState state=CsaString(
00014 "P1-KY *  *  * -KY * -FU-KE * \n"
00015 "P2 *  *  *  * -OU *  *  *  * \n"
00016 "P3 *  *  * -FU-FU *  *  * -KY\n"
00017 "P4-FU *  * -GI *  *  *  *  * \n"
00018 "P5 *  *  *  *  *  *  *  *  * \n"
00019 "P6+FU *  * +RY * +HI+FU *  * \n"
00020 "P7 * +FU * +FU+FU+FU *  *  * \n"
00021 "P8 *  * +OU * -TO *  *  *  * \n"
00022 "P9+KY *  *  *  *  *  * +KE * \n"
00023 "P+00KI00GI00GI00GI00KE00KE00FU00FU00FU00KI\n"
00024 "P-00KA00KA00KI00FU00FU00FU00FU00KI\n"
00025 "+\n").getInitialState();
00026   NumEffectState eState(state);
00027   ProofDisproof pdp;
00028   osl::misc::PerfMon perfmon;
00029   FixedDepthSearcher searcher(eState);
00030   perfmon.restart();
00031   searcher.setCount(0);
00032   for(int i=0;i<1000;i++)
00033     {
00034       Move dummy;
00035     pdp=searcher.hasCheckmateMove<BLACK>(1,dummy);
00036   }
00037   perfmon.stop("total", searcher.getCount());
00038   std::cerr << pdp << std::endl;
00039   return 0;
00040 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines