* @return statically evaluated value for the board.
*/
private int cachedWorth( Move lastMove, ParameterArray weights, HashKey key) {
// uncomment this to do caching.
ScoreEntry cachedScore = scoreCache_.get(key);
///////// comment this to do debugging
//if (cachedScore != null) {
// System.out.println("scoreCache_="+scoreCache_);
// return cachedScore.getScore();
//}
int worth = worthCalculator_.worth(lastMove, weights);
if (cachedScore == null) {
scoreCache_.put(key, new ScoreEntry(key, worth, board_.toString(), getWorthInfo()));
}
else {
if (cachedScore.getScore() != worth) {
StringBuilder bldr = new StringBuilder();
bldr.append("\ncachedScore ").
append(cachedScore).
//append("\nfor key=").
//append(getHashKey()).