- Blind mode tutorial
lichess.org
Donate

CoPilot

Future of my algorithms

ChessStrategy
A brief explanation about the one algorithm I will be using, it's gaps, and how I will try to improve it

It's been a while since I last wrote an article about algorithms. It's not because I have given up on them, but because I was lost in ideas. I didn't know whether I should try multiple algorithms, improve on one selected algorithm or try conventional improvement methods and stop trying to create an algorithm altogether. But after the disappointing, frustrating and terrible event I had in the past week, I learned what I should do.

Next step

Here's my plan: I will pick and improve one algorithm. But which algorithm? This is a topic I debated for a while. First I wanted to create an algorithm based on planning. This seemed too conventional. Though it's okay, that's not my style. Then I tried to find a way to convert a board representation into a DTM (depth to mate) value. I even tried homemade representation methods other than the usual FEN. Though it might sound like a crazy idea, with the presence of an oracle (the tablebase), I don't think this is impossible. But then I thought, if I failed, I would have wasted many hours that I had to improve at chess to find a math formula. So I decided to work on this in my free time and take it seriously when I retire. I moved on. Then I wanted to create an algorithm that could evaluate any given position without any calculation. This would require me to find a few positional factors that define any chess position or positions defined by a few specific positional factors. Although I didn't hate this, I knew this would be time-consuming, and I didn't want to go slowly (although maybe it is a good idea) when I had a faster and sufficient 4th approach.

The 4th approach is an MCTS-like method. I call it the IAA.

IAA - Intuition-based Averaging Algorithm

Here is the algorithm:

  1. Take a chess position as input
  2. See the squares controlled by each piece (this is to make you conscious about the position)
  3. Make a list of plausible moves (candidate moves) using your intuition
  4. Intuitively evaluate the positions after each of your opponent's candidate moves against your candidate moves. If you don't understand the evaluation of a position, repeat steps 2, 3 and 4 until you reach a position you understand and assign the evaluation found at the end to each position arising in that line until the last branching point. If you still don't understand it, calculate until someone reaches a material edge (evaluations should be in words like better, slightly better, equal, winning etc.)
  5. Take the mean evaluation of the positions arising after your opponent's candidate moves and assign that value to your candidate move that you are currently calculating
  6. Move on to the next candidate move
  7. Repeat steps 4, 5 and 6 until you have assigned a value for all of your plausible moves.
  8. Play the move with the highest value

I am sorry that it is a bit confusing, but that's the best verbal explanation I can come up with. I tried to create a diagram that would help me explain this better, but my computer seems a bit jammed today and has gotten unusually slow. You will get the explanation with a diagram in a later article.

Now let's move on to the next topic

Gaps

The only gap that I see in this algorithm is how good your intuition should be. Yes, even a player without that good intuition can come up with an average move in a complex position using this algorithm, but it would take up a lot of calculations. But as an experienced player and as someone who has studied computers in detail, chess is a skill. Even computers need training. If you are not using an algorithm that converts a board representation into a DTM value like I said before, you will need practice. I have been searching for an algorithm for about 4 years now and every single one of the algorithms I came up with requires practice. I have ideas like DTM conversion and 1-ply evaluation, but haven't been successful in converting them into an algorithm. So I think it's best to use this algorithm with training rather than direct all your focus towards finding something which might not even exist.

Areas for improvement

  • First of all, I have to fill in the gap. I have to train my intuition. Luckily I already have a method for this - Guess the Move. I will use this training method to improve my intuition and hopefully, it will be sufficient
  • It would be better if I could find a much more reliable evaluation function than intuition. But as a human, intuition seems to be the only evaluation function that can be trained to perform better at any given position. But, I will still be looking for alternate evaluation functions.

As I am not that experienced in this algorithm yet, I don't have much of an idea about the areas I need to improve on. But I know how to find them. I will resume the Against Stockfish article series. By playing games against Stockfish, I will hopefully be able to recognize the weaknesses of my algorithm and improve it to its ceiling.

Summary

Now I know the way. I know where I am going. I want to create an algorithm that would be able to successfully defeat Stockfish in a match. I will not be using multiple algorithms from now. I'd rather use one algorithm consistently and improve it on a steady scale. One more thing that I will need if I am to become a better chess player is a good training plan. This is something that I will work on next. Hopefully one day, this will prove to have been a worthy journey.

That's it for today, I hope you found this article useful and see you next time!




If you're eager to challenge the computers designed to outsmart us in chess, consider joining the Club of Believers. We aim to find the perfect algorithm to defeat machines and compete in the Bundesliga. We're a small team and need 3 more members to reach 50, but we've had great success in our battles. Join us!