Mauritz8 / Vividmind

A UCI-compatible chess engine written from scratch in C++
1 stars 0 forks source link

Compiling in Windows #121

Closed SzotsGabor closed 11 months ago

SzotsGabor commented 11 months ago

Hi Mauritz,

I think a Windows executable would be welcomed by the computer chess community. Sometimes I cancompile anexe for myself but not this time.

I tried to compile your engine using this command line (I am at odds withCMake, in other words Idon't know how to use it):

g++ .cpp board/.cpp evaluation/.cpp move_gen/.cpp search/*.cpp -Iboard -Ievaluation -Imove_gen -Isearch -O3 -march=native -flto -oVividmind_1.0-x64-SzG.exe

However, what I got was this:

In file included from board.hpp:13, from board.cpp:1: board/defs.hpp:6:10: fatal error: move.hpp: No such file or directory 6 | #include "move.hpp" | ^~~~~~ compilation terminated. In file included from board.hpp:13, from main.cpp:4: board/defs.hpp:6:10: fatal error: move.hpp: No such file or directory 6 | #include "move.hpp" | ^~~~~~ compilation terminated. In file included from board.hpp:13, from move_gen.hpp:6, from move_gen.cpp:1: board/defs.hpp:6:10: fatal error: move.hpp: No such file or directory 6 | #include "move.hpp" | ^~~~~~ compilation terminated. In file included from board.hpp:13, from search.hpp:6, from search.cpp:1: board/defs.hpp:6:10: fatal error: move.hpp: No such file or directory 6 | #include "move.hpp" | ^~~~~~ compilation terminated. In file included from board.hpp:13, from uci.hpp:7, from uci.cpp:1: board/defs.hpp:6:10: fatal error: move.hpp: No such file or directory 6 | #include "move.hpp" | ^~~~~~ compilation terminated. board/draw.cpp:1:10: fatal error: board.hpp: No such file or directory 1 | #include "board.hpp" | ^~~ compilation terminated. board/fen.cpp:1:10: fatal error: board.hpp: No such file or directory 1 | #include "board.hpp" | ^~~ compilation terminated. board/playmove.cpp:1:10: fatal error: board.hpp: No such file or directory 1 | #include "board.hpp" | ^~~ compilation terminated. evaluation/evaluation.cpp:3:10: fatal error: board.hpp: No such file or directory 3 | #include "board.hpp" | ^~~ compilation terminated. move_gen/king.cpp:1:10: fatal error: move_gen.hpp: No such file or directory 1 | #include "move_gen.hpp" | ^~~~~~ compilation terminated. move_gen/pawn.cpp:1:10: fatal error: move_gen.hpp: No such file or directory 1 | #include "move_gen.hpp" | ^~~~~~ compilation terminated. In file included from search/defs.cpp:1: search/defs.hpp:7:10: fatal error: move.hpp: No such file or directory 7 | #include "move.hpp" | ^~~~~~ compilation terminated. search/time_management.cpp:1:10: fatal error: search.hpp: No such file or directory 1 | #include "search.hpp" | ^~~~ compilation terminated.

Can you help?

Gabor Szots CCRL testing group

Mauritz8 commented 11 months ago

I just now compiled a windows binary and added it to release 1.0, I hope it will resolve your problem. Thank you for checking out my chess engine, it means a lot!

SzotsGabor commented 11 months ago

Good. In the meantime I have found out how to edit the sources so that I can compile them. The result is about 20 % faster than yours.

BTW, some nps values are negative after I issue go infinite.

Mauritz8 commented 11 months ago

I compiled it using the optimization flags that you showed (-O3 -march=native -flto), and it gave me a 20% speed increase as well. That's quite significant, thank you for that! I have updated the executable in the release to the faster version. The negative nps values is weird, I will look into it and hopefully have it fixed soon.

SzotsGabor commented 11 months ago

That's fine. Of course with the -march=native part you can expect a faster exe although in my experience that is not always the case. Tomorrow I'm going to start a tournament for the CCRL blitz list. Looking forward to further development of your engine. May I suggest to give different names to exes and id's in the future, to avoid confusion? And may I ask you where you are from, maybe Sweden? We use that information in our lists.

Mauritz8 commented 11 months ago

That sounds exciting! I am indeed from Sweden. I suppose you mean that I should put the version in the executable name?

SzotsGabor commented 11 months ago

Not only that. I meant this: uci id name Vividmind id author Mauritz Sj├Âdin uciok I'd welcome the version number in the name as well, e.g. "id name Vividmind 1.0".

BTW, I wonder why your name is displayed as it is. I can write Sjödin on my PC. Maybe yours is a different "ö".

Mauritz8 commented 11 months ago

Okay I understand, I'll fix that right away. It is actually a normal ö, though it looks weird on my computer as well. I don't know why it looks like that, it must be something with Windows and Linux handling characters differently. I will just change it to o instead.

Mauritz8 commented 11 months ago

I created a new release, it includes the version in the name, and also fixes the issue with the ö.