ruicoelhopedro / pawn

An experimental UCI chess engine
GNU General Public License v3.0
10 stars 1 forks source link

strategical & tactical moves #9

Closed tissatussa closed 1 year ago

tissatussa commented 2 years ago

recently i reached this position in one of my (tissatussa) recent online games :

r2q1rk1/5ppp/p1pbpn2/2pp1b2/8/1P1PPN1P/PBPN1PP1/R2Q1RK1 w - - 3 11

play chess puzzle = white to move2

position after 10... O-O : White to move.

chess strategy vs tactics

[ spoiler ] the best move is e4, which i failed to play .. SF and clones see this continuation as best from low depth and up, but Pawn thinks e4 is 2nd or 3rd best only at high depth AND with MPV more then 7 :

pawn leo puzzle MPV 7

pawn leo puzzle MPV 15

it seems Pawn is not looking for such strategical-&-tactical moves ? Or do we call this a 'positional' move ?


[Event "Rated Rapid game"]
[Site "@ https://lichess.org/y2BVx0oZ "]
[Date "2022.05.02"]
[White "tissatussa"]
[Black "janstahlberg"]
[Result "1-0"]
[WhiteElo "2005"]
[BlackElo "2132"]
[TimeControl "900+10"]
[ECO "A04"]
[Opening "Zukertort Opening: Sicilian Invitation"]

1. Nf3 c5 { A04 Zukertort Opening: Sicilian Invitation } 2. b3 d5 3. e3 Nf6 4. Bb2 Nc6 5. h3 Bf5 6. Bb5 a6 7. Bxc6+ bxc6 8. O-O e6 9. d3 Bd6 10. Nbd2 O-O 11. c4 Bxd3 12. Re1 h6 13. Ne5 Bxe5 14. Bxe5 Nd7 15. Bd6 Re8 16. Nf3 Bh7 17. Qc1 Rc8 18. Qa3 Qb6 19. Red1 e5 20. cxd5 Re6 21. dxe6 { Black resigns. } 1-0
ruicoelhopedro commented 2 years ago

It's close. With MultiPV 2, default Hash and 1 thread pawn actually prefers e4 at depth 16 (at least on the latest version)

tissatussa commented 2 years ago

then why shows my SCID output otherwise ? I use 64 Mb hash and e4 does not appear in the MPV-7 list ..

ruicoelhopedro commented 2 years ago

Are you using the latest version? I recently pushed some big Elo gainer commits, and I only tested the latest version with this position

tissatussa commented 2 years ago

aha .. i receive email notifications from GitHub, but it didn't mention any MAIN version update .. i remember you once supplied the github commands to get such LATEST version ? I certainly want to try this is SCID then, with your settings.

ruicoelhopedro commented 2 years ago

Just git pull inside the directory and then recompile. The latest version is always likely to be the strongest :)

tissatussa commented 2 years ago

thank you. This is what i did :

roelof@roelof-HP-Elite-x2-1012-G2:~/Compiled$ git clone https://github.com/ruicoelhopedro/pawn.git --recursive
Cloning into 'pawn'...
remote: Enumerating objects: 591, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 591 (delta 8), reused 15 (delta 8), pack-reused 566
Receiving objects: 100% (591/591), 284.00 KiB | 5.36 MiB/s, done.
Resolving deltas: 100% (439/439), done.
roelof@roelof-HP-Elite-x2-1012-G2:~/Compiled$ cd pawn/
roelof@roelof-HP-Elite-x2-1012-G2:~/Compiled/pawn$ git pull
Already up to date.

so, your git pull seemed not be needed ?

indeed, this version gives e4 a high ranking, with your settings :

pawn in scid finds e4

Pawn is improving ! What rating does it have ? I determined about 2350 then, remember ?

uci
id name pawn
id author ruicoelhopedro

option name Clear Hash type button
option name Hash type spin default 16 min 1 max 262144
option name MultiPV type spin default 1 min 1 max 255
option name Ponder type check default false
option name Threads type spin default 1 min 1 max 512
uciok

[ it would be handy to have the UCI id value 'version' along 'author' ]

tissatussa commented 2 years ago

maybe you supposed i had an old version by git clone on my PC, and by doing git pull i would update to the latest (main or dev?) source ? What does git pull do ? I thought git clone always gives me the latest main source ?

ruicoelhopedro commented 2 years ago

git pull works when you have already cloned the repository. Re-cloning will also update to the latest version, and in that case, the git pull does nothing indeed.

Since your rating estimate, pawn has improved at least 100 Elo in self-play. The last time I checked it was around -80 Elo compared to Drosophila 1.6 (2655 CCRL 40/15), so that should place it in the 2400-2500 range.

I have yet to release a proper version and get in contact with testers in CCRL to get pawn properly rated. There are some issues I would like to fix first and improve a little bit the strength before doing so :)

tissatussa commented 2 years ago

yes, i like Pawn to compete in CCRL !

btw. i noticed a bug when using Pawn in SCID : when changing its MPV # in the settings, Pawn can not run again (because it was already loaded) : SCID gives an error .. i have to close Pawn, edit its MPV # and then restart Pawn .. i'm on Linux Xubuntu 21.10

tissatussa commented 2 years ago

