Empirically, "almost legal" move checking (sanity checks) is sufficient - that is what I do. No legal move checking is not sufficient even with a full 64-bit hashcode.
--Jon
Zobrist free
Moderator: Ras
-
jdart
- Posts: 4420
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
-
Ras
- Posts: 2735
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Zobrist free
Do you have some kind of output in case the sanity check fails? Did you ever see that happen?jdart wrote:Empirically, "almost legal" move checking (sanity checks) is sufficient - that is what I do.
-
hgm
- Posts: 28456
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Zobrist free
To get a stronger key, you can make a 64-bit signature by XORing the key with the (incremental) evaluation. This makes the low-order bits (from which the index is supposed to be derived) also relevant.jdart wrote:No legal move checking is not sufficient even with a full 64-bit hashcode.
-
jdart
- Posts: 4420
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Zobrist free
I have a lot of asserts. So if I run the code in debug mode, it will check for all kinds of conditions (out of range square, no piece on start square for a move, etc.) and stop on any error. And I have run it in debug mode for extensive periods of time.
--Jon
--Jon
-
Ras
- Posts: 2735
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Zobrist free
OK, and how many of these errors with qualified hash collision did you get? Or is the question pointless because you are using much longer hashes anyway?jdart wrote:stop on any error. And I have run it in debug mode for extensive periods of time.
-
jdart
- Posts: 4420
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Zobrist free
I don't know what you mean by qualified hash colllision.
I am getting no errors, using a 64-bit hash and the Crafty "lockless hashing" method.
--Jon
I am getting no errors, using a 64-bit hash and the Crafty "lockless hashing" method.
--Jon
-
Ras
- Posts: 2735
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Zobrist free
That it is not only an index collision, but the full 64 bit hash collides.jdart wrote:I don't know what you mean by qualified hash colllision.
Then strictly speaking, this suggests that move checking is not necessary.I am getting no errors, using a 64-bit hash
-
jdart
- Posts: 4420
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Zobrist free
Definitely full hash collisions are possible, although rare.
And yes, what I am saying is that full legal move checking is not needed, but sanity checks on retrieved moves are.
--Jon
And yes, what I am saying is that full legal move checking is not needed, but sanity checks on retrieved moves are.
--Jon
-
Dann Corbit
- Posts: 12817
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Zobrist free
What happens if someone is using Arasan to play correspondence chess at 24 hours per move?Ras wrote:That it is not only an index collision, but the full 64 bit hash collides.jdart wrote:I don't know what you mean by qualified hash colllision.
Then strictly speaking, this suggests that move checking is not necessary.I am getting no errors, using a 64-bit hash
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
Ras
- Posts: 2735
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Zobrist free
He might lose in case his opponent is using Stockfish?Dann Corbit wrote:What happens if someone is using Arasan to play correspondence chess at 24 hours per move?
It all depends on what the goal is. Is the performance sacrificed for the checks worth the overall Elo or not? That's subjective. I myself would also opt for the additional checking because a clean loss feels better to me than a crash.