I modified the Goratschin Chess code so that it can run 8 chess engines at the same time, and it works;
however in the code the options management of each single chess engine is missing, so the system reads the default parameters of each exe file related to the chess engines (hash, thread, syzygyPath, evalfile nnue)
Request :
- does anyone know how to insert custom parameters (hash, thread, syzygyPath, evalfile nnue) into the following Python code? the starting file that also contains the path and the names of the chess engines is this goratschinLauncher.py :
#!/usr/bin/env python3
# to create an EXE from this file, do:
# pip install pyinstaller
# pyinstaller -wF goratschinLauncher.py
# copy .exe from 'dist' directory in root directory
import argparse
import logging
import sys
import datetime
from goratschinChess import GoratschinChess
# folder and file names for the engines.
engineFolderDefault = "C:/Temp05/ChessCombi2/engines/"
engineFileNames = ["Combi01", "Combi02", "Combi03", "Combi04", "Combi05", "Combi06", "Combi07", "Combi08"]
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='UCI ches engine.')
parser.add_argument('-log', help='Name of log file.')
parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output. Changes log level from INFO to DEBUG.')
parser.add_argument('-e', '--engineFolder', help='Engine folder.')
parser.add_argument('-m', '--margin', type=int, default=50, help="Margin in centipawns of which the counselor's eval must be better than the boss.")
args = parser.parse_args()
print('args :' + str(args), flush=True)
# configure logging
logger = logging.getLogger("goratschinChess")
logger.setLevel(logging.DEBUG if args.verbose else logging.INFO)
if args.log:
now = datetime.datetime.now()
f_handler = logging.FileHandler(args.log + '-' + str(now)[:10] + ".log")
f_format = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
f_handler.setFormatter(f_format)
logger.addHandler(f_handler)
enginesDir = args.engineFolder if args.engineFolder else engineFolderDefault
print('engine folder specified: ' + str(enginesDir), flush=True)
# start the goratschinChess engine
GoratschinChess(enginesDir, engineFileNames, args.margin).start()
The name of the second file is goratschinChess.py but, since it is too long, I mark the link where it is possible to view it and also the first file: https://github.com/scacchig/Synergy-Chess