datagen new ui | bench 1632393

This commit is contained in:
rektdie committed 2026-10-03 20:12:36 +02:00
1 parent 134af1abde
commit f3411c524c
5 files changed
+766 -141

No files matched your search

+10 -2
View File
@@ -1,6 +1,7 @@
#pragma once
#include "board.h"
#include "utils.h"
#include <atomic>
#include <fstream>
#include "stopwatch.h"
@@ -11,6 +12,15 @@ constexpr int SOFT_NODES = 5000;
constexpr int HARD_NODES = 100000;
constexpr int RAND_MOVES = 8;
// Live counters shared between the worker threads and the frontend.
struct DatagenStats {
std::atomic<int> positions{0};
std::atomic<int> games{0};
std::atomic<int> files{0};
std::atomic<long long> nodes{0};
std::atomic<int> rejected{0};
};
struct MarlinFormat {
uint64_t occupancy; // 8 bytes: Bitboard representing all occupied squares (includes all pieces)
std::array<uint8_t, 16> pieces; // 16 bytes: 64 squares stored in 4-bit format (2 squares per byte)
@@ -62,6 +72,4 @@ struct Game {
void Run(int targetPositions, int threads);
void RunOnline(const std::string& username, int targetPositions, int threads);
void PrintProgress(int positions, int targetPositions, Stopwatch &stopwatch, int threads);
}