Closed lantonov closed 6 years ago
With the latest changes (Bishops on long diagonals) it is
Total time (ms) : 2090
Nodes searched : 5620312
Nodes/second : 2689144
I don't like the pedantic option coming back. We can either
For me, the last option is best.
Also, the logger is going to be completely broken in windows because of those stupid DOS line endings. This will take some time to fix.
You might try turning on the logger and seeing what kind of mess it makes.
setoption name logfile value log.txt
I agree that the best option is to petition sf team to drop chess960 condition. OTH, having a matching bench is useful for checking (though we can check also with fixed-depth games). For optimising chess960 i cannot say because don't know what effort is necessary. I am almost ready with the make.bat. It assembles all but armFish.
P.S. Forget this. I solved it by rearranging the order the include variable is set. Now all assemble.
for me, all executables are built when using the provided makefile. but the windows base version is missing there, i added it myself and it does work. not sure if it was not included for a reason or simply was forgotten.
what does not work (yet), is
SetDefault 1, USE_WEAKNESS
maybe not ready at the time posting.
thanks for putting all that effort into this.
The -e 1000
displays the last thousand errors, and you got all of them! Can you trim your post?
It looks like you are trying to process the arm source with the x86 includes.
https://github.com/tthsqe12/asm/blob/master/makefile#L3
Please use set include=arm\include\
- it took me a month to write these includes!
I had set the include like this
set include=arm\include\; x86\include\
This was wrong. Now make.bat looks like this and works:
@echo off
rem set include=x86\include\;arm\include\
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "datestamp=%YYYY%-%MM%-%DD%" & set "timestamp=%HH%%Min%%Sec%" & set "fullstamp=%YYYY%-%MM%-%DD%_%HH%%Min%%Sec%"
set include=arm\include\
"fasmg.exe" "arm\fish.arm" "armFishL_%datestamp%_v8" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSION_POST = 'v8'"
set include=x86\include\
"fasmg.exe" "x86\fish.asm" "asmFishW_%datestamp%_popcnt.exe" -e 1000 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSION_POST = 'popcnt'"
"fasmg.exe" "x86\fish.asm" "asmFishW_%datestamp%_bmi2.exe" -e 1000 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'"
"fasmg.exe" "x86\fish.asm" "asmFishL_%datestamp%_popcnt" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSION_POST = 'popcnt'"
"fasmg.exe" "x86\fish.asm" "asmFishL_%datestamp%_bmi2" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'"
"fasmg.exe" "x86\fish.asm" "asmFishX_%datestamp%_popcnt" -e 1000 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSION_POST = 'popcnt'"
"fasmg.exe" "x86\fish.asm" "asmFishX_%datestamp%_bmi2" -e 1000 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'"
@mausalimi, I suppose that base versions were omitted because no one uses them. If not so, there is no problem for them to be included.
@lantonov , I add your make file to the repo. Your next task is to parallelize the make file, i.e. the gcc compiler supports -j4
for using 4 threads. If you can figure out how to do this on windows, I will try to figure out how to do it on linux.
Also, on windows it would be nice to have the ability to just make the windows version, for example. Can this be done from the same .bat file, or would another .bat file be the simplest method?
@lantonov i guess you're right... i see you dropped it too in your batch file.
i noticed the windows executables are different when i use your batch instead of the makefile. strange.
/edit: ouch, sorry, i missed that.
@mausalimi, lantanov has set PEDANTIC=1
.
Problem is I don't see something like the gcc -j command line option in fasm / fasmg
the easiest way to parallelize commands in a batch is using an external command like mparallel
https://www.videohelp.com/software/MParallel
an example then would be:
mparallel.exe --count=%1 "fasmg.exe" "x86\fish.asm" "asmFishW_%datestamp%_base.exe" -e 1000 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'base'" : "fasmg.exe" "x86\fish.asm" "asmFishW%datestamp%_popcnt.exe" -e 1000 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'popcnt'" : "fasmg.exe" "x86\fish.asm" "asmFishW%datestamp%_bmi2.exe" -e 1000 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'bmi2'" : "fasmg.exe" "x86\fish.asm" "asmFishL%datestamp%_popcnt" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'popcnt'" : "fasmg.exe" "x86\fish.asm" "asmFishL%datestamp%_bmi2" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'bmi2'" : "fasmg.exe" "x86\fish.asm" "asmFishX%datestamp%_popcnt" -e 1000 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'popcnt'" : "fasmg.exe" "x86\fish.asm" "asmFishX%datestamp%_bmi2" -e 1000 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'"
all in one line, with a : as separator. "make 3" will use 3 threads. doing the same with just the standard windows tools would require you to write a very complex batch. or use powershell. but maybe someone has a simpler solution to offer.
that said, the *official" makefile also uses only 1 thread in mingw. i can use "make -j3" but still the files are built one after the other.
@lantonov , or course you can't parallelize the processing of each individual source. What I meant was to run the commands
set include=arm\include\
"fasmg.exe" "arm\fish.arm" "armFishL_%datestamp%_v8" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSION_POST = 'v8'"
set include=x86\include\
"fasmg.exe" "x86\fish.asm" "asmFishW_%datestamp%_popcnt.exe" -e 1000 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSION_POST = 'popcnt'"
"fasmg.exe" "x86\fish.asm" "asmFishW_%datestamp%_bmi2.exe" -e 1000 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'"
"fasmg.exe" "x86\fish.asm" "asmFishL_%datestamp%_popcnt" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSION_POST = 'popcnt'"
"fasmg.exe" "x86\fish.asm" "asmFishL_%datestamp%_bmi2" -e 1000 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'"
"fasmg.exe" "x86\fish.asm" "asmFishX_%datestamp%_popcnt" -e 1000 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSION_POST = 'popcnt'"
"fasmg.exe" "x86\fish.asm" "asmFishX_%datestamp%_bmi2" -e 1000 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'"
in parallel
simple make -j4
doesn't make much difference in timing
C:\Git\asmFish>make -j4
flat assembler version g.hwx32
3 passes, 4.8 seconds, 128242 bytes.
flat assembler version g.hwx32
5 passes, 16.1 seconds, 115200 bytes.
flat assembler version g.hwx32
5 passes, 15.3 seconds, 110592 bytes.
flat assembler version g.hwx32
4 passes, 12.3 seconds, 112518 bytes.
flat assembler version g.hwx32
4 passes, 11.9 seconds, 107926 bytes.
flat assembler version g.hwx32
4 passes, 12.0 seconds, 119495 bytes.
flat assembler version g.hwx32
4 passes, 11.7 seconds, 115399 bytes.
The fasmg port was put in a new branch 'fasmg' in the repository https://github.com/lantonov/asmFish/tree/fasmg The executables continue to be in the same branch 'executables' as before https://github.com/lantonov/asmFish/tree/executables
I can supply the bat file with a menu to choose the different tasks which we want it to do.
Now the make.bat file presents a menu:
EXECUTABLES
==========
1 - All
2 - Windows
3 - Linux
4 - Mac
5 - ARM
6 - Base
Q - Quit
Works well..just did Windows and it makes me a pop & bmi2 version!
Ipman.
with above mentioned "mparallel.exe" it's pretty easy to make parallel compilation.
` set threads=%1 if "%~1" == "" set threads=2
set include=x86\include\ mparallel.exe --silent --count=%threads% ^ "fasmg.exe" "x86\fish.asm" "asmFishW_%datestamp%_base.exe" -e 100 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'base'" :^ "fasmg.exe" "x86\fish.asm" "asmFishW%datestamp%_popcnt.exe" -e 100 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'popcnt'" :^ "fasmg.exe" "x86\fish.asm" "asmFishW%datestamp%_bmi2.exe" -e 100 -i "VERSION_OS='W'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'bmi2'" :^ "fasmg.exe" "x86\fish.asm" "asmFishL%datestamp%_popcnt" -e 100 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'popcnt'" :^ "fasmg.exe" "x86\fish.asm" "asmFishL%datestamp%_bmi2" -e 100 -i "VERSION_OS='L'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'bmi2'" :^ "fasmg.exe" "x86\fish.asm" "asmFishX%datestamp%_popcnt" -e 100 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSIONPOST = 'popcnt'" :^ "fasmg.exe" "x86\fish.asm" "asmFishX%datestamp%_bmi2" -e 100 -i "VERSION_OS='X'" -i "PEDANTIC = 1" -i "VERSION_POST = 'bmi2'" `
a simple "make" will use 2 threads (default), "make 3" 3 threads etc. not really great, but good enough for me.
stockfish-452e515 vs asmFishW_2017-10-03_bmi2.exe 1000 games depth 14 result +184 -184 =632, 0.00 +/- 0.00 Elo, 0/500 different Perfect alignment !!!
The original fasm1 version had the (smaller) include directory hard-coded into the source. Should a similar approach be adopted for the fasmg version? If so, this means that we can say good bye to environment variables, but it also would mean that converting future updates to the x86 includes from Thomasz would no longer be a simple drag-n-drop operation. I suspect that there will little change to these includes from now on.
Also, I have updated the windows version again on my asm repo to hopefully fix newlines. @lantonov , could you make sure that it still works and that the logger works as one would expect? For the logger, you would do
setoption name logfile value log.txt
then do some stuff. The engine has log.txt open until you either change the logfile, or set it back to <empty>
, or quit.
We use the fasmg compiler here only as executable (which now, however, needs the includes in order to work). If the includes are in fasmg source code, they will be in the executable, and we'd no longer need the include directory and environment variables pointing to it. That's how I understand it. Now, if Thomasz makes a new version of fasmg (including the includes) and we replace the fasmg executable in the repo with the new version, everything is expected to assemble and work as before ? If so, it would be easier to do. If changing the includes requires to change our code (asmFish) that would depend on the changes required but I think the better variant is for includes to go with the assembler. BTW, I changed the fasmg / fasmg.exe in the repo with the newest version (hxhsr) and it still works, at least at first glance. I will test the log when I get home because here I have only a 32-bit Windows.
Here is the log.txt. Seems ok
<<363976718: go depth 20
>>363976718: info depth 1 seldepth 1 multipv 1 time 0 nps 20000 score cp 92 nodes 20 tbhits 0 pv e2e4
>>363976719: info depth 2 seldepth 2 multipv 1 time 1 nps 47000 score cp 87 nodes 47 tbhits 0 pv e2e4 b7b6
>>363976719: info depth 3 seldepth 3 multipv 1 time 1 nps 111000 score cp 124 nodes 111 tbhits 0 pv d2d4 d7d6 e2e4
>>363976719: info depth 4 seldepth 4 multipv 1 time 1 nps 256000 score cp 107 nodes 256 tbhits 0 pv d2d4 d7d6 e2e4 d6d5
>>363976720: info depth 5 seldepth 5 multipv 1 time 2 nps 555000 score cp 43 nodes 1110 tbhits 0 pv b1c3 d7d5 e2e4 d5e4 c3e4
>>363976721: info depth 6 seldepth 6 multipv 1 time 3 nps 932666 score cp 27 nodes 2798 tbhits 0 pv e2e4 d7d5 e4e5 e7e6 d2d4 b8c6
>>363976721: info depth 7 seldepth 8 multipv 1 time 3 nps 1386333 score cp 20 nodes 4159 tbhits 0 pv e2e4 d7d5 b1c3 d5e4 c3e4 b8c6 d1f3
>>363976725: info depth 8 seldepth 10 multipv 1 time 7 nps 906857 score cp 67 nodes 6348 tbhits 0 pv e2e4 d7d6 d2d4 g8f6 d1d3 d8d7 b1c3 e7e5
>>363976730: info depth 9 seldepth 13 multipv 1 time 12 nps 1473416 score cp 9 nodes 17681 tbhits 0 pv e2e4 e7e5 d2d4 e5d4 d1d4 b8c6 d4d2 g8f6 b1c3 f8b4
>>363976737: info depth 10 seldepth 12 multipv 1 time 19 nps 1787789 score cp 25 nodes 33968 tbhits 0 pv e2e4 d7d5 e4d5 d8d5 b1c3 d5e6 d1e2 b8c6 e2e6 c8e6 g1f3
>>363976747: info depth 11 seldepth 15 multipv 1 time 29 nps 1944758 score cp 48 nodes 56398 tbhits 0 pv e2e4 e7e5 g1f3 b8c6 b1c3 f8c5 d2d4 c5d4 c1g5 d4c3 b2c3 g8f6
>>363976782: info depth 12 seldepth 17 multipv 1 time 64 nps 2105390 score cp 40 nodes 134745 tbhits 0 pv e2e4 e7e5 g1f3 g8f6 d2d4 f6e4 d1e2 d7d5 f3e5 b8c6 e5c6 b7c6 b1c3 d8e7
>>363976862: info depth 13 seldepth 20 multipv 1 time 144 nps 2166631 score cp 29 nodes 311995 tbhits 0 pv g1f3 d7d5 d2d4 e7e6 e2e3 c7c5 f1e2 b8c6 e1g1 g8f6 c2c4 c5d4 e3d4 d5c4
>>363976926: info depth 14 seldepth 18 multipv 1 time 208 nps 2158980 score cp 24 nodes 449068 tbhits 0 pv g1f3 d7d5 d2d4 e7e6 e2e3 c7c5 f1e2 b8c6 e1g1 g8f6 c2c4 c5d4 f3d4 e6e5 c4d5 f6d5 d4c6 b7c6
>>363976997: info depth 15 seldepth 20 multipv 1 time 279 nps 2182641 score cp 21 nodes 608957 tbhits 0 pv e2e4 e7e5 g1f3 b8c6 f1c4 g8f6 d2d3 f8c5 b1c3 d7d6 e1g1 e8g8 a2a3 c8d7 c3a4
>>363977196: info depth 16 seldepth 26 multipv 1 time 478 nps 2180361 score cp 20 nodes 1042213 tbhits 0 pv d2d4 d7d5 e2e3 g8f6 g1f3 e7e6 c2c4 f8e7 f1d3 e8g8 e1g1 c7c5 c4d5 e6d5 d4c5 b8c6 c1d2 e7c5
>>363977325: info depth 17 seldepth 24 multipv 1 time 607 nps 2185467 score cp 15 nodes 1326579 tbhits 0 pv d2d4 d7d5 e2e3 g8f6 g1f3 e7e6 c2c4 f8e7 f1e2 e8g8 e1g1 d5c4 f3e5 c7c5 b1c3 c5d4 e3d4 b8c6 e5c6
>>363977778: info depth 18 seldepth 26 multipv 1 time 1060 nps 2203201 score cp 27 nodes 2335394 hashfull 808 tbhits 0 pv e2e4 e7e5 g1f3 b8c6 d2d4 e5d4 f3d4 d7d5 b1c3 d5e4 f1b5 c8d7 b5c6 d7c6 d4c6 b7c6 d1d8 a8d8 c3e4
>>363978594: info depth 19 seldepth 30 multipv 1 time 1876 nps 2206909 score cp 42 nodes 4140163 hashfull 965 tbhits 0 pv e2e4 e7e5 g1f3 b8c6 d2d4 e5d4 f3d4 g8f6 d4c6 d7c6 d1d8 e8d8 b1c3 f8c5 f2f3 d8e7 c1f4 c5b6 e1c1 c8e6 f1d3 f6h5 f4d2 h8d8 c1b1
>>363978860: info depth 20 seldepth 32 multipv 1 time 2142 nps 2208603 score cp 36 nodes 4730829 hashfull 983 tbhits 0 pv e2e4 e7e5 g1f3 b8c6 d2d4 e5d4 f3d4 g8f6 d4c6 d7c6 d1d8 e8d8 b1c3 f8b4 f2f3 c8e6 c1f4 a8c8 e1c1 d8e7 f4e3 f6d7 e3a7 b4c3 b2c3
>>363978860: bestmove e2e4 ponder e7e5
<<363999934: setoption name logfile value <empty>
environment variables are a bit of a pain in windows honestly.
Especially, if you are on a corporate network and not administrator, you have to make batch files with paths and environmental variables for almost everything.
stockfish-b364897 vs asmFish-2608ad8 1000 games depth 14 result +163 -163 =674, 0.00 +/- 12.28 Elo, 0/500 different
stockfish-9d79138 vs asmFish-2608ad8 400 games depth 14 result +66 -74 =260, -6.95 +/- 20.13 Elo, 200/200 pairs different The difference is in the last 3 patches of 5 and 11 October in SF
stockfish-486c817 vs asmFish-d3f23cf 1000 games depth 14 result +161 -161 =678, 0.00 +/- 13.18 Elo, 0 pairs different These are patches up to and including Replace easyMove with simple scheme Games attached: games bench test
asmFishW_2017-11-05_bmi2
bench
*** bench hash 16 threads 1 depth 13 ***
1: nodes: 247873 2295 knps 108 ms
2: nodes: 224091 2435 knps 92 ms
3: nodes: 75445 3592 knps 21 ms
4: nodes: 263095 2604 knps 101 ms
5: nodes: 58185 2424 knps 24 ms
6: nodes: 66194 2206 knps 30 ms
7: nodes: 152849 2093 knps 73 ms
8: nodes: 489372 2434 knps 201 ms
9: nodes: 223248 2255 knps 99 ms
10: nodes: 45532 2529 knps 18 ms
11: nodes: 158910 2207 knps 72 ms
12: nodes: 181670 2188 knps 83 ms
13: nodes: 233451 2334 knps 100 ms
14: nodes: 97664 2271 knps 43 ms
15: nodes: 207289 2657 knps 78 ms
16: nodes: 49489 2749 knps 18 ms
17: nodes: 77779 3240 knps 24 ms
18: nodes: 12115 4038 knps 3 ms
19: nodes: 100562 4022 knps 25 ms
20: nodes: 175075 3432 knps 51 ms
21: nodes: 56617 4044 knps 14 ms
22: nodes: 24454 4890 knps 5 ms
23: nodes: 96907 4845 knps 20 ms
24: nodes: 49970 3331 knps 15 ms
25: nodes: 8528 4264 knps 2 ms
26: nodes: 180473 3405 knps 53 ms
27: nodes: 272183 3024 knps 90 ms
28: nodes: 218713 2733 knps 80 ms
29: nodes: 73074 2922 knps 25 ms
30: nodes: 19389 3877 knps 5 ms
31: nodes: 57583 4429 knps 13 ms
32: nodes: 87106 4355 knps 20 ms
33: nodes: 40369 5046 knps 8 ms
34: nodes: 77252 3862 knps 20 ms
35: nodes: 128069 3766 knps 34 ms
36: nodes: 118338 4930 knps 24 ms
37: nodes: 426423 3411 knps 125 ms
38: nodes: 5338 2669 knps 2 ms
39: nodes: 15048 3009 knps 5 ms
40: nodes: 0 0 knps 0 ms
41: nodes: 0 0 knps 0 ms
42: nodes: 138930 2043 knps 68 ms
===========================
Total time (ms) : 1892
Nodes searched : 5234652
Nodes/second : 2766729
stockfish-4bc1198 vs asmFish-16692fd 560 games depth 14 result +100 -100 =360, 0.00 +/- 17.19 Elo, 0 pairs different
stockfish-652199d vs asmFishW_5433bc2, 1000 games depth 14 result +206 -206 =588, 0.00 +/- 13.81 Elo, 0 pairs different
asmFishW_2017-11-07_bmi2
bench
*** bench hash 16 threads 1 depth 13 ***
1: nodes: 267656 2268 knps 118 ms
2: nodes: 224683 2390 knps 94 ms
3: nodes: 149158 3551 knps 42 ms
4: nodes: 206633 2519 knps 82 ms
5: nodes: 75742 2443 knps 31 ms
6: nodes: 80301 2294 knps 35 ms
7: nodes: 214891 2238 knps 96 ms
8: nodes: 524367 2330 knps 225 ms
9: nodes: 230233 2151 knps 107 ms
10: nodes: 114203 2429 knps 47 ms
11: nodes: 285818 2165 knps 132 ms
12: nodes: 148333 2149 knps 69 ms
13: nodes: 130211 2325 knps 56 ms
14: nodes: 126993 2267 knps 56 ms
15: nodes: 131824 2584 knps 51 ms
16: nodes: 76418 2729 knps 28 ms
17: nodes: 57172 3176 knps 18 ms
18: nodes: 9620 4810 knps 2 ms
19: nodes: 64440 3790 knps 17 ms
20: nodes: 226888 3490 knps 65 ms
21: nodes: 46183 4198 knps 11 ms
22: nodes: 20878 5219 knps 4 ms
23: nodes: 87970 4887 knps 18 ms
24: nodes: 45130 3223 knps 14 ms
25: nodes: 8928 2976 knps 3 ms
26: nodes: 54608 3413 knps 16 ms
27: nodes: 225844 2933 knps 77 ms
28: nodes: 387735 2769 knps 140 ms
29: nodes: 46670 2745 knps 17 ms
30: nodes: 20481 4096 knps 5 ms
31: nodes: 73847 4343 knps 17 ms
32: nodes: 48113 4009 knps 12 ms
33: nodes: 29951 4278 knps 7 ms
34: nodes: 103343 3690 knps 28 ms
35: nodes: 177257 3692 knps 48 ms
36: nodes: 112174 4877 knps 23 ms
37: nodes: 508109 3387 knps 150 ms
38: nodes: 5373 2686 knps 2 ms
39: nodes: 16489 2748 knps 6 ms
40: nodes: 0 0 knps 0 ms
41: nodes: 0 0 knps 0 ms
42: nodes: 117582 2027 knps 58 ms
===========================
Total time (ms) : 2027
Nodes searched : 5482249
Nodes/second : 2704612
The new fish behaves well: