#i dont know how to say it

204 messages · Page 1 of 1 (latest)

faint shard
#

Use git grep -n "text to be searched for", the result was already pointed out by Disservin:

~/Stockfish$ git grep -n "the Stockfish developers"
src/misc.cpp:183:     << "the Stockfish developers (see AUTHORS file)";

By the way Stockfish is released under GPL-3 license, you are free to modify the source code, but you must make the modified code available to users, see:
https://www.gnu.org/licenses/gpl-3.0.html
https://www.gnu.org/licenses/gpl-faq.html
The easiest way to be compliant is to fork the Stockfish official repository on Github and push your changes in your forked repository.

wooden stag
wooden stag
faint shard
wooden stag
#

like with the stockfish 16

tawny fiber
#

Im doubting that you will add new stuff

#

(If you are already struggling with changing a string lol)

wooden stag
#

so that it wont like sef destruct itself

tawny fiber
#

:d

wooden stag
#

is the 0 the version

#

(i dont know much code)

#

if im hurting your braincells im sorry

faint shard
#

You can trigger the Continuous Integration (GitHub Actions) to check your changes: simply push the branch with your changes on the github_ci branch as well:

git switch master
git fetch -p upstream
git switch -c my_sf_version
# makes you changes and push to your repository
git push origin HEAD
# push on the branch github_ci as well to trigger the Continuous Integration
git push -f origin HEAD:github_ci
tawny fiber
#

what is written on the left side to it?

#

<< version

wooden stag
#

i havent made a name for the engine yet

wooden stag
faint shard
#

He talked about << version

wooden stag
#

says this

faint shard
tawny fiber
#

you asked if std::setfill('0') is the version. When there literally is a variable on the left side which says, version ?

wooden stag
tawny fiber
#

then learn some code, it helps no one if you change the name and say it's your engine..

wooden stag
tawny fiber
#

well then i dont get the purpose of any of this xd

#

version is the version

#

and you can delete the rest that follows until
ss << (to_uci ? "\nid author ": " by ")

vivid pine
#

why r u helping them lol

wooden stag
#

all i wanted to do was to change what it said on the exe when you opened it to something else

#

😭

faint shard
#
string engine_info(bool to_uci) {
  stringstream ss;
  ss << "Something Else";
  return ss.str();
}
$ ./stockfish
Something Else
wooden stag
faint shard
#

You simply must change the content of the body of the function string engine_info(bool to_uci), deleting all the red lines and adding the green line

diff --git a/src/misc.cpp b/src/misc.cpp
index 29ef757e9..6767a20a1 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -154,34 +154,7 @@ public:

 string engine_info(bool to_uci) {
   stringstream ss;
-  ss << "Stockfish " << version << setfill('0');
-
-  if constexpr (version == "dev")
-  {
-      ss << "-";
-      #ifdef GIT_DATE
-      ss << stringify(GIT_DATE);
-      #else
-      constexpr string_view months("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec");
-      string month, day, year;
-      stringstream date(__DATE__); // From compiler, format is "Sep 21 2008"
-
-      date >> month >> day >> year;
-      ss << year << setw(2) << setfill('0') << (1 + months.find(month) / 4) << setw(2) << setfill('0') << day;
-      #endif
-
-      ss << "-";
-
-      #ifdef GIT_SHA
-      ss << stringify(GIT_SHA);
-      #else
-      ss << "nogit";
-      #endif
-  }
-
-  ss << (to_uci  ? "\nid author ": " by ")
-     << "the Stockfish developers (see AUTHORS file)";
-
+  ss << "Something Else";
   return ss.str();
 }

To make the story short the function must be:

string engine_info(bool to_uci) {
  stringstream ss;
  ss << "Something Else";
  return ss.str();
}

Then compile the code with: make -j build ARCH=x86-64
Read the wiki to install a compiler https://github.com/official-stockfish/Stockfish/wiki/Compiling-from-source

wooden stag
#

so delete all the things highlighted in red

#

and add ss<<"-";

#

so i add + ss << "Something Else"; but delete everything else

wooden stag
#

@faint shard this is what i got

