Search found 4 matches

by Pemrograman
Thu May 09, 2013 12:45
Forum: Draughts, Computer, Internet
Topic: International checkers bitboard representation
Replies: 8
Views: 11200

Re: International checkers bitboard representation



[...]

We never thought of bitwise rotate, only bitwise shift, and then 64 bits are not enough to wrap all 4 edges :(
Main reason why bitwise rotate is not so much used is that C++ does not have a builtin operator for it. Do you perhaps program in Java?

C++, I use the vs2012 compiler intrinsics ...
by Pemrograman
Wed May 08, 2013 14:37
Forum: Draughts, Computer, Internet
Topic: International checkers bitboard representation
Replies: 8
Views: 11200

Re: International checkers bitboard representation

But if you offset the cylinder with a row of ghosts, wouldn't that lead to a donut with wrangled seams and achieving the same goal? It would require the rotate instruction though.



[57][58][59][60][61][62]
[63] 00, 01, 02, 03, 04,
05, 06, 07, 08, 09, [10]
[10] 11, 12, 13, 14, 15,
16, 17, 18, 19 ...
by Pemrograman
Wed May 08, 2013 11:39
Forum: Draughts, Computer, Internet
Topic: International checkers bitboard representation
Replies: 8
Views: 11200

Re: International checkers bitboard representation

This design was inspired by that bitboard tutorial. In a spreadsheet I tried different values for left and right rotating, and found that 1 and 14 worked very nice. I had not read about the ghost square bitboard, and I probably would not have tried this approach if I had known about it. I'm not ...
by Pemrograman
Wed May 08, 2013 01:02
Forum: Draughts, Computer, Internet
Topic: International checkers bitboard representation
Replies: 8
Views: 11200

International checkers bitboard representation

I don't know if this is already known, but I found that using this bit layout has some nice properties.


49 36 23 10 61
48 35 22 9 60
34 21 8 59 46
33 20 7 58 45
19 6 57 44 31
18 5 56 43 30
4 55 42 29 16
3 54 41 28 15
53 40 27 14 1
52 39 26 13 0


With 64 bit, it is always rotate 1 ...