Skip to content

Commit 82b92ee

Browse files
author
Jesper Torp Kristensen
committed
Starting to work now. Use full commands (eg. "build table KRK" instead of "bt KRK") as the short versions doesn't seem to work.
1 parent f7d2796 commit 82b92ee

File tree

6 files changed

+16
-206
lines changed

6 files changed

+16
-206
lines changed

default.set

Lines changed: 0 additions & 181 deletions
This file was deleted.

src/compression/endgame_clustering_functions.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int KRKB_subset_number(int bishop, __attribute__((unused)) int rook, int _FK_, i
8787
#define num_values_KQKR (1 + 3 + 3 + 7 + 7)
8888
int KQKR_subset_number(int brook, __attribute__((unused)) int wqueen, int _FK_, int _BK_ FIFTH_PARAM) {
8989
_BK_ = INV_REMAP_BOUND_KING[_BK_];
90-
90+
9191
return EDGE_DIST[bk] + CORNER_DIST[bk] + dist(bk,wk) + (7 - dist(bk, brook));
9292

9393
}
@@ -107,15 +107,15 @@ void init_cluster_functions() {
107107
}
108108

109109
// KRK
110-
cluster_functions[DB_WROOK_VALUE] =
110+
cluster_functions[DB_WROOK_VALUE] =
111111
cluster_functions[DB_BROOK_VALUE] = KRK_subset_number;
112-
cluster_functions_num_values[DB_WROOK_VALUE] =
112+
cluster_functions_num_values[DB_WROOK_VALUE] =
113113
cluster_functions_num_values[DB_BROOK_VALUE] = num_values_KRK;
114114

115115
// Use KRK function for KQK also
116-
cluster_functions[DB_WQUEEN_VALUE] =
116+
cluster_functions[DB_WQUEEN_VALUE] =
117117
cluster_functions[DB_BQUEEN_VALUE] = KRK_subset_number;
118-
cluster_functions_num_values[DB_WQUEEN_VALUE] =
118+
cluster_functions_num_values[DB_WQUEEN_VALUE] =
119119
cluster_functions_num_values[DB_BQUEEN_VALUE] = num_values_KRK;
120120

121121
// KBBK

src/default.set

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Endgame_cluster_functions_preferred = true
1010
// MUST be set in the interval [0..64]. 0 represents win/draw/loss information.
1111
Endgame_bdd_mate_depth_round_up_to_multiples_of_n = 1
1212

13+
// If true, then a mix of DTM and WDL values is used
14+
Endgame_reduce_information = true
15+
1316
Endgame_calc_sifting = true
1417

1518
// Use mappings[number]. mappings defined in endgame_square_permutations.cxx
@@ -52,26 +55,16 @@ Endgame_output_preprocessed_bdd_tables = false
5255
Endgame_mark_unreachable_as_dont_cares = true
5356

5457
// if 0, then only static test is performed, otherwise n moves is tried undone
55-
Endgame_unreachability_depth_test = 3
56-
57-
Endgame_directory = "/users/doktoren/public_html/master_thesis/endgames/"
58+
Endgame_unreachability_depth_test = 0
5859

59-
Endgame_verify_bdd_with_table = true
60+
Endgame_directory = "tables/"
6061

6162
// 0 = simple method, 1 = retrograde
6263
Endgame_construction_method = 1
6364

6465
// If ...show_progress, then for each new mate depth a winning/losing position is shown
6566
Endgame_construction_show_progress = true
6667

67-
// Determines which endgame is used by engine. 0:own endgames, 1:Nalimov
68-
Endgame_active_endgame = 0
69-
70-
// Must be at least 16384
71-
Endgame_Nalimov_cache_size = 1048576
72-
73-
Endgame_Nalimov_directory = "/users/doktoren/public_html/master_thesis/Nalimov/"
74-
7568
//NDEBUG = false
7669
Eval3_show_evaluation_info = false
7770

@@ -133,7 +126,7 @@ Search3_show_line_of_play = false
133126
Search3_show_value_of_each_move_from_root = true
134127

135128
//NDEBUG : setting still enabled. Only used if XBOARD not defined
136-
Search3_time_per_move_in_ms = 10000
129+
Search3_time_per_move_in_ms = 2000
137130

138131
//NDEBUG : not used (false)
139132
Search3_trace_search = true
@@ -186,4 +179,3 @@ Search3_vulnerable_piece_penalty = 50
186179
Default_search_function = 3
187180

188181
Default_evaluation_function = 3
189-

src/endgames/endgame_functionality.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,6 @@ void EndgameFunctionality::init_bdd(BDD &bdd, int player, bool delete_table) {
583583
bool EndgameFunctionality::name_match(string name_pattern) {
584584
// divide name and _name into white parts and black parts
585585
string::size_type tmp;
586-
587-
if (name_pattern == "*") name_pattern = "K*K*";
588-
589586
tmp = name_pattern.find('K', 1);
590587
if (tmp == string::npos) return false;
591588
string np[2];
@@ -606,7 +603,6 @@ bool EndgameFunctionality::name_match(string name_pattern) {
606603
if (np[side].size()==2 &&
607604
(int)n[side].size() == 1+(np[side][1] - '0')) continue;
608605

609-
610606
string _n = n[side];
611607
for (uint i=1; i<_n.size(); i++) {
612608
assert(n[side][i] != 'K');

src/endgames/endgame_material.hxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "../piece_pos.hxx"
88
#include "../board_constants.hxx"
9+
#include "../experimenting.hxx"
910

1011
#ifdef ALLOW_5_MEN_ENDGAME
1112

src/experimenting.hxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#define _EXPERIMENTING_
33
// This file contains all the defines that control the compression
44

5+
#include <iostream>
6+
using namespace std;
7+
58
// MAX_MEN must be 4 or 5
69
// The files generated will be the same no matter if MAX_MEN is 4 or 5.
710
#define MAX_MEN 5
@@ -26,8 +29,7 @@ inline void load_define_value(int fd, char value, string name) {
2629
char tmp;
2730
read(fd, &tmp, 1);
2831
if (tmp != value) {
29-
cerr << "Error: Loaded file was created using different defined\n"
30-
<< "value for " << name << "\n";
32+
cerr << "Error: Loaded file was created using different defined" << endl << "value for " << name << "\n";
3133
exit(1);
3234
}
3335
}

0 commit comments

Comments
 (0)