How much time did it take you to convert:
1. Mailbox -> Rotated bitboard
2. Mailbox -> Magic bitboard
And have it 100% bug free.
Bitboard implementation, how much time?
Moderators: hgm, Rebel, chrisw
-
- Posts: 7025
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Bitboard implementation, how much time?
I never used mailboxRebel wrote:How much time did it take you to convert:
1. Mailbox -> Rotated bitboard
2. Mailbox -> Magic bitboard
And have it 100% bug free.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Bitboard implementation, how much time?
Vague question.Rebel wrote:How much time did it take you to convert:
1. Mailbox -> Rotated bitboard
2. Mailbox -> Magic bitboard
And have it 100% bug free.
FIrst move generator for Crafty, late 1994, took 3 months. Rotated bitboards came later. Another 3 months to work out the details and get code working. Moving to magic took an hour.
It is not a day's work. Magic was fastest because we had existing code. Those that originally used my rotated bitboard idea had the same advantage.
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Bitboard implementation, how much time?
I wrote a basic rotated bitboard engine from scratch (different orientation than described in Bob's paper though) in a few evenings.
I replaced it with "kindergarten" multiplication in one evening or so (this was not only simpler, but also faster).
Afterwards, I wrote a "kindergarten" bitboard engine basically from scratch in an evening (this one dealing with "hoppers" as well as "sliders"). I later extended that to arbitrary rectangular boards with up to 128 squares and width/height < 16 again in a few evenings (took a bit longer because I had to refactor a lot of code).
In other words, not a very long time...
I never wrote a mailboard program, but my first chess program used an 8x8 char array. I never reused code from that for anything though.
I replaced it with "kindergarten" multiplication in one evening or so (this was not only simpler, but also faster).
Afterwards, I wrote a "kindergarten" bitboard engine basically from scratch in an evening (this one dealing with "hoppers" as well as "sliders"). I later extended that to arbitrary rectangular boards with up to 128 squares and width/height < 16 again in a few evenings (took a bit longer because I had to refactor a lot of code).
In other words, not a very long time...
I never wrote a mailboard program, but my first chess program used an 8x8 char array. I never reused code from that for anything though.
-
- Posts: 4368
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Bitboard implementation, how much time?
I did 1. back in '96-'97 and it was 6 months between releases. I think I did the bulk of it in a couple of months though. Crafty had done this earlier but I didn't really understand Crafty's implementation and my square numbering was different, so my implementation was done from scratch.
Then I did rotated->magic, but like many I am using a modified version of Pradyu Kannan's code for that. So that was easier.
Then I did rotated->magic, but like many I am using a modified version of Pradyu Kannan's code for that. So that was easier.
-
- Posts: 1539
- Joined: Thu Mar 09, 2006 2:02 pm
Re: Bitboard implementation, how much time?
Hmm, reading the numbers here is doesn't seem too unlikely that someone who knows Crafty can rewrite fruit within a few weeks/monthes to bitboards...
Bye
Ingo
Bye
Ingo
-
- Posts: 454
- Joined: Sat Apr 04, 2009 6:44 pm
- Location: Bulgaria
Re: Bitboard implementation, how much time?
1 month to wrote new generator and debug it. 2 weeks after it the program was 100% translated. It is a simple program though.
-
- Posts: 27837
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Bitboard implementation, how much time?
Oh, I am pretty sure I could do that in a week. (I'd use 'Kindergarten bitboards' rather than magics, because I dislike big tables.)IWB wrote:Hmm, reading the numbers here is doesn't seem too unlikely that someone who knows Crafty can rewrite fruit within a few weeks/monthes to bitboards...
Bye
Ingo
For micro-Max it would probably take less than a day.
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: Bitboard implementation, how much time?
Not too difficult when considering that the micro-Max source code itself isn't much bigger than a bitboardhgm wrote:For micro-Max it would probably take less than a day.
Sven
-
- Posts: 792
- Joined: Wed Jul 19, 2006 9:58 am
Re: Bitboard implementation, how much time?
Assuming a "week" is four evenings, and a full weekend day..
Using Bob's paper, rotated took a month, and I also needed the Crafty source to get my head around it.
Magics took a couple of weeks, again, CPW, Glaurung Source, Pradu's posts on this site were all needed to understand it.
Using Bob's paper, rotated took a month, and I also needed the Crafty source to get my head around it.
Magics took a couple of weeks, again, CPW, Glaurung Source, Pradu's posts on this site were all needed to understand it.