http://mediocrechess.blogspot.com/
http://sourceforget.net/projects/mediocrechess/
See Mediocre v0.21b
This is a rather minor tweak to the draw evaluation of a position. It is used to avoid easy draws.
It simply subtracts a certain constant from the draw evaluation, so instead of returning 0 if a position is repeated it could return -50, this way the engine avoids taking the draw unless it is down with more than 50 points.
In Mediocre I added a check at the beginning of the search deciding what phase of the game we are in (opening, middle game or ending). Like this:
int gamePhase = Evaluation.getGamePhase(board);
if(gamePhase == PHASE_OPENING)
contemptFactor = CONTEMPT_OPENING;
else if(gamePhase == PHASE_ENDING)
contemptFactor = CONTEMPT_ENDING;
else
contemptFactor = CONTEMPT_MIDDLE;
return -(DRAW_VALUE + contemptFactor);
This way the draw value will be worse depending on what phase we are in.