This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import os | |
import subprocess | |
from multiprocessing import Pool | |
CMD_SEQUENCE = [ | |
'setoption name Minimal value true', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Given a .pgn file containing a single game, attempt to create a series of UCI commands | |
# for the specified player, which aims to perfectly recreate the game, down to the node. | |
# | |
# Bugs, oddities, or just interesting situations, are often seen in PGNs from games played. | |
# Those games are almost always played with standard Fischer time controls. As a result, | |
# reproducing those games can be very challenging. | |
# | |
# FastChess, and OpenBench's fork of cutechess, supply the node counters most recently |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import chess | |
import chess.pgn | |
import sys | |
import traceback | |
import io | |
from subprocess import Popen, PIPE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import typing | |
import multiprocessing | |
class BatchedExecutionPool(): | |
def __init__( | |
self, | |
input_generator : typing.Generator, | |
process_function : typing.Callable[..., typing.Any], | |
process_function_args : typing.Optional[typing.Iterable[typing.Any]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import chess | |
import chess.pgn | |
def iterate_uci_options(unknown): | |
for arg in unknown: | |
if '=' in arg and arg.startswith('--option.'): | |
yield arg[len('--option.'):].split('=') | |
def main(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import numpy as np | |
import argparse | |
from network import Network | |
def check_for_overflow(acc_weights, acc_biases): | |
# Given the accum weights (L1, 22528), and accum biases (L1), determine a bound on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import argparse | |
import chess | |
import chess.pgn | |
import chess.syzygy | |
import io | |
import multiprocessing | |
import numpy as np | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import argparse | |
import chess | |
import chess.pgn | |
from subprocess import Popen, PIPE, call | |
from multiprocessing import Process, Queue | |
class Engine(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import os | |
from itertools import combinations_with_replacement | |
def tablebase_names(K=6): | |
letters = ['', 'Q', 'R', 'B', 'N', 'P'] | |
# Generate many potential K[] v K[], including all valid ones |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import uniform | |
from concurrent.futures import ThreadPoolExecutor | |
ITERATIONS = 1000 # Number of times to run the simulation, to reduce variance | |
LENGTH = 300 * 1000 # Fight is 300 seconds, or 300,000 milliseconds | |
AA_SPEED = LENGTH / 154.0 # We just compute your in-practice AA-speed, based on the first sim | |
BASE_CD = 45 * 1000 # This is the CD of Wake of ashes. We assume at-least 1 cast per 45s | |
INITIAL_CAST = 5.875 * 1000 # According to your first sim, you do not press Wake until this time | |
PROC_RATE = 0.042 # This is the probability of getting a Wake proc on an auto attack |
NewerOlder