Null Move banner

Null Move

7 devlogs
23h 6m 6s

This is a project, which a chess model inside, designed to play chess. I am currently (dumbly) training it off scratch.

This is a solo project and im expecting it to actually take ages to do.

This project uses AI

I USED AI IN THIS FOR MULTIPLE THINGS!!!!

  1. I used AI to help me understand this project (obviously)
  2. I asked AI about specific parts of the code that I did not understand and (ffs its like 90% of it)
  3. I USED AI for the datapipe line, as idk im not that smart and it just knows how to do it better than me.
  4. I used chatgpt if you wanted to know

Loading README...

Ryan Chen

ZAMN almost 24 hours of work on this project, and its still dumb asl ;(

Nothing to add, im just pissed that it keeps drawing against itself, mabye I should add like games where i actually win lol.

Attachment
0
Ryan Chen

OK SO After ~2 hours of brainstorming logos with my friends (yes i have friends [shocking i know]) They recommended me the WORST logo idea, hence meaning it was an absolute waste of time. BUT!!!!!!!!!!!!!!!!!!

I did spend a lot of time, in adding PGN strings, by hand, from HIGH QUALITY chess.com games (nah I was on such a big losing streak, that i just quit, put stockfish against stockfish and like different engines against each other, can copied the fen over one by one (hence the 7 hours and 39 minutes)

Other than that, i made a logo, which is just a crossover, from the Houdini chess engine logo, and the Stockfish Chess engine logo!

editing software: Microsoft pain!

I hope you guys enjoy the logo, as this will be the new current logo!

Attachment
Attachment
Attachment
Attachment
0
Ryan Chen

Ok so i got so bored. I swear i spent longer that 2 hours and 2 minutes but what ever.

I am going to make a ui for this project now!

The AI model has started to learn promotions, which means that it is like no longer really bad, but now its just slightly bad.

Thats practically what i dont for 2 hours, i played chess games and copied its fen and pasted it into backup game data also pushed to github.

Attachment
Attachment
0
Ryan Chen

Alright, for me its currently the morning, and I currently done practically nothing.

What I have done though, was download a polyglot opening book, called GM2001, which is practically a “cheat code” for this project, as it allows me to skip training Null Move (which is its name) from the beginning and make it start actually training from the midgame. As since it is an opening book, it just tells the AI model, “Hey, these are statistically the most well known and best openings used by world-leading chess engines, like Stockfish or LC0, you should use these openings”. And it has saved me at least thousands of hours of training, as Null move is currently at the “Baby” stage, where there has been no promotions, the games are very noisy, and are 99% drawn, with a few exceptions where one side “accidentally” wins out of luck.

Another 2 paragraphs here that i had to remove cause of “2000 character limit” check the comments for them!

Anyway, i will put out another devlog in like 6-7 hours (jk probably 3 hours aka when i get bored of this and decide to touch grass)

ALSO HUGE THANKS TO GMCHEEMS FOR THE AMAZING OPEN SOURCE OPENING BOOKS THAT I COULD DOWNLOAD AFTER SeARCHING THE INTERNET FOR LIKE 3 HOURS!!!! (you guys should check them out!!!)
link is below of the dataset i copied, called GM2001.bin
https://github.com/gmcheems-org/free-opening-books?tab=readme-ov-file

Attachment
Attachment
Attachment
1

Comments

Ryan Chen
Ryan Chen 8 days ago

Para 1:
That is currently what I have done, I will also be typing out alot of .JSON FEN, which is just a bunch of random moves/positions, so that I can manually inflate the dataset Null Move trains on! Since the original dataset contains 200,000 lines, I am just going to play some chess games on like chess.com against random people, friends, bots/engines, and also import a bunch of grandmaster games, then make Null Move analyse them (if I can), which would see a large increase in skill, hopefully.

Para 2
Now unfortunately, Chess.com/lichess does not allow downloading FEN for the entire game, and requires you to copy and paste it, one move at a time, this will obviously take an INSANE amount of time (something that i am used to by now, thanks to my calculator project). now obviously, there is another issue with this strategy other than being super inefficient, and the issue is that the data I collect for Null Move, has to be “good” or “high-quality” so the model would not (quote-on quote from chat) ’degenerate”. But here is the thing, my model is so shi-… I mean not that good, where even if i play poorly, it would not matter, as it is already thousands of times better then how Null Move plays like.

Ryan Chen

Today I done nothing (YAY!!!)

I just watched the AI train and verse itself.

And i watched the json file go from 80,000kb to 180,000kb

Some good news, Chatgpt and my AI has started to learn how to win games (accidentally)
With it like doing crazy king walks straight into checkmate and then rating it as like winning for itself in its re-evaluation session (epochs).
I am just dissapointed, but Chat says it will “grow out of it”

damn i forgot to add attachments will do asap

Attachment
Attachment
0
Ryan Chen

Finally got the model working!!! Had a lot of issues, like the model would not save its game data.

Practically, the solution to this issue, was ask ChatGPT, it would give me the solution, I would Ctrl-C + Ctrl-V into VSCode, it would not work, I would crash out, and spend 5x the required time to solve the issue I MADE by asking ChatGPT. Nevertheless, Chat GPT was useful for building the general structure.

What I, Stackoverflow, reddit and chatgpt done was:

  1. learnt how to build a neural network with residual networks
  2. Learnt new word!! (Epoch).
  3. Learnt that AI is actually really dumb (esp for programming)
    Honestly other than that, im really proud of myself for getting the program working (and yes I did use Chatgpt for it, but i did learn many things currently, like what Monte Carlo tree Simulation was, and like how difficult training AI models are, especially with the issue of Overfitting and underfitting.)
    Honestly, without chatgpt, i could never dream of doing this, but in my opinion, chatgpt like gave me the “knowledge” for the mathematical aspects where i could combine it for code.

Anyway guys i will update when a new big thing happens!!!

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0
Ryan Chen

I got a bit carried away with the project, I regret starting this project very much. It is very hard, most of my code (unfortunately) was given/(helped me) to me by a) stack overflow (MY GOAT) b) chatgpt… (please i don’t want any hate for doing this), but in my defense right. Making an AI chess engine is hella impossible bro.

so what i learnt,

  1. do not do this (not for the weak!!!)
  2. VERY HARD mathematics!!! (MCTS nearest K, a+b pruning neuron efficiency (or whatever its called))
  3. Very time consuming (5h and 38 minutes of work just to set up the data pipeline (yes WITH “vibe-coding” [thanks chatgpt])
  4. VERY VERY TIME CONSUMING, as if i want it to play atleast well enough (around 800 elo), I and chatgpt estimated around like 100-200 hours MINUMUM.
  5. computationally expensive (very poor now)
  6. emotionally crushing (because im very poor now and time wasted)
  7. (67!!!)
  8. welp other than this, my rant is done!

I hope you will enjoy this, and i am also ignoring how would i make it deployable to a website.

ps az means (Alpha-Zero (famous chess engine made by google deepmind that beat gary kasparov!!)
(this project is inspired by AZ!)

hence the structure might be very similar (where is it computationally viable for me)

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0