Skip to content

Commit

Permalink
Make contempt configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
dshawul committed Aug 16, 2019
1 parent 70be704 commit 86a0f60
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions bin/scorpio.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#############################################
###################################################
# log on/off - turn logging on and off
# resign - resign value in centipawns
#############################################
# contempt - +ve value discourages drawishness
###################################################
log off
resign 800
contempt 10
##################################################################
# Hashtable sizes in mb.
# ht - main hash table shared by ALL threads
Expand Down
2 changes: 1 addition & 1 deletion src/scorpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ extern const int use_tt;
extern const int use_aspiration;
extern const int use_iid;
extern const int use_pvs;
extern const int contempt;
extern int contempt;

/*
utility functions
Expand Down
5 changes: 4 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const int use_tt = 1;
const int use_aspiration = 1;
const int use_iid = 1;
const int use_pvs = 1;
const int contempt = 2;
int contempt = 10;

/* parameter */
#ifdef TUNE
Expand Down Expand Up @@ -1919,6 +1919,8 @@ bool check_search_params(char** commands,char* command,int& command_num) {
} else if(!strcmp(command, "aspiration_window")) {
aspiration_window = atoi(commands[command_num++]);
#endif
} else if(!strcmp(command, "contempt")) {
contempt = atoi(commands[command_num++]);
} else if(!strcmp(command, "smp_type")) {
command = commands[command_num++];
#ifdef PARALLEL
Expand Down Expand Up @@ -1958,4 +1960,5 @@ void print_search_params() {
print("feature option=\"singular_margin -spin %d 0 1000\"\n",singular_margin);
print("feature option=\"probcut_margin -spin %d 0 1000\"\n",probcut_margin);
print("feature option=\"aspiration_window -spin %d 0 100\"\n",aspiration_window);
print("feature option=\"contempt -spin %d 0 100\"\n",contempt);
}

0 comments on commit 86a0f60

Please sign in to comment.