New Chess Engine
Posted: 26 Jan 2011, 13:06
Hi everybody,
I'd like to introduce myself to this forum.
Roy van Rijn, website: http://www.redcode.nl/
Most of my free time up to now has been spend on Corewar programming and RecMath/Al Zimmermann's programming contests. During those contests I stumbled across bitboards and chess engines. So this weekend I decided it was time for me to write my own chess engine!
I've started out in Java (might translate it later on) and I'm now working on implementing all the rules (of course using bitboards). I haven't implemented en-passant/castling and promotion rules yet, here is what I have right now:
Perft:
Nodes: 20 (perft 1)
Captures: 0
Checks: 0
Mates: 0
---- 0ms
Nodes: 400 (perft 2)
Captures: 0
Checks: 0
Mates: 0
---- 10ms
Nodes: 8902 (perft 3)
Captures: 34
Checks: 12
Mates: 0
---- 160ms
Nodes: 197281 (perft 4)
Captures: 1576
Checks: 469
Mates: 8
---- 580ms
Nodes: 4865351 (perft 5)
Captures: 82461
Checks: 27351
Mates: 347
---- 3100ms
I think this works like it is used to, without the en-passant rule that is.
The speed isn't very good at the moment (I think?) but that is probably due to my costly 'check/pin'-checking (no xray yet) and the Kogge-Stone algorithm. That is why I'm now investigating magic bitboards (everybody seems to be using that right now). But I don't fully understand it yet (it'll come). The basic idea is clear, but the details are still a bit sketchy in my head, I'll probably need to implement it and see for myself. Maybe somebody has a more visual explaination? (those tend to work best for me). http://chessprogramming.wikispaces.com/Magic+Bitboards didn't yet do the trick.
I'm planning on making it interface with WinBoard eventually and create a fully working (open source) Java Chess Engine. Then the fun part starts, implementing search logic and tactics
I'd like to introduce myself to this forum.
Roy van Rijn, website: http://www.redcode.nl/
Most of my free time up to now has been spend on Corewar programming and RecMath/Al Zimmermann's programming contests. During those contests I stumbled across bitboards and chess engines. So this weekend I decided it was time for me to write my own chess engine!
I've started out in Java (might translate it later on) and I'm now working on implementing all the rules (of course using bitboards). I haven't implemented en-passant/castling and promotion rules yet, here is what I have right now:
Perft:
Nodes: 20 (perft 1)
Captures: 0
Checks: 0
Mates: 0
---- 0ms
Nodes: 400 (perft 2)
Captures: 0
Checks: 0
Mates: 0
---- 10ms
Nodes: 8902 (perft 3)
Captures: 34
Checks: 12
Mates: 0
---- 160ms
Nodes: 197281 (perft 4)
Captures: 1576
Checks: 469
Mates: 8
---- 580ms
Nodes: 4865351 (perft 5)
Captures: 82461
Checks: 27351
Mates: 347
---- 3100ms
I think this works like it is used to, without the en-passant rule that is.
The speed isn't very good at the moment (I think?) but that is probably due to my costly 'check/pin'-checking (no xray yet) and the Kogge-Stone algorithm. That is why I'm now investigating magic bitboards (everybody seems to be using that right now). But I don't fully understand it yet (it'll come). The basic idea is clear, but the details are still a bit sketchy in my head, I'll probably need to implement it and see for myself. Maybe somebody has a more visual explaination? (those tend to work best for me). http://chessprogramming.wikispaces.com/Magic+Bitboards didn't yet do the trick.
I'm planning on making it interface with WinBoard eventually and create a fully working (open source) Java Chess Engine. Then the fun part starts, implementing search logic and tactics