Stockfish version with hash saving capability

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Rodolfo Leoni
Posts: 544
Joined: Tue Jun 06, 2017 2:49 pm
Location: Italy

Re: Stockfish version with hash saving capability

Post by Rodolfo Leoni » Wed Aug 02, 2017 10:48 am

zullil wrote:
Rodolfo Leoni wrote:
zullil wrote:
Rodolfo Leoni wrote:
retep1 wrote:Is asmfish with option TTF-file one of the derivates with hash saving capability?
https://github.com/lantonov/asmFish/tre ... es/Windows
I tried it less than one minute. AsmFishW resets its hashes every time you make a move.
What? Are you using a GUI? Without looking at the code, I can't say what would trigger hash clearing in asmFish, but what you've claimed doesn't make sense to me.
Of course I use a Gui... Don't ask me to use an engine in console mode! :)

Arena Gui. Click "Analyze" and it's in infinite analysis. You'll see hashfull % raising to 99%, sometimes 100%. Then try making a move. Hashes start from 0%.

Then, try Stockfish "Savehash" version by Daniel. Uci option "Never clear hash" checked on. Click "Analyze" until hashfull is 99% (or 100%). Then try making a move and you'll see there's been no hash reset.

I hope this makes some senses....
I have no idea what UCI commands Arena sends to an engine when you "make a move", but, in any case, that would be an issue with the GUI, not with the engine.

And doesn't hashful simply report (approximately) the amount of hash utilized by the current search? So, of course, it starts at 0, but that doesn't mean the hash was cleared at the start of the search.
The command is "Go infinite" with the new position, in all GUIs. I once read a REM comment on Asmfish source (only things one can understand are the REMs there...). Lyudmil Antonov wrote "It only saves/loads hashes".

It's different from persistent hashes. With them all contents aren't cleared and the use for new hash entries is based on different criteria, as suggested by HGM with a brilliant solution.
F.S.I. Chess Teacher

Rodolfo Leoni
Posts: 544
Joined: Tue Jun 06, 2017 2:49 pm
Location: Italy

Re: Stockfish version with hash saving capability

Post by Rodolfo Leoni » Wed Aug 02, 2017 10:51 am

zullil wrote:
retep1 wrote:Is asmfish with option TTF-file one of the derivates with hash saving capability?
https://github.com/lantonov/asmFish/tre ... es/Windows
Yes. it is.
It saves/loads hashes but those aren't persistent hashes.
F.S.I. Chess Teacher

retep1
Posts: 43
Joined: Sun Aug 07, 2016 3:24 pm

Re: Stockfish version with hash saving capability

Post by retep1 » Wed Aug 02, 2017 11:03 am

Rodolfo Leoni wrote:
zullil wrote:
retep1 wrote:Is asmfish with option TTF-file one of the derivates with hash saving capability?
https://github.com/lantonov/asmFish/tre ... es/Windows
Yes. it is.
It saves/loads hashes but those aren't persistent hashes.
So I come to the conclusion: only the saving-hash engine is capable of persistent hash.

Rodolfo Leoni
Posts: 544
Joined: Tue Jun 06, 2017 2:49 pm
Location: Italy

Re: Stockfish version with hash saving capability

Post by Rodolfo Leoni » Wed Aug 02, 2017 11:09 am

retep1 wrote:
Rodolfo Leoni wrote:
zullil wrote:
retep1 wrote:Is asmfish with option TTF-file one of the derivates with hash saving capability?
https://github.com/lantonov/asmFish/tre ... es/Windows
Yes. it is.
It saves/loads hashes but those aren't persistent hashes.
So I come to the conclusion: only the saving-hash engine is capable of persistent hash.
Only the engine which keeps key positions depth and scores while on analysis have persistent hashes. To save/load them is a part of a whole.

There are engines with a much more elaborated PH system, as Critter and Stockfish PA GTB. Unfortunately, these are old and weaker engines.
F.S.I. Chess Teacher