#

is this correct

faint shard
#

No, it must be:

string engine_info(bool to_uci) {
  stringstream ss;
  ss << "Something Else";
  return ss.str();
}
wooden stag
#

like this?

faint shard
#

Delete the last closing brace (the yellow one)

wooden stag
#

so like this then

faint shard
#

Yes

wooden stag
#

okay so when i save main.cpp and load it up it should change the name

#

to something else

tawny fiber
#
string engine_info(bool to_uci) {
    return "Something Else";
}

this should have done the job as well :p

tawny fiber
wooden stag
#

i get words mixed up

tawny fiber
#

and what do you mean by "load it up"

wooden stag
tawny fiber
wooden stag
#

or smth

tawny fiber
#

the end.

wooden stag
#

return ss.str();
}

tawny fiber
#

?

faint shard
wooden stag
#

@faint shard

faint shard
wooden stag
#

okay i've installed it now what

tawny fiber
#

4 minutes that was fast

wooden stag
faint shard
wooden stag
faint shard
#

That is a Msys shell, close it, and open a MinGW x64 shell, double click on C:\msys64\mingw64.exe if you have installed msys2 with the official installer or C:\tools\msys64\mingw64.exe if you have used chocolatey. In the folder C:\msys64\home\<your_username> (or C:\tools\msys64\home\<your_username> if you have used chocolatey) write a text file named makefish.sh
Run it with bash makefish.sh

#
#!/bin/bash
# makefish.sh

# install packages if not already installed
pacman -S --noconfirm --needed unzip make mingw-w64-x86_64-gcc

branch='master'
github_user='official-stockfish'

# download the Stockfish source code
wget -O ${branch}.zip https://github.com/${github_user}/Stockfish/archive/refs/heads/${branch}.zip
unzip -o ${branch}.zip
cd Stockfish-${branch}/src
file_nnue=$(grep 'define.*EvalFileDefaultName' evaluate.h | grep -Ewo 'nn-[a-z0-9]{12}.nnue')
ls *.nnue | grep -v ${file_nnue} | xargs -d '\n' -r rm --

# check all given flags
check_flags () {
    for flag; do
        printf '%s\n' "$flags" | grep -q -w "$flag" || return 1
    done
}

# find the CPU architecture
output=$(g++ -Q -march=native --help=target)
flags=$(printf '%s\n' "$output" | awk '/\[enabled\]/ {print substr($1, 3)}' | tr '\n' ' ')
arch=$(printf '%s\n' "$output" | awk '/march/ {print $NF; exit}' | tr -d '[:space:]')

if check_flags 'avx512vnni' 'avx512dq' 'avx512f' 'avx512bw' 'avx512vl'; then
  arch_cpu='x86-64-vnni256'
elif check_flags 'avx512f' 'avx512bw'; then
  arch_cpu='x86-64-avx512'
elif check_flags 'bmi2' && [ $arch != 'znver1' ] && [ $arch != 'znver2' ]; then
  arch_cpu='x86-64-bmi2'
elif check_flags 'avx2'; then
  arch_cpu='x86-64-avx2'
elif check_flags 'sse4.1' 'popcnt'; then
  arch_cpu='x86-64-sse41-popcnt'
elif check_flags 'ssse3'; then
  arch_cpu='x86-64-ssse3'
elif check_flags 'sse3' 'popcnt'; then
  arch_cpu='x86-64-sse3-popcnt'
else
  arch_cpu='x86-64'
fi

# build the fastest Stockfish executable
make -j profile-build ARCH=${arch_cpu} COMP=mingw
make strip
mv stockfish.exe ../../stockfish_${arch_cpu}.exe
make clean
cd
wooden stag
#

so like this?

wooden stag
faint shard
#

Do you have edited the misc.cpp file on your PC?

wooden stag
#

you have told me to do this

faint shard
#

Open a MinGWx64 shell run this command pacman -S --noconfirm --needed unzip make mingw-w64-x86_64-gcc.
Move the Sotckfish folder with the modified file in C:\msys64\home\<your_username> (or C:\tools\msys64\home\<your_username> if you have used chocolatey)
Then write these commands:

cd Stockfish/src
make -j ARCH=x86-64 COMP=mingw

Beware that you should be able to understand any command suggested on the web before running on your PC.

wooden stag
#

i dont have chocolatey

#

and if i need chocolatey do i need to download it or

faint shard
#

No, follow the instruction and start learning.

wooden stag
#

so i ran the command

#

so do i have to move my modified stockfish folder into the ddirectory you gave me?

faint shard
#

yes

wooden stag
#

so i did that

#

not what do i have to do

faint shard
#

Open a MinGWx64 shell and run this command pacman -S --noconfirm --needed unzip make mingw-w64-x86_64-gcc.
Then write these commands:

cd <your_misterious_folder_name>/src
make -j ARCH=x86-64 COMP=mingw
wooden stag
#

ive already done that before i put the file in these

faint shard
#

Then write these commands:

cd <your_misterious_folder_name>/src
make -j ARCH=x86-64 COMP=mingw
wooden stag
#

@faint shard

#

error target not found

faint shard
#

Run this: pacman -Syuu --needed --noconfirm
The shell should inform you that it neede to be closed. Close it, restart a new shell and run for a second time pacman -Syuu --needed --noconfirm
Then run pacman -S --noconfirm --needed unzip make mingw-w64-x86_64-gcc

wooden stag
#

okay

#

it just closed itself

#

what

#

@faint shard

faint shard
#

Open a MinGW x64 shell, double click on C:\msys64\mingw64.exe
I simply copied and pasted instructions already wrote in previous posts.

faint shard
#

My fault. I should have written more clearly that in the past 8 hours I simply copied and pasted instructions already written in previous posts or written in the wiki. You should have already read them by yourself. It seems that you don't want support to solve an issue but simply to waste the time of the people that try to help you.
Sorry but I and the other maintainers are moving some repositories under the Organization, so I need to stay focused to avoid errors.

wooden stag
#

im not trying to waste time ive been trying to fix this problem already ive alreayd read whats about on the wiki

grim plume
faint shard
# wooden stag <@810851630164607016>

You are running MinGW 32 shell, look at your picture, and you wrote pacam, look at your picture.
I wonder why is so hard to read and execute the instructions:

  • open a MinGW x64 shell, double clicking on C:\msys64\mingw64.exe
  • run pacman -Syuu --needed --noconfirm
  • close the shell when requested
  • open a MinGW x64 shell, double clicking on C:\msys64\mingw64.exe
  • run pacman -Syuu --needed --noconfirm for the second time
  • run pacman -S --noconfirm --needed unzip make mingw-w64-x86_64-gcc
wooden stag
faint shard
#

Now you should be able to run, in a MinGW x64 shell

  • cd your_secret_folder_name/src
  • make -j build ARCH=x86-64 COMP=mingw
wooden stag
#

ok i did it

faint shard
#

When the compilation is finished, run:
./stockfish
You should view your custom Welcome message.

wooden stag
#

i ran and it worked

#

ok

faint shard
#

Wait a minute, we need one more step.

wooden stag
#

ok

faint shard
#

We need to know the architecture of your CPU to build the fastest Stockfish.
Open a new MinGW x64 shell and run this command:
curl -sSL https://raw.githubusercontent.com/ppigazzini/stockfish-downloader/main/posix_helper.sh | sh -s
This downloads the official Stockfish optimized for your CPU, let me know the name of the zip file downloaded.

wooden stag
#

hold on

#

i got a question

wooden stag
faint shard
#

Copy and paste this line, then push the "Enter" key.

curl -sSL https://raw.githubusercontent.com/ppigazzini/stockfish-downloader/main/posix_helper.sh | sh -s
wooden stag
#

cuz then for me it would show a v

#

and thats it

faint shard
#

Try to paste with a right click, otherwise you need to write the command.

wooden stag
#

nevermind

#

@faint shard i dont understand why you need this to know how fast stockfish runs on my laptop

faint shard
#

