Chess programming on YouTube: NOBODY CARES?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Chess programming on YouTube: NOBODY CARES?

Post by maksimKorzh »

ChessRenewal wrote: Sat Aug 22, 2020 3:01 am I would like to see a Full Bitboard Engine From Scratch in C video series where the resulting provided engine is clearly stronger than TSCP and the search depth is not limited. The existing video series "Programming A Chess Engine in C" is very nice but the followup series on developing a stronger engine using more chess programming algorithms was to my knowledge never produced by that presenter.

By the way, I tried to compile Wukong using Visual Studio 2019, but there were several error messages: cannot open source file "sys/time.h". Similarly for "sys/select.h". Also a few messages about incomplete types and one "expression must have a constant value".

I used the built Wukong you provide in Arena and I like the way it plays and look forward to its further development. I appreciate the comments you include in Wukong's source code.

I was really glad to find your video series today. Nice to see some videos of your engine playing others with your commentary. Please continue your contributions to the chess engine community!
Hi ChessRenewal, thanks for such a kind feedback to the point.
Now let me answer your questions.
I would like to see a Full Bitboard Engine From Scratch in C video series where the resulting provided engine is clearly stronger than TSCP and the search depth is not limited.
I was thinking about it on my own. After this comment I would definitely start this series, btw I'm already working on new didactic bitboard chess engine that would serve a source for this tutorial
I tried to compile Wukong using Visual Studio 2019, but there were several error messages: cannot open source file "sys/time.h". Similarly for "sys/select.h". Also a few messages about incomplete types and one "expression must have a constant value".
I'm developing on linux mint using gcc compiler but at the same time I'm maintaining windows binary executables produced by gcc cross-compiler, so when I compile it produces both linux and windows 64bit binary executables and my cross compiler doesn't give any errors.
Can you please send me your compile logs? even though I will never work on windows, still their has to be some improvement for code portability. And regarding "sys/time.h" and "sys/select.h" - these two are linux system headers, I'm also importing "windows.h" so the for get_time_ms() function it wukong uses getTickCount() - windows system api call to... get time in ms)))

I hope you'll be following my new bitboard chess engine from scratch series and if any compilation issues would arise along the way you can kindly let me know so I either alter the code or just give some hints on how to alter/compile it in VisualStudio on windows. How about that?
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Chess programming on YouTube: NOBODY CARES?

Post by maksimKorzh »

smatovic wrote: Sat Aug 22, 2020 8:52 am I guess I am kind of old-school, prefer to read text and code.

CPW is a great resource for me:

https://www.chessprogramming.org/

from there are zillions of links to papers to dig deeper.

--
Srdja
Yup, CPW rules))) I enjoy researching it's source code)))
And OLD SCHOOL rules as well)))
Unfortunately ot seems like I'm too dumb sometimes to read only)))
I made my first breakthrough (pass perft test after 1.5-2 years of unsuccessful attempts) after watching Bluefever's videos)))
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Chess programming on YouTube: NOBODY CARES?

Post by maksimKorzh »

Gerd Isenberg wrote: Sat Aug 22, 2020 10:06 am
maksimKorzh wrote: Fri Aug 21, 2020 7:20 pm Hey what's up guys, Code Monkey King's (My YouTube nickname) here.

Here's what I made within this month:
1. 26 videos (20-60min each) on implementing 0x88 board based move generator. Series ends with PERFT test.
2. several videos on negamax & alpha-beta (you have a movegen and fixed depth UCI connection to the GUI, so by the end of the video engine starts playing vs itself in GUI)
3. 10 bitboard tutorials (I tried to make them standalone) dedicated to generating attack tables for all pieces involving magic bitboards for slider pieces
4. Some videos on newly created engine plays versus Toledo nanochess and TSCP
5. A couple of blog videos

I would APPRECIATE IF YOU LET ME KNOW!
https://www.youtube.com/channel/UCB9-pr ... /playlists
Hi Maksim,

good luck with your videos. For the novice target group, didactically not bad so far - just had a look to the first bitboard video. Is this agile programming? Cpw link added - more on topic will follow.

Best regards,
Gerd
Is this agile programming?
Well, I don't think so. But let me explain this in little bit more details:
When I was initially following BlufeverSoftware's series I was suffering from never ending typedef structs followed by passing a pointer to those structs into literally all the routines. I didn't know C at that time at all, only very very basics in javascript (conditions, loops) - so it was incredibly difficult to follow the logic of how chess engine works because I needed to pick up LOTS of low level C related theory like arrays and pointers which was incredibly hard for me at that time. Obviously later on I've mastered those things and started implementing them on my own BUT when it now comes to SHARING KNOWLEDGE regarding chess programming I would like to emphasize CHESS PROGRAMMING above C programming best practices to focus on algorithms and logic rather then on implementation. That's why I did such a weird things like defining board array and state (enpass, castle, side) variables GLOBALLY. Obviously it's weird from many perspectives, BUT I sacrifice everything to make material AS DIDACTIC AS POSSIBLE. I went even further - instead of scoring moves during generating them I was scoring them right before the loop over moves in the alpha-beta search routine. I know it's weird and performance suffers, BUT in this case we have absolutely MODULAR and INDEPENDENT movegen and search routines so the viewer can START ON SEARCH without getting bothered how movegen works. I know this is weird but it's easier to follow SINGLE ALPHA-BETA tutorial and get PLAYING ENGINE at the end rather then following 26+ videos. The idea is to make the process of entering the wonder land of chess programming as easy as possible, so when someone is inside he can later improve and modular approach allows studying different core parts of chess engine independently. So this is my philosophy)

