Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use int16_t for histories #1113

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/movepick.h
Expand Up @@ -28,7 +28,7 @@
#include "types.h"

/// StatBoards is a generic 2-dimensional array used to store various statistics
template<int Size1, int Size2, typename T = int>
template<int Size1, int Size2, typename T = int16_t>
struct StatBoards : public std::array<std::array<T, Size2>, Size1> {

void fill(const T& v) {
Expand All @@ -52,7 +52,7 @@ struct ButterflyHistory : public ButterflyBoards {
void update(Color c, Move m, int v) {

const int D = 324;
int& entry = (*this)[c][from_to(m)];
auto& entry = (*this)[c][from_to(m)];

assert(abs(v) <= D); // Consistency check for below formula

Expand All @@ -68,7 +68,7 @@ struct PieceToHistory : public PieceToBoards {
void update(Piece pc, Square to, int v) {

const int D = 936;
int& entry = (*this)[pc][to];
auto& entry = (*this)[pc][to];

assert(abs(v) <= D); // Consistency check for below formula

Expand Down