very small bitboard move/attack generator

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: very small bitboard move/attack generator

Post by abulmo2 »

You may have a look at Dumb, my simple chess program in D language (a C/C++ like language):
https://github.com/abulmo/Dumb
It is bitboard based, using the hyperbola quintessence algorithm to generate moves.
Overall, Dumb has less lines of code than minic and probably use less sophisticated algorithms, but it looks much faster and a little stronger.
Richard Delorme
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: very small bitboard move/attack generator

Post by xr_a_y »

Great input thanks.

Indeed Dumb as window/pvs/nullmove/TT/check extension/IID but no LMR, but its evaluation is smarter than Minic PST only.
Great source to read, i'll give feedback.
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: very small bitboard move/attack generator

Post by xr_a_y »

Wow on my hardware (and even without -flto because I lack llvm gold ...) Dumb is crunching 3Mnps when Minic is at 300knps :shock:
abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: very small bitboard move/attack generator

Post by abulmo2 »

xr_a_y wrote: Tue Oct 30, 2018 12:21 pm Indeed Dumb as window/pvs/nullmove/TT/check extension/IID but no LMR, but its evaluation is smarter than Minic PST only.
Dumb's evaluation is tapered and well tuned but it remains quite simplistic: material + pst + tempo.
Richard Delorme
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: very small bitboard move/attack generator

Post by maksimKorzh »

Vivien, it's I'm so happy people are gaining interest in minimalist chess, I've found your minic engine idea to be very interesting. Unfortunately it's not always easy to define the true goals while writing a minimalist chess, I mean what kind of minimalism is about to prefer - minimalist RAM usage/minimalist source code/minimalist design and features. How did you come with an idea to write minic? What are your goals? I really wonder.
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: very small bitboard move/attack generator

Post by xr_a_y »

maksimKorzh wrote: Thu Nov 01, 2018 9:00 am Vivien, it's I'm so happy people are gaining interest in minimalist chess, I've found your minic engine idea to be very interesting. Unfortunately it's not always easy to define the true goals while writing a minimalist chess, I mean what kind of minimalism is about to prefer - minimalist RAM usage/minimalist source code/minimalist design and features. How did you come with an idea to write minic? What are your goals? I really wonder.
Well, I started writing my first chess engine (Weini) in december 2016 during Christmas hollydays. I was playing chess a little when I was young and was playing a lot on Lichess in 2016. Learning about chess programming is a great experience but as you know it is also quite frustrating at some point.
Weini, as my first chess engine, was built and refactored during the development process but even with a lot of logging, testing and debugging, desactivating features and testing everything again, Weini is still stuck around 2200 elo. I see Xiphos and Rofchade being developped quite quickly and reach >2800elo, that was a great source of frustration ! but also a source of motivation to achieve better results. So I have two plans ahead for Weini : switch to bitboard to gain some speed and find some horrible bugs. But I don't want to do that directly in Weini's code and I thought, on a saturday morning, that is may be a good idea so build a small code to investigate both bitboard (attak, evaluation, and move generation) and maybe to find bug during the process because I used in Minic exactly the same stuff as in Weini. That's how Minic was born.

For 3 weeks now, I didn't developed in Weini, and it feels quite fun to try to make Minic smarter while keeping it under 2000sloc.