Newbie to chess programming: should I go for bitboards?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Newbie to chess programming: should I go for bitboards?

Post by vittyvirus »

I've previously asked people about bitboards, and how to implement them. But some seemed to advice me to not implement bitboards now. Some said to write upto the move generator, some said to implement bitboards in next version of my chess engine. But the logic was the same: To understand chess programming completely first and then go for bitbiards. Most of them advise to go for bitbiards but I'm still asking these question:
1) If I don't implement bitboards, is my engine gonna be slow?
2) Am I gonna face problems in the world of chess programming? ( there are many algorithm that demand bitboards)
3) Shoud I finally go for bitboards right now? ( my engine is 500 lines of code and supports move oarsing, fen, knight move gen..
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Newbie to chess programming: should I go for bitboards?

Post by Ferdy »

If you understand it now, go for it. If not continue with non-bitboard, you can always rewrite your program later.
User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Re: Newbie to chess programming: should I go for bitboards?

Post by vittyvirus »

Ferdy wrote:If you understand it now, go for it. If not continue with non-bitboard, you can always rewrite your program later.
I understand what bitboards are, in fact I discovered bitboard system on my own but didn't apply it...
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Newbie to chess programming: should I go for bitboards?

Post by Ferdy »

vittyvirus wrote:
Ferdy wrote:If you understand it now, go for it. If not continue with non-bitboard, you can always rewrite your program later.
I understand what bitboards are, in fact I discovered bitboard system on my own but didn't apply it...
So what exactly you are waiting :) .
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Newbie to chess programming: should I go for bitboards?

Post by velmarin »

vittyvirus wrote:
Ferdy wrote:If you understand it now, go for it. If not continue with non-bitboard, you can always rewrite your program later.
I understand what bitboards are, in fact I discovered bitboard system on my own but didn't apply it...
Lose a little time with vice,
http://bluefever.net/Downloads/ViceReadMe.html
and
Watch videos are very instructive and entertained.

If you've seen, take another turn.

http://bluefever.net/Downloads/ViceReadMe.html :o
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Newbie to chess programming: should I go for bitboards?

Post by zullil »

vittyvirus wrote:I've previously asked people about bitboards, and how to implement them. But some seemed to advice me to not implement bitboards now. Some said to write upto the move generator, some said to implement bitboards in next version of my chess engine. But the logic was the same: To understand chess programming completely first and then go for bitbiards. Most of them advise to go for bitbiards but I'm still asking these question:
1) If I don't implement bitboards, is my engine gonna be slow?
2) Am I gonna face problems in the world of chess programming? ( there are many algorithm that demand bitboards)
3) Shoud I finally go for bitboards right now? ( my engine is 500 lines of code and supports move oarsing, fen, knight move gen..
If you don't stop posting and start programming, you engine will be very slow. In fact, it won't exist at all. :twisted:

You've basically asked the same (hypothetical) questions for 2.5 weeks. Please, just choose a system for representing a chess position---any system---and write a move generator, ie, a function that gives all legal moves for any given position.

Let us know when you've got that finished.
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: Newbie to chess programming: should I go for bitboards?

Post by Aleks Peshkov »

1) Programming is art of rewriting, so you can start with anything and end with good code.

2) I doubt you will be able to finish complete a chess program without experience of writing another programs.

3) You cannot create a fast program without writing the first (awful) chess program.
User avatar
jsgroby
Posts: 83
Joined: Mon Mar 24, 2014 12:26 am
Location: Glen Carbon, IL USA

Re: Newbie to chess programming: should I go for bitboards?

Post by jsgroby »

velmarin wrote:
vittyvirus wrote:
Ferdy wrote:If you understand it now, go for it. If not continue with non-bitboard, you can always rewrite your program later.
I understand what bitboards are, in fact I discovered bitboard system on my own but didn't apply it...
Lose a little time with vice,
http://bluefever.net/Downloads/ViceReadMe.html
and
Watch videos are very instructive and entertained.

If you've seen, take another turn.

http://bluefever.net/Downloads/ViceReadMe.html :o
This...A thousand times this...I learned about chess programming from this series of videos...Very informative.

Jeff
User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Re: Newbie to chess programming: should I go for bitboards?

Post by vittyvirus »

Aleks Peshkov wrote:
2) I doubt you will be able to finish complete a chess program without experience of writing another programs.
What exactly do you mean?
op12no2
Posts: 489
Joined: Tue Feb 04, 2014 12:25 pm
Full name: Colin Jenkins

Re: Newbie to chess programming: should I go for bitboards?

Post by op12no2 »

vittyvirus wrote:
Aleks Peshkov wrote:
2) I doubt you will be able to finish complete a chess program without experience of writing another programs.
What exactly do you mean?
Think iterative deepening... :)