Comments (5)
I will try to implement it this weekend. Thanks for testing it in Linux.
from lakas.
Version 0.36.0 is uploaded, I tested it in WSL and it worked.
python3.7 lakas.py --match-manager-path ../cutechess-cli/cutechess-cli --concurrency 6 --optimizer bayesopt --bo-utility-kind ucb --output-data-file bayesopt_ucb.dat --input-data-file bayesopt_ucb.dat --optimizer-log-file opt_log_plot_ucb.txt --base-time-sec 1 --inc-time-sec 0.05 --budget 12 --games-per-budget 6 --engine stockfish_13_linux_x64_modern/stockfish_13_linux_x64_modern --input-param "{'Hash': {'init':16, 'lower':1, 'upper':128}}" --opening-file ./start_opening/ogpt_chess_startpos.epd --opening-file-format epd
2021-03-12 14:52:12,952 | INFO | Lakas v0.35.0
2021-03-12 14:52:12,952 | INFO | input param: OrderedDict([('Hash', {'init': 16, 'lower': 1, 'upper': 128})])
2021-03-12 14:52:12,953 | INFO | total budget: 12
2021-03-12 14:52:12,953 | INFO | games/budget: 6
2021-03-12 14:52:12,953 | INFO | move control: base_time_sec: 1, inc_time_sec: 0.05, depth=None, nodes=None
2021-03-12 14:52:12,956 | INFO | parameter dimension: 1
2021-03-12 14:52:12,957 | INFO | deterministic function: False
2021-03-12 14:52:12,957 | INFO | use best param: False
2021-03-12 14:52:12,977 | INFO | optimizer: bayesopt, previous budget: 0
2021-03-12 14:52:12,991 | INFO | budget: 1
2021-03-12 14:52:12,991 | INFO | recommended param: {'Hash': 23}
2021-03-12 14:52:12,992 | INFO | best param: {'Hash': 16}
2021-03-12 14:52:12,992 | INFO | option.Hash=16
2021-03-12 14:52:12,992 | INFO | best loss: 0.5
2021-03-12 14:52:12,992 | INFO | init param: {'Hash': 16}
2021-03-12 14:52:12,992 | INFO | recommended vs init
2021-03-12 14:52:21,605 | INFO | actual result: 0.66667 @6 games, minimized result or loss: 0.33333, point of view: recommended
Try it if it will work this time.
from lakas.
@Claes1981 can you try again if it will work in Linux.
I tried it in windows 10 and it worked.
help
--match-manager-path MATCH_MANAGER_PATH
Match manager path and/or filename. Example:
cutechess:
--match-manager-path c:/chess/tourney_manager/cutechess/cutechess-cli.exe
duel.py for xboard engines:
--match-manager-path python c:/chess/tourney_manager/duel/duel.py
or
--match-manager-path c:/python3/python c:/chess/tourney_manager/duel/duel.py
from lakas.
Sorry, same error as before:
python lakas.py --engine /partitions/Sandisk/xfs/media/data/chess/engines/Cfish/Cfish-20100303_pgo_extra --base-time-sec 1 --inc-time-sec 0.5 --optimizer bayesopt --output-data-file test1.dat --optimizer-log-file test1.txt --input-param "{'Threads': {'init': 8, 'lower': 1, 'upper': 8}}" --common-param "{'EvalFile': '/partitions/Sandisk/xfs/media/data/chess/engines/Stockfish_development_versions/nets/nn-baeb9ef2d183.nnue', 'Contempt': 11}" --opening-file /home/claes/Lakas/start_pos.pgn --opening-file-format pgn --match-manager-path /usr/bin/cutechess-cli
2021-03-11 20:26:18,712 | INFO | Lakas v0.35.0
2021-03-11 20:26:18,712 | INFO | input param: OrderedDict([('Threads', {'init': 8, 'lower': 1, 'upper': 8})])
2021-03-11 20:26:18,712 | INFO | total budget: 1000
2021-03-11 20:26:18,712 | INFO | games/budget: 100
2021-03-11 20:26:18,712 | INFO | move control: base_time_sec: 1, inc_time_sec: 0.5, depth=None, nodes=None
2021-03-11 20:26:18,713 | INFO | parameter dimension: 1
2021-03-11 20:26:18,713 | INFO | deterministic function: False
2021-03-11 20:26:18,713 | INFO | use best param: False
2021-03-11 20:26:18,713 | INFO | optimizer: bayesopt, initialization: Hammersley, init_budget: None, middle_point: False, utility_kind: ucb, utility_kappa: 2.576, utility_xi: 0.0, gp_parameters: {'alpha': 0.001, 'normalize_y': True, 'n_restarts_optimizer': 5, 'random_state': None}
2021-03-11 20:26:18,721 | INFO | budget: 1
2021-03-11 20:26:18,721 | INFO | recommended param: {'Threads': 8}
2021-03-11 20:26:18,721 | INFO | best param: {'Threads': 8}
2021-03-11 20:26:18,721 | INFO | option.Threads=8
2021-03-11 20:26:18,721 | INFO | best loss: 0.5
2021-03-11 20:26:18,721 | INFO | init param: {'Threads': 8}
2021-03-11 20:26:18,721 | INFO | common param: {'EvalFile': '/partitions/Sandisk/xfs/media/data/chess/engines/Stockfish_development_versions/nets/nn-baeb9ef2d183.nnue', 'Contempt': 11}
2021-03-11 20:26:18,721 | INFO | recommended vs init
Traceback (most recent call last):
File "lakas.py", line 951, in <module>
main()
File "lakas.py", line 913, in main
loss = objective.run(**x.kwargs)
File "lakas.py", line 252, in run
result = engine_match(self.engine_file, test_options, base_options,
File "lakas.py", line 409, in engine_match
process = Popen(str(tour_manager) + command, stdout=PIPE, text=True)
File "/usr/lib64/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib64/python3.8/subprocess.py", line 1706, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/cutechess-cli -concurrency 1 -tournament round-robin -pgnout nevergrad_games.pgn fi -each tc=0/0:1+0.5 -engine cmd=/partitions/Sandisk/xfs/media/data/chess/engines/Cfish/Cfish-20100303_pgo_extra name=test option.Threads=8 option.EvalFile=/partitions/Sandisk/xfs/media/data/chess/engines/Stockfish_development_versions/nets/nn-baeb9ef2d183.nnue option.Contempt=11 proto=uci -engine cmd=/partitions/Sandisk/xfs/media/data/chess/engines/Cfish/Cfish-20100303_pgo_extra name=base option.Threads=8 option.EvalFile=/partitions/Sandisk/xfs/media/data/chess/engines/Stockfish_development_versions/nets/nn-baeb9ef2d183.nnue option.Contempt=11 proto=uci -rounds 50 -games 2 -repeat 2 -recover -wait 5000 -openings file=/home/claes/Lakas/start_pos.pgn order=random format=pgn -resign movecount=6 score=700 twosided=true -draw movenumber=30 movecount=6 score=1'
(Entering the Cutechess-cli command from the last line direct in the terminal still starts a match)
I don't know how Python and Linux handles commands, but does it maybe somehow threat all command options as part of the file name, and therefore respond with "No such file or directory
"?
from lakas.
Yes, now it seems to work, thank you! :) The engines started to run before I manually aborted:
python lakas.py --engine /partitions/Sandisk/xfs/media/data/chess/engines/Cfish/Cfish-20100303_pgo_extra --base-time-sec 1 --inc-time-sec 0.5 --optimizer bayesopt --output-data-file test1.dat --optimizer-log-file test1.txt --input-param "{'Threads': {'init': 8, 'lower': 1, 'upper': 8}}" --common-param "{'EvalFile': '/partitions/Sandisk/xfs/media/data/chess/engines/Stockfish_development_versions/nets/nn-baeb9ef2d183.nnue', 'Contempt': 11}" --opening-file /home/claes/Lakas/start_pos.pgn --opening-file-format pgn --match-manager-path /usr/bin/cutechess-cli
2021-03-12 18:48:59,738 | INFO | Lakas v0.36.0
2021-03-12 18:48:59,738 | INFO | input param: OrderedDict([('Threads', {'init': 8, 'lower': 1, 'upper': 8})])
2021-03-12 18:48:59,738 | INFO | total budget: 1000
2021-03-12 18:48:59,738 | INFO | games/budget: 100
2021-03-12 18:48:59,738 | INFO | move control: base_time_sec: 1, inc_time_sec: 0.5, depth=None, nodes=None
2021-03-12 18:48:59,739 | INFO | parameter dimension: 1
2021-03-12 18:48:59,739 | INFO | deterministic function: False
2021-03-12 18:48:59,739 | INFO | use best param: False
2021-03-12 18:48:59,739 | INFO | optimizer: bayesopt, initialization: Hammersley, init_budget: None, middle_point: False, utility_kind: ucb, utility_kappa: 2.576, utility_xi: 0.0, gp_parameters: {'alpha': 0.001, 'normalize_y': True, 'n_restarts_optimizer': 5, 'random_state': None}
2021-03-12 18:48:59,747 | INFO | budget: 1
2021-03-12 18:48:59,747 | INFO | recommended param: {'Threads': 8}
2021-03-12 18:48:59,748 | INFO | best param: {'Threads': 8}
2021-03-12 18:48:59,748 | INFO | option.Threads=8
2021-03-12 18:48:59,748 | INFO | best loss: 0.5
2021-03-12 18:48:59,748 | INFO | init param: {'Threads': 8}
2021-03-12 18:48:59,748 | INFO | common param: {'EvalFile': '/partitions/Sandisk/xfs/media/data/chess/engines/Stockfish_development_versions/nets/nn-baeb9ef2d183.nnue', 'Contempt': 11}
2021-03-12 18:48:59,748 | INFO | recommended vs init
^CTraceback (most recent call last):
File "lakas.py", line 957, in <module>
main()
File "lakas.py", line 919, in main
loss = objective.run(**x.kwargs)
File "lakas.py", line 255, in run
result = engine_match(self.engine_file, test_options, base_options,
File "lakas.py", line 416, in engine_match
for eline in iter(process.stdout.readline, ''):
KeyboardInterrupt
from lakas.
Related Issues (14)
- Suggesting more optimization methods from Nevergrad HOT 11
- There are identical sub-expressions to the left and to the right of the and operator HOT 1
- Feature/Help request HOT 13
- Suggestion : export html at each step HOT 1
- Suggestion : apply time margin everywhere HOT 1
- Test Lakas with new versions of dependent modules HOT 1
- fixed time per move HOT 4
- Concurrency and CPU usage HOT 13
- EPD test suite HOT 2
- UCI parameters with blank in the name HOT 7
- Feature request: Fixed nodes per move HOT 3
- Error using spsa related to float/integer conversion HOT 1
- Some questions about how the optimizer works and best practice in usage HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lakas.