Index: engine/board.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/board.c,v retrieving revision 1.83 diff -u -r1.83 board.c --- engine/board.c 6 Aug 2003 14:44:32 -0000 1.83 +++ engine/board.c 7 Aug 2003 21:27:04 -0000 @@ -265,14 +265,12 @@ PUSH_VERTEX(board[pos]);\ board[pos] = color;\ hashdata_invert_stone(&hashdata, pos, color);\ - hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, color);\ } while (0) #define DO_REMOVE_STONE(pos)\ do {\ PUSH_VERTEX(board[pos]);\ hashdata_invert_stone(&hashdata, pos, board[pos]);\ - hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, board[pos]);\ board[pos] = EMPTY;\ } while (0) @@ -391,7 +389,6 @@ movenum = state->move_number; hashdata_recalc(&hashdata, board, board_ko_pos); - hashval_ng = hashvalue_ng_recalc(board, board_ko_pos); new_position(); } @@ -428,7 +425,6 @@ movenum = 0; hashdata_recalc(&hashdata, board, board_ko_pos); - hashval_ng = hashvalue_ng_recalc(board, board_ko_pos); new_position(); } @@ -462,7 +458,6 @@ static int move_color[MAXSTACK]; static Hash_data hashdata_stack[MAXSTACK]; -static Hashvalue_ng hashval_ng_stack[MAXSTACK]; static const char *komaster_to_string(int komaster); @@ -500,24 +495,25 @@ if (str == NO_MOVE) { if (komaster != EMPTY) - gg_snprintf(buf, 100, "%s (variation %d, hash %lx, komaster %s:%s)", - message, count_variations, hashval_ng, + gg_snprintf(buf, 100, "%s (variation %d, hash %s, komaster %s:%s)", + message, count_variations, hashdata_to_string(&hashdata), komaster_to_string(komaster), location_to_string(kom_pos)); else - gg_snprintf(buf, 100, "%s (variation %d, hash %lx)", - message, count_variations, hashval_ng); + gg_snprintf(buf, 100, "%s (variation %d, hash %s)", + message, count_variations, hashdata_to_string(&hashdata)); } else { if (komaster != EMPTY) gg_snprintf(buf, 100, - "%s at %s (variation %d, hash %lx, komaster %s:%s)", + "%s at %s (variation %d, hash %s, komaster %s:%s)", message, location_to_string(str), count_variations, - hashval_ng, komaster_to_string(komaster), + hashdata_to_string(&hashdata), + komaster_to_string(komaster), location_to_string(kom_pos)); else - gg_snprintf(buf, 100, "%s at %s (variation %d, hash %lx)", + gg_snprintf(buf, 100, "%s at %s (variation %d, hash %s)", message, location_to_string(str), count_variations, - hashval_ng); + hashdata_to_string(&hashdata)); } sgftreeAddPlayLast(sgf_dumptree, color, I(pos), J(pos)); sgftreeAddComment(sgf_dumptree, buf); @@ -554,12 +550,12 @@ if (message == NULL) message = "UNKNOWN"; if (komaster != EMPTY) - gg_snprintf(buf, 100, "tryko: %s (variation %d, %lx, komaster %s:%s)", - message, count_variations, hashval_ng, + gg_snprintf(buf, 100, "tryko: %s (variation %d, %s, komaster %s:%s)", + message, count_variations, hashdata_to_string(&hashdata), komaster_to_string(komaster), location_to_string(kom_pos)); else - gg_snprintf(buf, 100, "tryko: %s (variation %d, %lx)", - message, count_variations, hashval_ng); + gg_snprintf(buf, 100, "tryko: %s (variation %d, %s)", + message, count_variations, hashdata_to_string(&hashdata)); /* Add two pass moves to the SGF output to simulate the ko threat * and the answer. @@ -662,11 +658,9 @@ BEGIN_CHANGE_RECORD(); PUSH_VALUE(board_ko_pos); memcpy(&hashdata_stack[stackp], &hashdata, sizeof(hashdata)); - hashval_ng_stack[stackp] = hashval_ng; if (board_ko_pos != NO_MOVE) { hashdata_invert_ko(&hashdata, board_ko_pos); - hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos); } board_ko_pos = NO_MOVE; @@ -696,7 +690,6 @@ undo_trymove(); memcpy(&hashdata, &(hashdata_stack[stackp]), sizeof(hashdata)); - hashval_ng = hashval_ng_stack[stackp]; if (sgf_dumptree) { char buf[100]; @@ -724,7 +717,6 @@ stackp--; undo_trymove(); memcpy(&hashdata, &(hashdata_stack[stackp]), sizeof(hashdata)); - hashval_ng = hashval_ng_stack[stackp]; } #endif @@ -767,7 +759,7 @@ if (count_variations) gprintf("%o (variation %d)", count_variations-1); #else - gprintf("%o (%d)", hashval_ng); + gprintf("%o (%d)", hashdata_to_string(&hashdata)); #endif gprintf("%o\n"); @@ -803,7 +795,6 @@ board[pos] = color; hashdata_invert_stone(&hashdata, pos, color); - hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, color); reset_move_history(); new_position(); } @@ -821,7 +812,6 @@ ASSERT1(IS_STONE(board[pos]), pos); hashdata_invert_stone(&hashdata, pos, board[pos]); - hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, board[pos]); board[pos] = EMPTY; reset_move_history(); new_position(); @@ -840,11 +830,9 @@ { #if CHECK_HASHING Hash_data oldkey; - Hashvalue_ng oldhashval_ng; /* Check the hash table to see if it corresponds to the cumulative one. */ hashdata_recalc(&oldkey, board, board_ko_pos); - old_hashval_ng = hashvalue_ng_recalc(board, board_ko_pos); #if FULL_POSITION_IN_HASH gg_assert(hashdata_diff_dump(&oldkey, &hashdata) == 0); #else @@ -852,10 +840,8 @@ #endif #endif - if (board_ko_pos != NO_MOVE) { + if (board_ko_pos != NO_MOVE) hashdata_invert_ko(&hashdata, board_ko_pos); - hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos); - } board_ko_pos = NO_MOVE; /* If the move is a pass, we can skip some steps. */ @@ -872,7 +858,6 @@ #if CHECK_HASHING /* Check the hash table to see if it equals the previous one. */ hashdata_recalc(&oldkey, board, board_ko_pos); - oldhashval_ng = hashvalue_ng_recalc(board, board_ko_pos); #if FULL_POSITION_IN_HASH gg_assert(hashdata_diff_dump(&oldkey, &hashdata) == 0); #else @@ -1632,7 +1617,6 @@ int threshold; int liberties; Hash_data position_hash; - Hashvalue_ng position_hash_ng; }; @@ -1680,7 +1664,7 @@ if (!libs) { /* First see if this result is cached. */ - if (hashdata_is_equal(hashval_ng, entry->position_hash_ng) + if (hashdata_is_equal(hashdata, entry->position_hash) && maxlib <= entry->threshold) { return entry->liberties; } @@ -1694,7 +1678,6 @@ entry->threshold = MAXLIBS; entry->liberties = liberties; entry->position_hash = hashdata; - entry->position_hash_ng = hashval_ng; return liberties; } @@ -1714,7 +1697,6 @@ entry->liberties = liberties; entry->position_hash = hashdata; - entry->position_hash_ng = hashval_ng; #else /* not USE_BOARD_CACHES */ @@ -1980,7 +1962,7 @@ if (!libs) { /* First see if this result is cached. */ - if (hashdata_is_equal(hashval_ng, entry->position_hash_ng) + if (hashdata_is_equal(hashdata, entry->position_hash) && maxlib <= entry->threshold) { return entry->liberties; } @@ -1994,7 +1976,6 @@ entry->threshold = MAXLIBS; entry->liberties = liberties; entry->position_hash = hashdata; - entry->position_hash_ng = hashval_ng; return liberties; } @@ -2009,7 +1990,6 @@ entry->threshold = liberties < maxlib ? MAXLIBS : maxlib; entry->liberties = liberties; entry->position_hash = hashdata; - entry->position_hash_ng = hashval_ng; #else /* not USE_BOARD_CACHES */ @@ -3907,13 +3887,10 @@ && string[s].size == 1 && captured_stones == 1) { /* In case of a double ko: clear old ko position first. */ - if (board_ko_pos != NO_MOVE) { + if (board_ko_pos != NO_MOVE) hashdata_invert_ko(&hashdata, board_ko_pos); - hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos); - } board_ko_pos = string[s].libs[0]; hashdata_invert_ko(&hashdata, board_ko_pos); - hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos); } } Index: engine/cache.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/cache.c,v retrieving revision 1.28 diff -u -r1.28 cache.c --- engine/cache.c 5 Aug 2003 20:38:17 -0000 1.28 +++ engine/cache.c 7 Aug 2003 21:27:09 -0000 @@ -117,11 +117,13 @@ int remaining_depth, int *result, int *move) { - Hashvalue_ng hashval; - Hashentry_ng *entry; - Hashnode_ng *node; + Hash_data hashval; + Hashentry_ng *entry; + Hashnode_ng *node; - hashval = calculate_hashval_ng(komaster, kom_pos, routine, target); + /* Get the combined hash value. */ + calculate_hashval_for_tt(komaster, kom_pos, routine, target, + &hashval); /* Sanity check. */ if (remaining_depth < 0) @@ -163,14 +165,16 @@ int remaining_depth, int result, int move) { - Hashvalue_ng hashval; - Hashentry_ng *entry; - Hashnode_ng *deepest; - Hashnode_ng *newest; + Hash_data hashval; + Hashentry_ng *entry; + Hashnode_ng *deepest; + Hashnode_ng *newest; int data; /* Calculate the hash value. */ - hashval = calculate_hashval_ng(komaster, kom_pos, routine, target); + /* Get the combined hash value. */ + calculate_hashval_for_tt(komaster, kom_pos, routine, target, + &hashval); data = hn_create_data(remaining_depth, result, 0, move, 0); /* Get the entry and nodes. */ Index: engine/cache.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/cache.h,v retrieving revision 1.33 diff -u -r1.33 cache.h --- engine/cache.h 5 Aug 2003 20:38:17 -0000 1.33 +++ engine/cache.h 7 Aug 2003 21:27:12 -0000 @@ -54,8 +54,8 @@ * flags : 4 bits */ typedef struct { - Hashvalue_ng key; - int data; + Hash_data key; + unsigned int data; /* Should be 32 bits, but only wastes 25% if 64 bits. */ } Hashnode_ng; #define HN_MAX_REMAINING_DEPTH 31 Index: engine/genmove.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/genmove.c,v retrieving revision 1.81 diff -u -r1.81 genmove.c --- engine/genmove.c 4 Aug 2003 23:49:18 -0000 1.81 +++ engine/genmove.c 7 Aug 2003 21:27:15 -0000 @@ -79,7 +79,6 @@ reading_cache_clear(); hashdata_recalc(&hashdata, board, board_ko_pos); - hashval_ng = hashvalue_ng_recalc(board, board_ko_pos); worms_examined = -1; initial_influence_examined = -1; Index: engine/globals.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/globals.c,v retrieving revision 1.56 diff -u -r1.56 globals.c --- engine/globals.c 4 Aug 2003 23:49:18 -0000 1.56 +++ engine/globals.c 7 Aug 2003 21:27:16 -0000 @@ -58,8 +58,7 @@ Intersection shadow[BOARDMAX]; /* Hashing of positions. */ -Hash_data hashdata; -Hashvalue_ng hashval_ng; +Hash_data hashdata; Transposition_table ttable; int hashflags = HASH_DEFAULT; Index: engine/hash.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/hash.c,v retrieving revision 1.18 diff -u -r1.18 hash.c --- engine/hash.c 4 Aug 2003 23:49:18 -0000 1.18 +++ engine/hash.c 7 Aug 2003 21:27:18 -0000 @@ -39,24 +39,23 @@ /* Random values for the hash function. */ -static Hashvalue_ng white_hash_ng[BOARDMAX]; -static Hashvalue_ng black_hash_ng[BOARDMAX]; -static Hashvalue_ng ko_hash_ng[BOARDMAX]; - -static Hashvalue_ng komaster_hash[4]; /* EMPTY, BLACK, WHITE, GRAY */ -static Hashvalue_ng kom_pos_hash[BOARDMAX]; -static Hashvalue_ng target1_hash[BOARDMAX]; -static Hashvalue_ng target2_hash[BOARDMAX]; -static Hashvalue_ng routine_hash[NUM_ROUTINES]; +static Hash_data white_hash_ng[BOARDMAX]; +static Hash_data black_hash_ng[BOARDMAX]; +static Hash_data ko_hash_ng[BOARDMAX]; +static Hash_data komaster_hash[7]; /* FIXME: Make it impossible to set wrong value here. */ +static Hash_data kom_pos_hash[BOARDMAX]; +static Hash_data target1_hash[BOARDMAX]; +static Hash_data target2_hash[BOARDMAX]; +static Hash_data routine_hash[NUM_ROUTINES]; static struct init_struct { - Hashvalue_ng *array; - int array_size; + Hash_data *array; + int array_size; } hash_init_values[] = { {white_hash_ng, BOARDMAX}, {black_hash_ng, BOARDMAX}, {ko_hash_ng, BOARDMAX}, - {komaster_hash, 4}, + {komaster_hash, 7}, {kom_pos_hash, BOARDMAX}, {target1_hash, BOARDMAX}, {target2_hash, BOARDMAX}, @@ -75,7 +74,7 @@ hash_ng_init(void) { static int is_initialized = 0; - Hashvalue_ng *array; + Hash_data *array; int size; unsigned i; int j; @@ -103,86 +102,19 @@ } -/* Calculate the hashvalue for a position. - */ - -Hashvalue_ng -hashvalue_ng_recalc(Intersection *p, int ko_pos) -{ - Hashvalue_ng hashval; - int pos; - - hashdata_clear(hashval); - for (pos = BOARDMIN; pos < BOARDMAX; pos++) { - if (!ON_BOARD(pos)) - continue; - - switch (p[pos]) { - default: - case EMPTY: - break; - - case WHITE: - hashdata_xor(hashval, white_hash_ng[pos]); - break; - - case BLACK: - hashdata_xor(hashval, black_hash_ng[pos]); - break; - } - } - - if (ko_pos != NO_MOVE) - hashdata_xor(hashval, ko_hash_ng[ko_pos]); - - return hashval; -} - - -Hashvalue_ng -calculate_hashval_ng(int komaster, int kom_pos, int routine, int target) -{ - Hashvalue_ng hashval; - - hashval = hashval_ng; /* from globals.c */ - hashdata_xor(hashval, komaster_hash[komaster]); - hashdata_xor(hashval, kom_pos_hash[kom_pos]); - hashdata_xor(hashval, routine_hash[routine]); - hashdata_xor(hashval, target1_hash[target]); - - return hashval; -} - - -/* - * Set or remove ko in the hash value. - */ - -Hashvalue_ng -hashvalue_ng_invert_ko(Hashvalue_ng hashval, int ko_pos) +void +calculate_hashval_for_tt(int komaster, int kom_pos, int routine, int target, + Hash_data *hashdata2) { - hashdata_xor(hashval, ko_hash_ng[ko_pos]); - return hashval; + *hashdata2 = hashdata; /* from globals.c */ + hashdata_xor(*hashdata2, komaster_hash[komaster]); + hashdata_xor(*hashdata2, kom_pos_hash[kom_pos]); + hashdata_xor(*hashdata2, routine_hash[routine]); + hashdata_xor(*hashdata2, target1_hash[target]); } -/* - * Set or remove a stone of COLOR at pos in a Hash_data. - */ - -Hashvalue_ng -hashvalue_ng_invert_stone(Hashvalue_ng hashval, int pos, int color) -{ - if (color == BLACK) - hashdata_xor(hashval, black_hash_ng[pos]); - else if (color == WHITE) - hashdata_xor(hashval, white_hash_ng[pos]); - - return hashval; -} - - /* ================================================================ */ @@ -572,6 +504,20 @@ return_value.hashpos = hash1->hashpos; #endif return return_value; +} + + +char * +hashdata_to_string(Hash_data *hashdata) +{ + static char buffer[17]; + + sprintf(buffer, "%lx", hashdata->hashval[0]); +#if NUM_HASHVALUES == 2 + sprintf(buffer + 8, "%lx", hashdata->hashval[1]); +#endif + + return buffer; } Index: engine/hash.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/hash.h,v retrieving revision 1.15 diff -u -r1.15 hash.h --- engine/hash.h 5 Aug 2003 20:38:17 -0000 1.15 +++ engine/hash.h 7 Aug 2003 21:27:19 -0000 @@ -136,23 +137,27 @@ #endif } Hash_data; + Hash_data xor_hashvalues(Hash_data *key1, Hash_data *key2); Hash_data goal_to_hashvalue(const char *goal); void hash_init(void); #if FULL_POSITION_IN_HASH -int hashposition_compare(Hashposition *pos1, Hashposition *pos2); +int hashposition_compare(Hashposition *pos1, Hashposition *pos2); void hashposition_dump(Hashposition *pos, FILE *outfile); #endif void hashdata_recalc(Hash_data *hd, Intersection *board, int ko_pos); -int hashdata_compare(Hash_data *hd1, Hash_data *hd2); +int hashdata_compare(Hash_data *hd1, Hash_data *hd2); void hashdata_invert_ko(Hash_data *hd, int pos); void hashdata_invert_stone(Hash_data *hd, int pos, int color); void hashdata_set_tomove(Hash_data *hd, int to_move); int hashdata_diff_dump(Hash_data *key1, Hash_data *key2); +char *hashdata_to_string(Hash_data *hashdata); + + /* ---------------------------------------------------------------- */ @@ -162,15 +167,38 @@ * FIXME: Once this is the standard, remove all the _ng suffixes * and clean it up. */ -#if 0 -typedef uint64_t Hashvalue_ng; +#if NUM_HASHVALUES == 1 + +#define hashdata_NULL {{0}} +#define hashdata_clear(hd) \ + do { \ + (hd).hashval[0] = 0; \ + } while (0) #define hashdata_init(hd, uint1, uint2) \ - (hd) = ((uint64_t) (uint1) << 32) | ((uint64_t) (uint2)) + do { \ + (hd).hashval[0] = ((uint1) << 32 | (uint2)); \ + } while (0) + +#define hashdata_is_equal(hd1, hd2) \ + ((hd1).hashval[0] == (hd2).hashval[0]) + +#define hashdata_xor(hd1, hd2) \ + do { \ + (hd1).hashval[0] ^= (hd2).hashval[0]; \ + } while (0) -#else +/* FIXME: This is only an approximation. + * The real remainder can be calculated by + * (ax+y)%z = (a%z)(x%z)+(y%z) + * but this probably is good enough for the cache. + */ +#define hashdata_remainder(hd, num) \ + ((hd).hashval[0] % (num)) -#define Hashvalue_ng Hash_data +#endif + +#if NUM_HASHVALUES == 2 #define hashdata_NULL {{0, 0}} #define hashdata_clear(hd) \ @@ -204,13 +232,11 @@ #endif + extern void hash_ng_init(void); -extern Hashvalue_ng calculate_hashval_ng(int komaster, int kom_pos, - int routine, int target); -extern Hashvalue_ng hashvalue_ng_recalc(Intersection *p, int ko_pos); -extern Hashvalue_ng hashvalue_ng_invert_ko(Hashvalue_ng hashval, int ko_pos); -extern Hashvalue_ng hashvalue_ng_invert_stone(Hashvalue_ng hashval, - int pos, int color); +extern void calculate_hashval_for_tt(int komaster, int kom_pos, + int routine, int target, + Hash_data *hashdata); #endif Index: engine/liberty.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v retrieving revision 1.194 diff -u -r1.194 liberty.h --- engine/liberty.h 6 Aug 2003 15:09:31 -0000 1.194 +++ engine/liberty.h 7 Aug 2003 21:27:34 -0000 @@ -45,8 +45,7 @@ #include "cache.h" /* Other modules get read-only access to this variable. */ -extern Hash_data hashdata; -extern Hashvalue_ng hashval_ng; +extern Hash_data hashdata; extern Transposition_table ttable; /* Define if you want the new transposition table. */ Index: engine/reading.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v retrieving revision 1.121 diff -u -r1.121 reading.c --- engine/reading.c 4 Aug 2003 23:49:18 -0000 1.121 +++ engine/reading.c 7 Aug 2003 21:27:58 -0000 @@ -1056,8 +1056,6 @@ int xpos = NO_MOVE; int dcode = 0; int liberties; - int found_read_result; - Read_result *read_result = NULL; int retval; SETUP_TRACE_INFO("find_defense", str); @@ -1083,8 +1081,6 @@ return WIN; } -#ifdef USE_HASHTABLE_NG - if ((stackp <= depth) && (hashflags & HASH_FIND_DEFENSE) && tt_get(&ttable, komaster, kom_pos, FIND_DEFENSE, str, depth - stackp, @@ -1092,25 +1088,6 @@ /* FIXME: Use move for move ordering if tt_get() returned 1 */ return retval; -#else - - if ((stackp <= depth) && (hashflags & HASH_FIND_DEFENSE)) { - found_read_result = get_read_result(FIND_DEFENSE, komaster, kom_pos, - &str, &read_result); - if (found_read_result) { - TRACE_CACHED_RESULT(*read_result); - if (rr_get_result(*read_result) != 0) - if (move) - *move = rr_get_move(*read_result); - - SGFTRACE(rr_get_move(*read_result), - rr_get_result(*read_result), "cached"); - return rr_get_result(*read_result); - } - } - -#endif - #if EXPERIMENTAL_READING if (defend_by_pattern) { dcode = do_defend_pat(str, &xpos, komaster, kom_pos); @@ -1129,19 +1106,11 @@ dcode = defend4(str, &xpos, komaster, kom_pos); if (dcode) { -#ifdef USE_HASHTABLE_NG READ_RETURN_NG(komaster, kom_pos, FIND_DEFENSE, str, depth - stackp, move, xpos, dcode); -#else - READ_RETURN(read_result, move, xpos, dcode); -#endif } -#ifdef USE_HASHTABLE_NG READ_RETURN0_NG(komaster, kom_pos, FIND_DEFENSE, str, depth - stackp); -#else - READ_RETURN0(read_result); -#endif } @@ -2967,8 +2936,6 @@ int xpos = NO_MOVE; int libs; int result = 0; - int found_read_result; - Read_result *read_result = NULL; int retval; SETUP_TRACE_INFO("attack", str); @@ -2996,8 +2963,6 @@ return 0; } -#ifdef USE_HASHTABLE_NG - if ((stackp <= depth) && (hashflags & HASH_ATTACK) && tt_get(&ttable, komaster, kom_pos, ATTACK, str, depth - stackp, @@ -3005,25 +2970,6 @@ /* FIXME: Use move for move ordering if tt_get() returned 1 */ return retval; -#else - - if ((stackp <= depth) && (hashflags & HASH_ATTACK)) { - found_read_result = get_read_result(ATTACK, komaster, kom_pos, - &str, &read_result); - if (found_read_result) { - TRACE_CACHED_RESULT(*read_result); - if (rr_get_result(*read_result) != 0) - if (move) - *move = rr_get_move(*read_result); - - SGFTRACE(rr_get_move(*read_result), - rr_get_result(*read_result), "cached"); - return rr_get_result(*read_result); - } - } - -#endif - #if EXPERIMENTAL_READING if (attack_by_pattern) { result = do_attack_pat(str, &xpos, komaster, kom_pos); @@ -3051,18 +2997,10 @@ ASSERT1(result >= 0 && result <= WIN, str); if (result) -#ifdef USE_HASHTABLE_NG READ_RETURN_NG(komaster, kom_pos, ATTACK, str, depth - stackp, move, xpos, result); -#else - READ_RETURN(read_result, move, xpos, result); -#endif -#ifdef USE_HASHTABLE_NG READ_RETURN0_NG(komaster, kom_pos, ATTACK, str, depth - stackp); -#else - READ_RETURN0(read_result); -#endif }