Chess engines often use Zobrist hashing for quick lookups. An ideal of Zobrist hashing (as with hashing in general) is that the generated keys be as dissimilar as possible for similar positions.
The problem then, is this - how can one map similar positions to similar keys? In short, what I would like is a quick and dirty way of classifying chess positions (through the hash function alone). Has anyone any interesting ideas?
The definition of a chess position here is not merely the board position, but also the current state of the game (whether castling or making an en passant capture possible etc.)
Ideally positional concepts from chess should be incorporated into the hash function. Perhaps there should be two hash tables, one for Black to move, and one for White to move, since these positions could well be very different in nature. I have found a couple of similar questions, e.g. efficient storage of a chess position on stackoverflow and elsewhere, but very few answers.
This question is probably chess-oriented for stackoverflow, but it is also too programming-oriented for https://chess.stackexchange.com/
Edit: Apologies if this came across as if I am expecting a complete solution without having done any work myself, but I was simply hoping for some discussion or interesting ideas, having very relatively little knowledge of topic myself. Everything that I have found so far aims to separate the keys as far apart as possible rather than purposely grouping them together, such as http://chessprogramming.wikispaces.com/Zobrist+Hashing
Edit: A related question (and another way to go about solving the underlying problem) is the devising of some similarity measure between two chess positions. Has anyone any ideas regarding this approach?