From a361728f39812e25599323c52510c0eb3131bd90 Mon Sep 17 00:00:00 2001 From: tslil Date: Fri, 11 Sep 2026 18:36:10 +0100 Subject: flood fill for roads, fix dragon, memoise leaf eval, enable diagonal in nn_train.py --- include/nn.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/nn.c') diff --git a/include/nn.c b/include/nn.c index 9b241a1..7a42a02 100644 --- a/include/nn.c +++ b/include/nn.c @@ -91,10 +91,12 @@ void nn_prepare_input(float *cur_board, tak_state_p state, const float embedding[NN_N_EMB]) { const unsigned int n_cells = state->board_size * state->board_size; nn_prepare_head(cur_board, state); - nn_cell_idxs(prepared_idxs, state); + for (unsigned int loc = 0; loc < n_cells; loc++) { + const uint8_t idx = cell_idx_at(state, loc); + prepared_idxs[loc] = idx; + cur_board[2 + loc] = embedding[idx]; + } prepared_hash = state->hash; - for (unsigned int loc = 0; loc < n_cells; loc++) - cur_board[2 + loc] = embedding[prepared_idxs[loc]]; } // Copy the cell indices produced by the most recent nn_prepare_input into out -- cgit v1.3.1