PicoChess v4 Image [8 June 2025]

631 views
Skip to first unread message

RandyR

unread,
Jun 8, 2025, 3:13:26 PMJun 8
to PicoChess
Hi Everyone.

I decided to make a smaller image to speed up the download for people. All I did was remove the pico_backups folder which saved around 6GB. If you already have the image from 7 June 2025 you do not need to download this one, but I also made a change to the browser startup script (kiosk.sh). It will now wait for PicoChess to start before launching the browser (before it just waited a specific number of seconds). I'll attach it here for those who want to replace it themselves (it's located in the pi home folder).

If you do use this image, note that the next time you update it will take about 9 minutes (on a Pi4) as the backup I removed for this image gets re-made. Once the update is finished, the web server will start. Just be patient.

And a reminder - if you see any functionality issues while testing and would like to let Johan know, either open a topic on this forum or, if you have a (free) GitHub account, you can open an Issue on Johan's repo (if not already opened).

Randy

Here is the link to the image:



kiosk.sh.zip

RandyR

unread,
Sep 18, 2025, 12:50:43 PMSep 18
to PicoChess
Just a note to anyone who replaces the engines folder on the v4 image with the one from my v3.4 image (to get updated engines to play with), if you want to run Linux engines you'll have to install Box64 via Pi-Apps. Windows engines are using Hangover rather than Wine64 so Box64 wasn't needed or installed. The only Linux x64 engine included in v3.4 was StockfishDD.

Randy

Johan Sjöblom

unread,
Sep 27, 2025, 4:39:08 AMSep 27
to PicoChess
When you are updating Pico V4 beta from the menu your engine folders might be overwritten as it contains engines in the repository. We have opened an issue #88 https://github.com/JohanSjoblom/picochess/issues/88

I have now made a first fix to the picochess-install.sh script so that it protects the engine files from being overwritten. HOWEVER NOTE: your machines still contain the old picochess-install.sh so if you run an update you can potentially lose engine setups. Now there are two ways to avoid this:

1) Run the protection command manually to protect your engines, NOTE: do not use sudo here.
open a terminal and do
> cd /opt/picochess
> find engines -type f -print0 | xargs -0 git update-index --skip-worktree
This will mark all your engines to be "left alone" when git pull is updating your system

2) Download the new install-picochess.sh script manually before asking for an update so that the new protection line is there when it updates. This is a straight copy from the Readme file:
> open a terminal and do
> cd /opt/picochess
> chmod a+x install-picochess.sh

If you perform either of these your engine folder should be safe. I do recommend the first one. For me it complained about McBrain on my Pi4, but it should be fine anyway.

If you have not changed anything in the V4 engine folder you dont have to do anything, you can just update, and you will still get the latest LC0 and Stockfish versions, 0.32 and 17.1 I believe. After the next update you can go ahead and do whatever you want with the engine folder.

BR, Johan

PS
Next steps / future
The next step that we will do as part of the issue #88 is to move the repository engines to a folder called engine-examples. On new installs they would be copied as a one-time action to your engine folder, or if you have deleted your engine folder it would be copied. But this has not been done yet... Its still under work. When we do this anyone who has not protected their engines either by updating or by using one of the above will lose the engines on an update. So I will wait a while to do this.
As I will continue to experiment with LC0 playing the very human networks like meangirl, and badgyal and maia etc I will probably add those networks to the repository so that you can all test them when I have my own test setup ready.
DS

RandyR

unread,
Sep 27, 2025, 2:30:42 PMSep 27
to PicoChess
>>If you perform either of these your engine folder should be safe. I do recommend the first one. 
>>For me it complained about McBrain on my Pi4, but it should be fine anyway.

If you try to mark any files that aren't in the git repo, it will complain. I'm not sure why it only lists certain files and not all. So it's really just preventing any files in the folder (engine folder in this case) from being added to your local folder (or overwriting files in your local folder). If you run 

git ls-files -v . | grep ^S

in the /opt/picochess folder it will show the repo files that were marked.

Randy

Johan Sjöblom

unread,
Oct 5, 2025, 1:36:05 AM (14 days ago) Oct 5
to PicoChess
This is for brave testers of V4. Unfortunately there is a breaking change that will give you problems on the next update. This is a one-time breaking change to make sure that after this your engine folders stay exactly as you made them. Here is some instructions that you could use but there might be users here who know how to do this better.

On a command terminal

# start in the pico directory
cd /opt/picochess

# 1. Move your local engines folder to a safe place
mv engines /home/pi/engines_backup

# 2. Make sure you are on the master branch
git checkout master

# 3. Reset your local repository to the latest version
git fetch origin
git reset --hard origin/master

