Bare in mind, before I share it, that it has been two months since I had this discussion, and I may have forgotten some elements of it.

It is based around bitboards, and the uniqueness of how chess pieces move.

Take, for instance, a pawn on d2. It can move to d3, d4, and possibly capture on e3 and c3. If we make a bitboard of this, we get:

Code: Select all

```
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - X - - - -
- - X X X - - -
- - - - - - - -
- - - - - - - -
```

Now, let's take a knight, and put it on d2, for the sake of example. It can move to b1, b3, c4, e4, f3 and f1. Once again, only a knight could get to those squares. Make a bitboard of it and you get:

Code: Select all

```
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - X - X - - -
- X - - - X - -
- - - - - - - -
- X - - - X - -
```

Now we get to the sliders, and for the sake of shortness, I will show how a queen fits in. Here is where some potentially useful information is lost. For sliders, we ignore all other pieces on the board for uniqueness. So, our queen goes to d1, e1, e2, f2, g2, h2, e3, f4, g5, h6, d3, d4, d5, d6, d7, d8, c3, b4, a5, c2, b2, a2, and c1. Only a queen could go to these squares. A bitboard:

Code: Select all

```
- - - X - - - -
- - - X - - - -
- - - X - - - X
X - - X - - X -
- X - X - X - -
- - X X X - - -
X X X - X X X X
- - X X X - - -
```

The main point of this is that it has a much lower collision rate than Zobrist keys, even 128-bit ones, but 128 bits is impractical for anything other than Perft, IMO.

Feel free to point out massive mistakes made.

Matthew:out