very small bitboard move/attack generator

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
abulmo2
Posts: 157
Joined: Fri Dec 16, 2016 10:04 am
Contact:

Re: very small bitboard move/attack generator

Post by abulmo2 » Tue Oct 30, 2018 10:45 am

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: 475
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: very small bitboard move/attack generator

Post by xr_a_y » Tue Oct 30, 2018 11:21 am

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: 475
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: very small bitboard move/attack generator

Post by xr_a_y » Tue Oct 30, 2018 11:37 am

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: 157
Joined: Fri Dec 16, 2016 10:04 am
Contact:

Re: very small bitboard move/attack generator

Post by abulmo2 » Thu Nov 01, 2018 7:01 am

xr_a_y wrote:
Tue Oct 30, 2018 11:21 am
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

maksimKorzh
Posts: 73
Joined: Sat Sep 08, 2018 3:37 pm
Location: Ukraine
Full name: Maksim Korzh
Contact:

Re: very small bitboard move/attack generator

Post by maksimKorzh » Thu Nov 01, 2018 8: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.

User avatar
xr_a_y
Posts: 475
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: very small bitboard move/attack generator

Post by xr_a_y » Thu Nov 01, 2018 9:22 am

maksimKorzh wrote:
Thu Nov 01, 2018 8: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.

Post Reply