zullil
Posts: 5668
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: Stockfish version with hash saving capability

Post by zullil » Wed Aug 02, 2017 11:13 am

Rodolfo Leoni wrote:
The command is "Go infinite" with the new position, in all GUIs. I once read a REM comment on Asmfish source (only things one can understand are the REMs there...). Lyudmil Antonov wrote "It only saves/loads hashes".

It's different from persistent hashes. With them all contents aren't cleared and the use for new hash entries is based on different criteria, as suggested by HGM with a brilliant solution.
I have no idea what you mean by a "persistent hash", but why would any chess program zero out the hash table before each move? That would be idiotic. Eventually, choices have to be made about which entries to keep and which to overwrite, and I imagine there are different approaches to deal with this issue of hash aging.

Rodolfo Leoni
Posts: 544
Joined: Tue Jun 06, 2017 2:49 pm
Location: Italy

Re: Stockfish version with hash saving capability

Post by Rodolfo Leoni » Wed Aug 02, 2017 11:14 am

BTW, I just tested AsmFishW save and load hashes: it doesn't work at all, even if no move is made.
F.S.I. Chess Teacher

Rodolfo Leoni
Posts: 544
Joined: Tue Jun 06, 2017 2:49 pm
Location: Italy

Re: Stockfish version with hash saving capability

Post by Rodolfo Leoni » Wed Aug 02, 2017 11:19 am

zullil wrote:..................
Eventually, choices have to be made about which entries to keep and which to overwrite, and I imagine there are different approaches to deal with this issue of hash aging.
That's what exactly all engines does NOT. They need their hashes free for the new search. I can search a post by Mark Lefler about it if you want.

The "different approach" is an idea by HGM, and it's the essence of PHs.
F.S.I. Chess Teacher

zullil
Posts: 5668
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: Stockfish version with hash saving capability

Post by zullil » Wed Aug 02, 2017 11:29 am

Rodolfo Leoni wrote:BTW, I just tested AsmFishW save and load hashes: it doesn't work at all, even if no move is made.
I just tested the Linux version. TTSave worked. TTLoad did not---until I discovered that the file created by TTSave had permissions 000. Once I made the file readable, TTLoad worked.

Rodolfo Leoni
Posts: 544
Joined: Tue Jun 06, 2017 2:49 pm
Location: Italy

Re: Stockfish version with hash saving capability

Post by Rodolfo Leoni » Wed Aug 02, 2017 11:35 am

zullil wrote:
Rodolfo Leoni wrote:BTW, I just tested AsmFishW save and load hashes: it doesn't work at all, even if no move is made.
I just tested the Linux version. TTSave worked. TTLoad did not---until I discovered that the file created by TTSave had permissions 000. Once I made the file readable, TTLoad worked.
Then, a more interesting test you could run could be, with little hash size:

a) let AsmfishW analyze a position until a consistant fail high/low happens.
b) save hash
c) close and restart GUI
d) load hashes and chech if AsmFishW hits the fail high/low immediately.

Here, it didn't work. I'm curious if it works under linux.
F.S.I. Chess Teacher

retep1
Posts: 43
Joined: Sun Aug 07, 2016 3:24 pm

Re: Stockfish version with hash saving capability

Post by retep1 » Wed Aug 02, 2017 11:50 am

Rodolfo Leoni wrote:
zullil wrote:
Rodolfo Leoni wrote:BTW, I just tested AsmFishW save and load hashes: it doesn't work at all, even if no move is made.
Then, a more interesting test you could run could be, with little hash size:

a) let AsmfishW analyze a position until a consistant fail high/low happens.
b) save hash
c) close and restart GUI
d) load hashes and chech if AsmFishW hits the fail high/low immediately.

Here, it didn't work. I'm curious if it works under linux.
Is the saving-hash engine capable of doing this? And if not, why is it then useful in connection with persistent hash?

Post Reply