# 4. Move your engines back
mv /home/pi/engines_backup engines

# 5. Run the install script again
./install-picochess.sh

I am working on a Trixie update so another option is to avoid updates until we have a new Trixie image
I will also fix it so that you dont get the lco_weights file every time, but thats on the todo list still…

BR, Johan

Johan Sjöblom

unread,
1:00 PM (3 hours ago) 1:00 PM
to PicoChess
Hello brave testers of Pico V4.

I have now updated to version 4.1.6 which hopefully makes it possible to create a Trixie image + some minor improvements, and a new PGN replay feature as follows:

There is now a possibility to use a built-in PGN replay mode. To replay the latest game you played just put back the pieces into starting position and then put the white Queen on D5, or chose a game from Game Setup -> Read Game menu. Queen D5 will load the last_game.pgn which should be the latest game you played.
You can also upload a PGN file from your phone (or another computer). If you look closely there is now an Upload button next to the Get PGN button. If you upload a game it will automatically do a Read Game on it. The files are uploaded to /games/uploads so they will not change any saved games you might have.

To start the auto--pgn-replay push the ||> pause-play button after you here the announcement OK time and you can see that the game has been loaded.
--> If the read game was not finished ("*") the clocks will start and you can play it to finish.
--> If the read game was finished with a result then it will auto-replay the game.

In auto-replay for a finished game there are two options: If watcher is on the auto-replay will wait for the tutor to be ready for each move so that you get a proper tutor evaluation. If you want to play through the game faster: Go to Pico Tutor -> Pico Watcher and turn watcher off. Then it will not wait for the tutor and it replays approximately one move per second. If you do leave the watcher on you will hear the tutor comments for both sides of the game, and if you store the game afterwards you will have the evaluations written in the PGN file.
In both cases you can use plus button to check for the best move. The minus button can also be used, but as this shows the same text as KIBITZ mode you can always see the depth and score. If you are waiting for the tutor the move will be made when the depth reaches the tutor deep depth which is 17 in picotutor_constants.py.

At the end of the PGN game the result will be announced and a file "last_replay.pgn" will be written. Again, this file name is chosen so that none of the existing files are overwritten.

To play another game, just put back the pieces to start position (or chose from menu) and the mode will switch back to normal so that you can play another game. Then after saving the game result from the menu (or having checkmate on the board etc) you can replay that game immediately using the same instruction as above... put back the pieces to starting position and place the extra white queen on D5.

A note from my testing on my DGT board: I place the queen on D5, I wait for the Time ok announcement or look at my mobile phone screen to see when its ready. Then I press ||> pause-play button to start the autoplay, NOTE: queen is now still on D5... The first move is announced, lets say its e4, I then move the pawn to e4 BEFORE removing the extra white queen. Otherwise it will just get a new "abort" and a new game. Not sure how to improve this. Ideas are welcome. Anyway, after removing the extra white queen autoplay starts going.

You can obviously pause the autoplay at any time using ||> pause-play button. Without an eboard it will of course play by itself, with an eboard one move at a time will be announced.

AND: You are allowed to deviate from the PGN game at any point. If you do another move than the announced one autoplay will automatically turn off. On a non-eboard web display you pause the autoplay and then start analysing move by move as in the existing KIBITZ mode. If you do takeback and go back to a "PGN game position" autoplay will be able to start again... If it does not recognize the board situation it will just show "no move" on the display (no sound yet).

Comments and ideas are welcome on how to make the PGN replay easier, better etc...

Finally a CPU saving trick 1 for V4 which is true for most V4 versions: If you are not playing against an engine and are in say "Hint on" or "Eval Score", "Observe" modes you will save a lot of CPU if you chose the same engine as you have for the tutor engine. Then it will not start another engine analysis, instead it will use the tutor engine to analyse at the same time as its doing the tutor evaluations. If you are in PGN Replay as above, then this will be automatic. The chosen engine will not do any analysis in the PGN Replay, only the tutor engine will analyse.

CPU saving trick 2 (also true for most V4 versions): For club players who mostly analyse games where the chosen moves are expected to be withing the top 10 analysed moves you can speed up your picotutor substantially by editing your picotutor_constants.py file and lower the following two values to something like 10. Not sure how much faster it will be, but you can experiment. I have made optimisations in picotutor so that it can live with less information, but of course, for full feature set, your chosen move have to fit withing the number here wether its 50 or 10. But I would think that the analysis would go much faster if we lower this requirement.
VALID_ROOT_MOVES = 50 # number of multipv best moves
LOW_ROOT_MOVES = 50 # number of obvious multipv root moves

BR, Johan
Reply all
Reply to author
Forward
0 new messages