another question regarding such position & finding best move : whenever i stumble upon another curious position, i can post it .. but will you be able to improve Pawn accordingly ? I mean in general, not only regarding "such positions" .. and what about the ELO difference by self play : do you also reference other engines ? Maybe only self-play can lead to false assumptions ? [ why Drosophilia ]

ruicoelhopedro commented 2 years ago

yes, i like Pawn to compete in CCRL !

btw. i noticed a bug when using Pawn in SCID : when changing its MPV # in the settings, Pawn can not run again (because it was already loaded) : SCID gives an error .. i have to close Pawn, edit its MPV # and then restart Pawn .. i'm on Linux Xubuntu 21.10

Does Scid output engine log? If it tries to reset MultiPV while pawn is searching there may be undefined behaviour.

another question regarding such position & finding best move : whenever i stumble upon another curious position, i can post it .. but will you be able to improve Pawn accordingly ? I mean in general, not only regarding "such positions" .. and what about the ELO difference by self play : do you also reference other engines ? Maybe only self-play can lead to false assumptions ? [ why Drosophilia ]

A test position is useful to identify potential weaknesses of the search and evaluation and serves as a guide to improve them. Nevertheless, all changes must be validated with self-play. There is no point in finding the best move for a given complex position if the engine blunders at the next move. Cross-referencing with other engines is also very useful to measure progress, but I don't have enough resources to do so properly. Last time I did it I just picked 5 random engines from CCRL (drosophilia being one of them) and did a quick test.

tissatussa commented 2 years ago

Does Scid output engine log? If it tries to reset MultiPV while pawn is searching there may be undefined behaviour.

i would think so .. good point, i will look into it.

tissatussa commented 2 years ago

Cross-referencing with other engines is also very useful to measure progress, but I don't have enough resources to do so properly.

well, in past years i gathered a lot of (open source) engines, maybe i can help .. at least i can point you to GitHub pages containing their source codes .. then we can use my python script to compute its (new) rating ? I attached my recent list of my gathered engines & versions & ratings : chess-engines-list.zip

tissatussa commented 2 years ago

regarding the SCID issue : Here is a text part of https://sourceforge.net/p/scid/wiki/TheEngineList/ :

Engine commands and directories

For each engine, you must specify the executable file to run and which directory Scid should run it in.

The most likely cause of engine starting problems is the choice of which directory the engine should run in. Some engines require an initialization or opening book file in their start directory to run properly. Other engines (like Crafty) write log files to the directory they start in, so you will need to run them in a directory where you have write access. If the directory setting for an engine is ".", Scid will just start the engine in the current directory.

So if an engine that should work fine in Scid does not start, try changing its directory setting. To avoid engines creating log files in many different directories, I recommend starting engines in the directory of the Scid User files (this is where the scid.exe file is located on Windows, or ~/.scid/ on Unix); there is a button in the dialog box for editing engine details marked scid.exe dir on Windows or ~/.scid on Unix that lets you set the engine to start in this directory. [...]

I let all engines run in their own directory .. according to the Wiki, Scid does NOT seem to write logs and Pawn does't write a log either .. only some engines (always) write their log file, but i tend to disable all logging when such (UCI) option exists.

i guess you can build a dev version which writes a log, so i can supply you the resulting log when switching MPV ?

ruicoelhopedro commented 2 years ago

Cross-referencing with other engines is also very useful to measure progress, but I don't have enough resources to do so properly.

well, in past years i gathered a lot of (open source) engines, maybe i can help .. at least i can point you to GitHub pages containing their source codes .. then we can use my python script to compute its (new) rating ? I attached my recent list of my gathered engines & versions & ratings : chess-engines-list.zip

Thank you :) Btw, there should be another Elo gainer coming up, almost passing LTC.

regarding the SCID issue : Here is a text part of https://sourceforge.net/p/scid/wiki/TheEngineList/ :

Engine commands and directories

For each engine, you must specify the executable file to run and which directory Scid should run it in.

The most likely cause of engine starting problems is the choice of which directory the engine should run in. Some engines require an initialization or opening book file in their start directory to run properly. Other engines (like Crafty) write log files to the directory they start in, so you will need to run them in a directory where you have write access. If the directory setting for an engine is ".", Scid will just start the engine in the current directory.

So if an engine that should work fine in Scid does not start, try changing its directory setting. To avoid engines creating log files in many different directories, I recommend starting engines in the directory of the Scid User files (this is where the scid.exe file is located on Windows, or ~/.scid/ on Unix); there is a button in the dialog box for editing engine details marked scid.exe dir on Windows or ~/.scid on Unix that lets you set the engine to start in this directory. [...]

I let all engines run in their own directory .. according to the Wiki, Scid does NOT seem to write logs and Pawn does't write a log either .. only some engines (always) write their log file, but i tend to disable all logging when such (UCI) option exists.

i guess you can build a dev version which writes a log, so i can supply you the resulting log when switching MPV ?

That's a good idea, I can work on a version with debug outputs.

tissatussa commented 2 years ago

Btw, there should be another Elo gainer coming up, almost passing LTC.

so, a newer Pawn version is coming .. what is LTC ?

I can work on a version with debug outputs.

yes, then you can make an UCI option 'en/disable log output' and maybe even browse for dir/file name.

ruicoelhopedro commented 2 years ago

so, a newer Pawn version is coming .. what is LTC ?

Long time control test, 60+0.6