And the very last but not least thing - we all know that chess engines involving 100% same features VARY ON IMPLEMENTATIONS SO MUCH. So when you're reading someone's code you more like SEE THIS PERSON first and only after see his program. What I try to achieve - people should SEE THE PROGRAM FIRST and preferably NOT SEEING MY PERSONAL STUFF because they are NOT PERFECT and definitely NOT SOMETHING TO FOLLOW. So I'm trying to make my content as "wiki" as possible, sacrificing everything to get PURE CONCEPTS being explain, implemented and demonstrated.
Cpw link[/url] added - more on topic will follow.
OMG! That's such a great honor for me! I've never ever dared to dream about being part of chess programming wiki! Thanks you so much Gerd!
The fact that man of your caliber took time to have a look at my work is the great honor itself already. I want to thank you again and again for accepting me as a part of the community! This motivates me to improve the content even more and keep going!
ChessRenewal
Posts: 15
Joined: Thu Jul 25, 2019 7:13 pm
Full name: Jay Warendorff

Re: Chess programming on YouTube: NOBODY CARES?

Post by ChessRenewal »

Here are the error messages from Visual Studio 2019 when trying to build Wukong (copied and pasted - could not generate/save a log file):

SeverityCodeDescription StateError (active) E1696 cannot open source file "sys/time.h" wukong.c line 23

SeverityCodeDescription StateError (active) E1696 cannot open source file "sys/select.h" wukong.c line 24

SeverityCodeDescription StateError (active)E0070 incomplete type is not allowed wukong.c line 1212

SeverityCodeDescription StateError (active) E0070 incomplete type is not allowed wukong.c line 1214

SeverityCodeDescription StateError (active) E0070 incomplete type is not allowed wukong.c line 1214

SeverityCodeDescription StateError (active) E0028 expression must have a constant value wukong.c line 1472

SeverityCodeDescription StateError C1083 Cannot open include file: 'sys/time.h': No such file or directory wukong.c line 23
ChessRenewal
Posts: 15
Joined: Thu Jul 25, 2019 7:13 pm
Full name: Jay Warendorff

Re: Chess programming on YouTube: NOBODY CARES?

Post by ChessRenewal »

I tried replacing

#ifdef WIN64
#include "windows.h"
#else
#include "sys/time.h"
#include "sys/select.h"
#include "string.h"
#endif

by

#include "windows.h"

Now get:

SeverityCodeDescription StateError C2057 expected constant expression wukong.c line 1466

SeverityCodeDescription StateError C2466 cannot allocate an array of constant size 0 wukong.c line 1466

SeverityCodeDescriptionStateErrorC 2133 'move_scores': unknown size wukong.c line 1466

where Line 1466 is:

int move_scores[move_list->count];

Still get a build failure.
ChessRenewal
Posts: 15
Joined: Thu Jul 25, 2019 7:13 pm
Full name: Jay Warendorff

Re: Chess programming on YouTube: NOBODY CARES?

Post by ChessRenewal »

I will definitely be following your new bitboard chess engine from scratch series and will let you know if any compilation issues arise. Thanks!
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Chess programming on YouTube: NOBODY CARES?

Post by maksimKorzh »

ChessRenewal wrote: Sat Aug 22, 2020 5:13 pm I will definitely be following your new bitboard chess engine from scratch series and will let you know if any compilation issues arise. Thanks!
I appreciate that a lot!

I got your errors, but WHAT COMPILER do you use???
It's tested it only with GCC and cross-compiled with mingw GCC to make windows binary executables.

Btw, you can get windows binary executable from here:
https://github.com/maksimKorzh/wukong/b ... wukong.exe
well at least it works via wine on my side (don't have native windows)

I suggest to keep debugging in private, here's my email: freesoft.for.people@gmail.com
please let me know the further details there.

So one last thing - I suggest to install mingw gcc compiler if don't have one yet and also try to remove optimization flag "-oFast" from make file or compile like "make debug". Please be kind to let me know via email if the above helps.

P.S. Bitboard CHESS ENGINE in C series has just staerted - 3 videos already!
User avatar
mclane
Posts: 18748
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: Chess programming on YouTube: NOBODY CARES?

Post by mclane »

It would be interesting to see that people try out b strategy ideas.
IMO it would make more sense then creating the usual AB strategy thing,

We have enough Stockfish engines IMO.

If you begin something, try something interesting,
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
User avatar
CMCanavessi
Posts: 1142
Joined: Thu Dec 28, 2017 4:06 pm
Location: Argentina

Re: Chess programming on YouTube: NOBODY CARES?

Post by CMCanavessi »

Suscribed. Awesome channel and content !!!
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Chess programming on YouTube: NOBODY CARES?

Post by maksimKorzh »

CMCanavessi wrote: Sat Aug 22, 2020 7:48 pm Suscribed. Awesome channel and content !!!
Deeply appreciate! New videos are coming all the time.