lichess.org
Donate

Stockfish 18 is here!

This is still running with hashfull since move 43. But this time it has not blunders. It's in the study.
info depth 60 seldepth 77 multipv 1 score cp 21 nodes 5483066230 nps 453612 hashfull 1000 tbhits 0 time 12087562 pv g1f3 d7d5 d2d4 g8f6 c2c4 e7e6 b1c3 f8b4 d1a4 b8c6 e2e3 e8g8 a4c2 b7b6 c1d2 c6e7 a2a3 b4d6 c3b5 d5c4 f1c4 c8b7 c4e2 a7a6 b5d6 c7d6 e1g1 a8c8 c2b3 f6e4 f1c1 c8c1 a1c1 e4d2 f3d2 b6b5 e2f1 d8d7 b3b4 f7f5 b4b3 h7h6 g2g3 f8c8 c1c8 d7c8

I should stop the test and increase my zram size and I will automatically have more hash for stockfish.
I assume: The longer it takes for the hash to reach full the better should be the results.

I asked AI to build this for my needs. Now this is what I use to determine me hash size.
I'm just showing it like a preview of what I use on linux. Use at your own risk, there is no.

File name: ram_cap.sh

#!/bin/bash
# Stockfish RAM-cap launcher with 20% reserve
# Launches Stockfish in a new terminal, keeping GUI control intact

# ----------------------------
# Detect Stockfish path
# ----------------------------
STOCKFISH_BIN=$(which stockfish 2>/dev/null)

if [ -z "$STOCKFISH_BIN" ]; then
echo " Stockfish not found in PATH. Please install it."
exit 1
fi

# ----------------------------
# Calculate RAM + ZRAM
# ----------------------------
MEM_TOTAL=$(free -m | awk '/^Mem:/{print $2}')
ZRAM_TOTAL=$(swapon --show=NAME,SIZE --bytes | awk '/zram/{sum+=$2} END{print sum/1024/1024}')
[ -z "$ZRAM_TOTAL" ] && ZRAM_TOTAL=0

RAM_AVAILABLE=$(echo "$MEM_TOTAL + $ZRAM_TOTAL" | bc)
RESERVE_PERCENT=20
HASH_MAX=$(echo "$RAM_AVAILABLE * (100 - $RESERVE_PERCENT) / 100" | bc)
HASH_MAX=${HASH_MAX%.*} # convert to integer

echo " Available RAM+ZRAM=${RAM_AVAILABLE} MB, Reserved ${RESERVE_PERCENT}%, Using Hash=${HASH_MAX} MB"
echo " $(date '+%a %d %b %Y %r %Z') — Launching Stockfish..."

# ----------------------------
# Detect a terminal to use
# ----------------------------
if command -v gnome-terminal >/dev/null 2>&1; then
TERMINAL_CMD="gnome-terminal -- bash -c "$STOCKFISH_BIN""
elif command -v konsole >/dev/null 2>&1; then
TERMINAL_CMD="konsole --hold -e "$STOCKFISH_BIN""
elif command -v xfce4-terminal >/dev/null 2>&1; then
TERMINAL_CMD="xfce4-terminal --hold -e "$STOCKFISH_BIN""
else
# fallback to xterm
TERMINAL_CMD="xterm -hold -e "$STOCKFISH_BIN""
fi

# ----------------------------
# Launch Stockfish in a new terminal
# ----------------------------
eval "$TERMINAL_CMD" &

echo " Stockfish launched in new terminal. GUI can now connect."

