Skip to content

Commit 75a4cc8

Browse files
authored
Check if key matches for Hash move (#49)
Bench: 29013338
1 parent 593e15c commit 75a4cc8

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Bit-Genie/src/moveorder.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ static int16_t see(Position &position, Move move)
8888
return scores[0];
8989
}
9090

91-
static Move get_hash_move(Position &position, TTable &tt)
92-
{
93-
return (Move)tt.retrieve(position).move;
94-
}
95-
9691
template <bool quiet = false>
9792
static void order_normal_movelist(Position &position, Movelist &movelist, Search &search)
9893
{
@@ -129,11 +124,11 @@ bool MovePicker::next(Move &move)
129124
if (stage == Stage::HashMove)
130125
{
131126
stage = Stage::GenNoisy;
132-
Move hash_move = get_hash_move(*position, *table);
133-
134-
if (can_move(hash_move))
127+
auto& entry = table->retrieve(*position);
128+
129+
if (entry.hash == position->key.data() && can_move((Move)entry.move))
135130
{
136-
move = hash_move;
131+
move = (Move)entry.move;
137132
return true;
138133
}
139134
}

Bit-Genie/src/uci.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "benchmark.h"
2626
#include "searchinit.h"
2727

28-
const char *version = "5.55";
28+
const char *version = "5.6";
2929

3030
namespace
3131
{

0 commit comments

Comments
 (0)