Skip to content

Instantly share code, notes, and snippets.

View mooskagh's full-sized avatar

Alexander Lyashuk mooskagh

View GitHub Profile
import struct
from dataclasses import dataclass, field
def _CheckMagic(f, data, write):
if write:
f.write(b'P1R')
else:
assert b'P1R' == f.read(3)
#!/bin/env python3
##############################################################################
# Running:
# ./ucimove.py tcec-2.log ./lc0-tcec -t 1 --verbose-move-stats
##############################################################################
import sys
import subprocess
#!/bin/env python3
##############################################################################
# Running:
# ./ucihost.py tcec.log ./lc0-tcec -t 1 --verbose-move-stats
##############################################################################
import sys
import subprocess
This file has been truncated, but you can view the full file.
06:18:38.199 << uci
06:18:38.206 >> id name The Lc0 chess engine. v0.15.1
06:18:38.206 >> id author The LCZero Authors.
06:18:38.206 >> option name Network weights file path type string default <autodiscover>
06:18:38.207 >> option name Number of worker threads type spin default 2 min 1 max 128
06:18:38.207 >> option name NNCache size type spin default 200000 min 0 max 999999999
06:18:38.207 >> option name NN backend to use type combo default cudnn var cudnn var cudnn-fp16 var opencl var blas var check var random var multiplexing
06:18:38.207 >> option name NN backend parameters type string default
06:18:38.207 >> option name Scale thinking time type string default 1.950000
06:18:38.207 >> option name Move time overhead in milliseconds type spin default 100 min 0 max 10000
<< position startpos
<< go wtime 6300000 btime 6300000 winc 5000 binc 5000
>> info depth 2 seldepth 2 time 28 nodes 2 score cp 20 hashfull 0 nps 71 pv c2c4 g8f6
>> info depth 3 seldepth 3 time 39 nodes 7 score cp 17 hashfull 0 nps 179 pv c2c4 c7c6 b1c3
>> info depth 3 seldepth 4 time 43 nodes 16 score cp 18 hashfull 0 nps 372 pv c2c4 c7c6 b1c3 d7d5
>> info depth 3 seldepth 5 time 47 nodes 35 score cp 17 hashfull 0 nps 744 pv c2c4 c7c5 g1f3 g8f6 b1c3
>> info depth 3 seldepth 6 time 54 nodes 71 score cp 19 hashfull 0 nps 1314 pv c2c4 c7c5 g1f3 g8f6 b1c3 e7e6
>> info depth 3 seldepth 7 time 58 nodes 101 score cp 19 hashfull 0 nps 1741 pv c2c4 c7c5 g1f3 b8c6 d2d4 c5d4 f3d4
>> info depth 3 seldepth 8 time 67 nodes 166 score cp 20 hashfull 1 nps 2477 pv c2c4 c7c5 g1f3 e7e6 e2e4 g8f6 e4e5 f6g8
>> info depth 3 seldepth 9 time 75 nodes 263 score cp 21 hashfull 1 nps 3506 pv c2c4 c7c5 g1f3 e7e6 e2e4 g8f6 b1c3 b8c6 a1b1
This file has been truncated, but you can view the full file.
<< position startpos
<< go infinite
>> info depth 2 seldepth 2 time 32 nodes 2 score cp 20 hashfull 0 nps 62 pv c2c4 g8f6
>> info depth 3 seldepth 3 time 39 nodes 7 score cp 17 hashfull 0 nps 179 pv c2c4 c7c6 b1c3
>> info depth 3 seldepth 4 time 42 nodes 16 score cp 18 hashfull 0 nps 380 pv c2c4 c7c6 b1c3 d7d5
>> info depth 3 seldepth 5 time 47 nodes 35 score cp 17 hashfull 0 nps 744 pv c2c4 c7c5 g1f3 g8f6 b1c3
>> info depth 3 seldepth 6 time 51 nodes 64 score cp 19 hashfull 0 nps 1254 pv c2c4 c7c5 g1f3 g8f6 b1c3 e7e6
>> info depth 3 seldepth 7 time 64 nodes 95 score cp 19 hashfull 0 nps 1484 pv c2c4 c7c5 g1f3 e7e6 e2e4 b8c6 d2d4
>> info depth 3 seldepth 8 time 75 nodes 142 score cp 19 hashfull 0 nps 1893 pv c2c4 c7c5 g1f3 e7e6 e2e4 b8c6 d2d4 c5d4
>> info depth 3 seldepth 9 time 90 nodes 331 score cp 20 hashfull 1 nps 3677 pv c2c4 c7c5 g1f3 e7e6 e2e4 g8f6 b1c3 b8c6
0000000000000000000000000001000000000000010000011000000000000000 1
0000000000000000000000000000000000000000000000000000000000000000 1
0000000000000000000000000000000000000000000100000000000000000000 1
0000000000000000000000000000000000000000000000000000000000001000 1
0000000000000000000000000000000000000000000001000000000000000000 1
0000000000000000000000000000000000000000000000000000000001000000 1
0000000011100000000000000000000100000000000000000000000000000000 1
0000000000000000000000000000000000000000000000000000000000000000 1
0000000000000000000000000000000000000000000000000100000000000000 1
0001000100000000000000000000000000000000000000000000000000000000 1
$ pacaur -S pgn-extract
:: Package pgn-extract not found in repositories, trying AUR...
:: resolving dependencies...
:: looking for inter-conflicts...
AUR Packages (1) pgn-extract-17.38-1
:: Proceed with installation? [Y/n]
:: Retrieving package(s)...
project('lc0', 'cpp')
# default_options : ['cpp_std=c++17'])
add_global_arguments('-std=c++17', '-Wthread-safety', language : 'cpp')
cc = meson.get_compiler('cpp')
# Installed from https://github.com/FloopCZ/tensorflow_cc
tensorflow_cc = declare_dependency(
include_directories: include_directories(
'/usr/local/include/tensorflow',
blackMoveToWhiteMove = [
1614, 1615, 1616, 1617, 1618, 1619, 1620, 1611, 1612, 1613, 1608, 1609, 1610,
1606, 1607, 1604, 1605, 1602, 1603, 1600, 1601, 1598, 1599, 1638, 1639, 1640,
1641, 1642, 1643, 1644, 1634, 1635, 1636, 1637, 1630, 1631, 1632, 1633, 1628,
1629, 1626, 1627, 1624, 1625, 1622, 1623, 1621, 1663, 1664, 1665, 1666, 1667,
1668, 1669, 1658, 1659, 1660, 1661, 1662, 1653, 1654, 1655, 1656, 1657, 1651,
1652, 1649, 1650, 1647, 1648, 1646, 1645, 1688, 1689, 1690, 1691, 1692, 1693,
1694, 1683, 1684, 1685, 1686, 1687, 1678, 1679, 1680, 1681, 1682, 1675, 1676,
1677, 1673, 1674, 1672, 1671, 1670, 1713, 1714, 1715, 1716, 1717, 1718, 1719,
1708, 1709, 1710, 1711, 1712, 1703, 1704, 1705, 1706, 1707, 1700, 1701, 1702,