This is still running with hashfull since move 43. But this time it has not blunders. It's in the study. info depth 60 seldepth 77 multipv 1 score cp 21 nodes 5483066230 nps 453612 hashfull 1000 tbhits 0 time 12087562 pv g1f3 d7d5 d2d4 g8f6 c2c4 e7e6 b1c3 f8b4 d1a4 b8c6 e2e3 e8g8 a4c2 b7b6 c1d2 c6e7 a2a3 b4d6 c3b5 d5c4 f1c4 c8b7 c4e2 a7a6 b5d6 c7d6 e1g1 a8c8 c2b3 f6e4 f1c1 c8c1 a1c1 e4d2 f3d2 b6b5 e2f1 d8d7 b3b4 f7f5 b4b3 h7h6 g2g3 f8c8 c1c8 d7c8 I should stop the test and increase my zram size and I will automatically have more hash for stockfish. I assume: The longer it takes for the hash to reach full the better should be the results. I asked AI to build this for my needs. Now this is what I use to determine me hash size. I'm just showing it like a preview of what I use on linux. Use at your own risk, there is no. File name: ram_cap.sh #!/bin/bash # Stockfish RAM-cap launcher with 20% reserve # Launches Stockfish in a new terminal, keeping GUI control intact # ---------------------------- # Detect Stockfish path # ---------------------------- STOCKFISH_BIN=$(which stockfish 2>/dev/null) if [ -z "$STOCKFISH_BIN" ]; then echo " Stockfish not found in PATH. Please install it." exit 1 fi # ---------------------------- # Calculate RAM + ZRAM # ---------------------------- MEM_TOTAL=$(free -m | awk '/^Mem:/{print $2}') ZRAM_TOTAL=$(swapon --show=NAME,SIZE --bytes | awk '/zram/{sum+=$2} END{print sum/1024/1024}') [ -z "$ZRAM_TOTAL" ] && ZRAM_TOTAL=0 RAM_AVAILABLE=$(echo "$MEM_TOTAL + $ZRAM_TOTAL" | bc) RESERVE_PERCENT=20 HASH_MAX=$(echo "$RAM_AVAILABLE * (100 - $RESERVE_PERCENT) / 100" | bc) HASH_MAX=${HASH_MAX%.*} # convert to integer echo " Available RAM+ZRAM=${RAM_AVAILABLE} MB, Reserved ${RESERVE_PERCENT}%, Using Hash=${HASH_MAX} MB" echo " $(date '+%a %d %b %Y %r %Z') — Launching Stockfish..." # ---------------------------- # Detect a terminal to use # ---------------------------- if command -v gnome-terminal >/dev/null 2>&1; then TERMINAL_CMD="gnome-terminal -- bash -c \"$STOCKFISH_BIN\"" elif command -v konsole >/dev/null 2>&1; then TERMINAL_CMD="konsole --hold -e \"$STOCKFISH_BIN\"" elif command -v xfce4-terminal >/dev/null 2>&1; then TERMINAL_CMD="xfce4-terminal --hold -e \"$STOCKFISH_BIN\"" else # fallback to xterm TERMINAL_CMD="xterm -hold -e \"$STOCKFISH_BIN\"" fi # ---------------------------- # Launch Stockfish in a new terminal # ---------------------------- eval "$TERMINAL_CMD" & echo " Stockfish launched in new terminal. GUI can now connect."

This script is too conservative for stockfish hash. The zram will never reach 80% full becasue the stockfish hash reached it first. But away to early. If you installed zram just run stockfish an monitor how much zram gets used. If stockfish has reached hashfull without filling the zram up, than increase your stockfish hash size.

Commands I use to see what is used and what has priority.

zen@tuxedo-os:~$ free
total used free shared buff/cache available
Mem: 7526276 5095568 479076 1509140 3765144 2430708
Swap: 6075868 768 6075100
zen@tuxedo-os:~$ swapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 4G 0B -2
/dev/zram0 partition 1.8G 768K 100
zen@tuxedo-os:~$ zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lz4 1.8G 32K 1K 72K 4 [SWAP]

Now I will stop my engine and use a hash higher than my actual ram and see how much zram can handle the stockfish hash before zram reaches 80% full.

This script is too conservative for stockfish hash. The zram will never reach 80% full becasue the stockfish hash reached it first. But away to early. If you installed zram just run stockfish an monitor how much zram gets used. If stockfish has reached hashfull without filling the zram up, than increase your stockfish hash size. Commands I use to see what is used and what has priority. zen@tuxedo-os:~$ free total used free shared buff/cache available Mem: 7526276 5095568 479076 1509140 3765144 2430708 Swap: 6075868 768 6075100 zen@tuxedo-os:~$ swapon --show NAME TYPE SIZE USED PRIO /swapfile file 4G 0B -2 /dev/zram0 partition 1.8G 768K 100 zen@tuxedo-os:~$ zramctl NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT /dev/zram0 lz4 1.8G 32K 1K 72K 4 [SWAP] Now I will stop my engine and use a hash higher than my actual ram and see how much zram can handle the stockfish hash before zram reaches 80% full.

