Go to the documentation of this file.00001
00002
00003 #include "osl/search/quiescenceRecord.h"
00004 #include "osl/record/csa.h"
00005 #include "osl/ptypeTable.h"
00006 #include <boost/static_assert.hpp>
00007 #include <map>
00008 #include <iostream>
00009
00010 #ifndef MINIMAL
00011 void osl::search::
00012 QuiescenceRecord::dump(std::ostream& os) const
00013 {
00014 os << "QuiescenceRecord " << this << "\n";
00015 os << lower_bound << " (" << (int)lower_depth << ")"
00016 << upper_bound << " (" << (int)upper_depth << ")";
00017 if (hasStaticValue())
00018 {
00019 os << " s " << static_value << toString(staticValueType());
00020 os << " t1 " << threat1.value << " " << record::csa::show(threat1.move)
00021 << " t2 " << threat2.value << " " << record::csa::show(threat2.move);
00022 }
00023 os << "\n";
00024 os << "checkmate read " << checkmate_nodes << "\t"
00025 << "threatmate read " << threatmate_nodes << "\n";
00026 os << "best move " << record::csa::show(bestMove()) << "\n";
00027 os << "threatmate " << threatmate << "\n";
00028 os << "sendoffs " << (unsigned int)threatmate.sendoffs << "\n";
00029 os << "moves " << moves_size();
00030 size_t i=0;
00031 MoveVector moves_copy;
00032 loadMoves(moves_copy);
00033 for (MoveVector::const_iterator p=moves_copy.begin(); p!=moves_copy.end(); ++p, ++i)
00034 {
00035 os << " " << record::csa::show(*p);
00036 if (i % 8 == 7)
00037 os << "\n";
00038 }
00039 if (i % 8 != 7)
00040 os << "\n";
00041 }
00042
00043 const char *osl::search::
00044 QuiescenceRecord::toString(StaticValueType type)
00045 {
00046 switch (type)
00047 {
00048 case UNKNOWN:
00049 return "?";
00050 case UPPER_BOUND:
00051 return ">";
00052 case EXACT:
00053 return "=";
00054 default:
00055 assert(0);
00056 }
00057 return "!";
00058 }
00059 #endif
00060
00061
00062
00063
00064