Open tissatussa opened 6 months ago
Hello,
I appreciate your interest in my engine! Unfortunately its currently not working, I started to do some refactoring, which messed up the code-base, and haven't finished it. I will start working on it again as soon as my exams end in a month or so. I can update this PR after its functioning again.
..and haven't finished it..
OK, nevermind. success with the exams!
i'll receive all your GitHub notices, so .. and i can test, but only on Linux :)
Heyy!! Sorry for being so late to reply to this, I have serious commitment issues with projects haha. The source code on the main branch should be a up to date working version of the chess engine which you can compile. I'm using the following command when compiling g++ -o engine engine.cpp library/chess.hpp
you can of course use optimization flags as well.
If have the time, and find it interesting, please try the engine out and let me know if you find any bugs/issues!
hi, i just compiled the new source as you proposed and it created a valid binary without any warnings and errors. Then i played a game with White. I won effortlessly, here's the ZIPped terminal log : sce-some-game.zip
And here's the game :
[Event "human vs engine"]
[Site "Holland"]
[Date "2024.10.30"]
[Round "1"]
[White "Roelof Berkepeis"]
[Black "Simple Chess Engine"]
[Result "1-0"]
[ECO "B00"]
[GameDuration "00:06:48"]
[Opening "Fred"]
[PlyCount "23"]
1. e4 f5 {1.7s} 2. exf5 {1.2s} a6 {31s} 3. Qh5+ {20s} g6 {23s} 4. fxg6 {3.1s}
Nf6 {12s} 5. g7+ {4.7s} Nxh5 {17s} 6. gxh8=Q {3.1s} Kf7 {28s} 7. Qxh7+ {54s}
Ke6 {20s} 8. Qxh5 {8.6s} d6 {14s} 9. Qg6+ {79s} Ke5 {13s} 10. Nc3 {23s} e6 {10s}
11. Nf3+ {11s} Kf4 {13s} 12. d3# {14s, White mates} 1-0
Bugs : no (it can even let me promote !) Issues : yes, it plays bad ..
Hi, I'm glad everything works! Even though it does not work well haha, I know the engine plays pretty poorly but I hope to improve it. I am currently adding piece square tables and plan to add lazy evaluation and transportation tables. Do you have any suggestions in how I could improve the engine? :)
Do you have any suggestions in how I could improve the engine?
Although your engine plays really bad at the moment, i take it serious .. i'm a programmer, but not of any engine yet, but i know the basics of creating a chess engine, i follow many authors on GitHub and gather and test their versions .. i would suggest you first implement a protocol to communicate with a chess app like CuteChess (which i use and advice) or Arena, etc. Best is UCI, which is rather easily to grasp and program - i can give you the minimal command set to start .. then we can play and let play the engine conveniently and compare it to others ..
from my understanding you should first focus on these points :
create your own move generator and decide how it will act in your new setup. It must be fast, that's the challenge. Don't just copy an existing move generator (well, you can..), better try to understand how these work and learn (/debug!) at lot while developing it yourself. Test positions exist to prove it's 100% accurate in all possible positions.
indeed lazy evaluation and transportation tables are a next step to improve the overall performance and speed of variant calculation, thereby pruning the tree in some basic way, but i also find time management an important issue which is not given enough attention by many authors : in practice, the engine will have a few, let's say 5, minutes for a game (maybe with some bunus seconds each move) and it should be aware of the game phase regarding the max time to spend on a move. You could invent or find some method to deal with this, many solutions were created, all being some kind of compromise ofcourse .. i advice you to think about determining a value for the "complexity" of the position (nr. of pieces, nr. of possible captures, etc.) and set max-time-per-move higher accordingly.
think about how to deal with positions which have only one possible legal move .. often engines even spend their max-time for such move, which is a waste and should be avoided .. but regular move-generation constructs act differently, so this is a challange ..
when you get your head around my issues and pitfalls, by studying other code and designing a better (UCI) engine, you can get a new foundation, then implement lazy evaluation and transportation tables.
very nice to meet another enthousiast chess engine programmer ! This kind of program needs many skills and techniques, for the engine should run fast and efficient, and you'll learn a lot!
it's the road, the adventure, not the goal. all you'll ever create is "a first version".
btw. piece square tables are great besides 'normal' material values. You probably know PSTs exist for middle game positions (MG) and end game (EG) and their values are interpolated somehow.
i would suggest you first implement a protocol to communicate with a chess app like CuteChess
I think that this would be a smart next move, debugging is starting to be really difficult in with the CLI representation of the board.
- create your own move generator and decide how it will act in your new setup. It must be fast, that's the challenge
I am using this library https://github.com/Disservin/chess-library for the chess board and generation, it does most of the heavy lifting honestly.
I am using this library https://github.com/Disservin/chess-library for the chess board and generation..
seems OK ! but it's really an experience to create such yourself - just saying ..
Yeah, I definitely plan on making my own later on! I'll let you know once some major improvements have been made so you can test out the engine again :)
although your engine is simple, i like to compile it but this fails .. i used the following command to compile :
indeed in
constants.hpp
no VALUE array is defined inside the POSITIONAL_VALUE structure .. at the end of this file you commented-out such code, it's not complete .. i tried to fix it but i have no clue (i'm not into C++). Can it be solved ?[ i'm on Xubuntu 22.04 ]