Stockfish 18 with NNUE:

Download the file and extract it.
You will see three main directories:
script: Contains the setup scripts.
src: Contains the source code of Stockfish (but not the NNUE files yet).
wiki: Contains documentation.

If you start the net.sh in the script directory it will not download the two NNUE file.
You have to move or copy it into the scr directory. Then it will work, but your NNUE files will then be in the wrong directory.
You have to move or copy them into the root directory where the executable file is.

The script could have been written in a smarter way to automatically detect where to place the NNUE files (either in the src directory or the root directory) based on the location of the executable, which would have saved the extra steps of moving the net.sh script or relocating the NNUE files manually.

But, the manual step of moving the net.sh script and NNUE files is there I guess as a workaround to ensure compatibility and prevent conflicts with pre-existing files.

Stockfish 18 with NNUE: Download the file and extract it. You will see three main directories: script: Contains the setup scripts. src: Contains the source code of Stockfish (but not the NNUE files yet). wiki: Contains documentation. If you start the net.sh in the script directory it will not download the two NNUE file. You have to move or copy it into the scr directory. Then it will work, but your NNUE files will then be in the wrong directory. You have to move or copy them into the root directory where the executable file is. The script could have been written in a smarter way to automatically detect where to place the NNUE files (either in the src directory or the root directory) based on the location of the executable, which would have saved the extra steps of moving the net.sh script or relocating the NNUE files manually. But, the manual step of moving the net.sh script and NNUE files is there I guess as a workaround to ensure compatibility and prevent conflicts with pre-existing files.

@ELMERTORRESC said:

its time to up to

What you try to say with that

@ELMERTORRESC said: > its time to up to What you try to say with that

@Toscani
Following our exchange in https://lichess.org/forum/general-chess-discussion/stockfish-elo-graph regarding your long comments, I would like to point out again that pasting entire scripts and pages of raw terminal logs really monopolizes the visual space of the thread. It makes it difficult to navigate and follow the general conversation.

It would be much more helpful if you could simply summarize your key findings in a few sentences. If you want to share the full technical data, have you considered starting your own Lichess blog or using services like Pastebin? It is a much better format for these kinds of deep dives, and you could just post a short link here for those who want to see the full code or logs.

@Toscani Following our exchange in https://lichess.org/forum/general-chess-discussion/stockfish-elo-graph regarding your long comments, I would like to point out again that pasting entire scripts and pages of raw terminal logs really monopolizes the visual space of the thread. It makes it difficult to navigate and follow the general conversation. It would be much more helpful if you could simply summarize your key findings in a few sentences. If you want to share the full technical data, have you considered starting your own Lichess blog or using services like Pastebin? It is a much better format for these kinds of deep dives, and you could just post a short link here for those who want to see the full code or logs.

"A particularly rare issue, involving threefold repetition detection, en passant, and pins, was also fixed."

Let me guess: if there's a threefold repetition of a position, and in the first repetition one player had en passant rights but couldn't actually play en passant because of an absolute pin, then the repetition counts? (Whereas it wouldn't count as a threefold without the pin because en passant rights make it effectively a different position.)

That's hilariously specific if so. Gotta love the edge cases!

"A particularly rare issue, involving threefold repetition detection, en passant, and pins, was also fixed." Let me guess: if there's a threefold repetition of a position, and in the first repetition one player had en passant rights but couldn't actually play en passant because of an absolute pin, then the repetition counts? (Whereas it wouldn't count as a threefold without the pin because en passant rights make it effectively a different position.) That's hilariously specific if so. Gotta love the edge cases!

@Rbd209 said ^

Noooo... I was hoping they might release another Bot that I could beat, like that Level 1 (:

Yeah, I missed "user friendly" bot like 90es

@Rbd209 said [^](/forum/redirect/post/wxMVRl49) > Noooo... I was hoping they might release another Bot that I could beat, like that Level 1 (: Yeah, I missed "user friendly" bot like 90es