-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHyperion.cpp
More file actions
35 lines (28 loc) · 1.09 KB
/
Copy pathHyperion.cpp
File metadata and controls
35 lines (28 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "Hyperion.h"
#include <iomanip>
#include <iostream>
int main()
{
using namespace hyperion;
attacks::initialize();
Position position{};
MoveList<> moves{};
movegen::generateMoves(position, moves);
std::cout << "Hyperion 4-Player Chess Engine Core\n";
std::cout << "Playable squares: " << board::valid_mask.popcount() << '\n';
std::cout << "Starting pieces: " << position.occupied().popcount() << '\n';
std::cout << "Legal opening moves for Red: " << moves.size() << '\n';
std::cout << "Slider backend: "
<< (attacks::slider_backend() == attacks::SliderBackend::Pext
? "BMI2/PEXT compressed ray tables"
: "ray scan + nearest blocker")
<< '\n';
std::cout << "BMI2 available: " << std::boolalpha
<< attacks::pext_available() << '\n';
std::cout << "PEXT table memory: "
<< std::fixed << std::setprecision(2)
<< static_cast<double>(attacks::pext_table_bytes()) / (1024.0 * 1024.0)
<< " MiB\n";
std::cout << "Perft(2): " << movegen::perft(position, 2) << '\n';
return 0;
}