Wow, a very recent CPU, AMD Ryzen I suppose 🙂
Now in the first MinGW64 shell still opened in your secret folder, we rebuild Stockfish optimized for your CPU and with the Profile Guided Optimization (profile-build instead than the previous build):

make clean
make -j profile-build ARCH=x86-64-avx512 COMP=mingw
make strip
wooden stag
#

do i copy and paste these 1 by 1 or all in once

make clean
make -j profile-build ARCH=x86-64-avx512 COMP=mingw
make strip

faint shard
#

It should work pasting all the lines as well, be sure to push a couple of time the "Enter" key to execute the last command.

wooden stag
#

i think it broke too

faint shard
#

Sometimes, when pasting more than one command in a shell, the last command is not executed and need an extra push on the "Enter" key.

#

You need to enter in your secret folder, the tilde ~ means that you are still in your HOME folder.

cd your_secret_folder/src
wooden stag
#

uhhhhhhhh

#

oh wait

#

do i change the secret folder to the current folder i have in the home folder?

faint shard
#

Yes, you never shared the foldername

wooden stag
#

alr

#

i am confusion

faint shard
#

Do you have still opened the MinGW64 shell where the compilation has worked?

wooden stag
#

yes

faint shard
#

Write in that shell the commands:

make clean
make -j profile-build ARCH=x86-64-avx512 COMP=mingw
make strip
wooden stag
#

same result

faint shard
#

No, it's not that shell, the tilde mean that the current path is your $HOME

wooden stag
#

so its already in my hone

#

i think it was when i had the secret folder copied and pasted

faint shard
#

Open with file explorer C:\msys64\home\kadeu, you should view your secret folder.

wooden stag
faint shard
#

Write in a MinGW 64 shell the commands:

cd stockfish/src
make clean
make -j profile-build ARCH=x86-64-avx512 COMP=mingw
make strip
wooden stag
#

its like freaking out

#

but i think its wokring

#

is this good?

faint shard
#

Yes, the compiler enabled the instructions for your very advanced CPU.
Now you can run:

./stockfish bench

You will get when finished the "Nodes / second" number, it's the speed of your CPU when running Stockfish.

wooden stag
#

so i ran it

#

===========================
Total time (ms) : 6025
Nodes searched : 2593605
Nodes/second : 430473

#

i also found something weird

#

and i think bad

#

i open up the winrar file that was build

#

and looked into it

#

now irt just says this

faint shard
wooden stag
#

is it good?

faint shard
#

The last developer build is the stronger version. It's the same version that you built yourself from the source code.

wooden stag
#

ah ok

faint shard
#

Ok, I think to have finished my duty here, enjoy your night.

wooden stag
#

alright

#

but what about the custom welcome sign

wooden stag
faint shard
#

Use your custom build, it's the file C:\msys64\home\kadeu\stockfish\src\stockfish.exe

wooden stag
#

😭

faint shard
#

Open the file C:\msys64\home\kadeu\stockfish\src\misc.cpp with a text editor, change the function, redo all the command

cd ~/stockfish/src
make clean
make -j profile-build ARCH=x86-64-avx512 COMP=mingw
make strip
wooden stag
#

string engine_info(bool to_uci) {
stringstream ss;
ss << "Something Else";
return ss.str();
}

this one

faint shard
#

Yes

wooden stag
grim plume
wooden stag
grim plume
#

The change needs to be saved before the make commands are run

wooden stag
#

thats weird

#

he never told me to do that

grim plume
#

He did?
"Open the file C:\msys64\home\kadeu\stockfish\src\misc.cpp with a text editor, change the function, redo all the command "

wooden stag
#

change it

#

and then redo every command

#

ive already ran all of these

#

there are no problems

#

there is just one problem thats been on my mind that i cannot understand

#

this image

#

ive ran everything

#

no problems

#

double checked everything

#

but its still somehow not working

grim plume
#

what is the exact file you are changing?

#

Actually, what is that filepath? Check C:\msys64\home\kadeu\stockfish\src\stockfish.exe

faint shard
#

That is the official dev Stockfish binary downloaded with the donwloader script to view his CPU ARCH.

wooden stag
#

i can send you the current development of stockfish that i currently built