Connect to a Remote Engine

Get your specific HIARCS/Junior support questions answered here as well as up-to-the-minute news!

Moderators: Watchman, Mark Uniacke, mrudolf

Post Reply
mrnohr
Member
Posts: 4
Joined: Sun May 23, 2021 12:46 pm

Connect to a Remote Engine

Post by mrnohr »

I have HIARCS running on my Mac laptop. I would like to connect that to a stronger server that I have running on my network that has Stockfish on it. This server is tuned to run stockfish, so it can analyze faster, and then my laptop battery does not die during heavy game analysis.

Is it possible to connect to a remote engine?

I tried creating a "shortcut" script on my laptop that connects to the server. When I run that it looks like I am running the Stockfish engine. But when I try to use that within HIARCS I get the error that the file "is not a valid UCI engine."

I know many other software programs allow this, and I was hoping HIARCS would as well.
User avatar
Harvey Williamson
Site Admin
Posts: 6079
Joined: Sun Jul 29, 2007 6:57 am
Location: Media City, UK
Contact:

Post by Harvey Williamson »

I use remote engines all the time in HCE. You have to set up port forwarding in your router for each engine on your server. When you create UCI engine you must make sure the engine is running on the server otherwise you will get an error message as you describe.

You can download what I use from these 2 links:

https://harveywilliamson.com/engineClient.exe
https://harveywilliamson.com/engineServer.exe
mrnohr
Member
Posts: 4
Joined: Sun May 23, 2021 12:46 pm

Post by mrnohr »

I'm glad to hear that it is possible. It looks like you have a windows client/server. Is this possible from a Mac client to a Linux server?
User avatar
Harvey Williamson
Site Admin
Posts: 6079
Joined: Sun Jul 29, 2007 6:57 am
Location: Media City, UK
Contact:

Post by Harvey Williamson »

mrnohr wrote:I'm glad to hear that it is possible. It looks like you have a windows client/server. Is this possible from a Mac client to a Linux server?
That I have never tried.
mrnohr
Member
Posts: 4
Joined: Sun May 23, 2021 12:46 pm

Post by mrnohr »

From other chess programs, I can connect to a remote stockfish (UCI) using SSH, which works fine. It seems like HIARCS does not support that method so I'm looking for another approach.
User avatar
mrudolf
HCE Developer
Posts: 988
Joined: Thu Dec 17, 2020 4:44 pm

Post by mrudolf »

mrnohr wrote:From other chess programs, I can connect to a remote stockfish (UCI) using SSH, which works fine. It seems like HIARCS does not
support that method so I'm looking for another approach.
I am using this approach in NextGen for many years. I've just tried this in HCE 1.x and it works without any problem.

What does your script look like?

Edit: this is my Stockfish running on Linux server.
Image
mrnohr
Member
Posts: 4
Joined: Sun May 23, 2021 12:46 pm

Post by mrnohr »

What does your script look like?
My attempt at the script was just something like:

Code: Select all

ssh matt@stockfishserver "/home/matt/bin/stockfish"
User avatar
mrudolf
HCE Developer
Posts: 988
Joined: Thu Dec 17, 2020 4:44 pm

Post by mrudolf »

mrnohr wrote:My attempt at the script was just something like:

Code: Select all

ssh matt@stockfishserver "/home/matt/bin/stockfish"
Indeed, it looks this is not enough for a file to be recognised as script by MacOS. Please try adding

Code: Select all

#!/bin/sh
in the first line.
GoneBallistics
Member
Posts: 43
Joined: Wed Nov 02, 2022 7:18 pm

Re:

Post by GoneBallistics »

Just found this thread, it's very interesting.
Did anybody try and run stockfish in a container?
The idea is to run it in the cloud.
And if this works, the next step could be lc0 with a proper gpu firepower, always in the cloud.
User avatar
mrudolf
HCE Developer
Posts: 988
Joined: Thu Dec 17, 2020 4:44 pm

Re: Re:

Post by mrudolf »

GoneBallistics wrote: Mon Nov 27, 2023 9:41 am Just found this thread, it's very interesting.
Did anybody try and run stockfish in a container?
The idea is to run it in the cloud.
And if this works, the next step could be lc0 with a proper gpu firepower, always in the cloud.
You surely can run an engine on another computer by ssh, the container should not be any different.
HCE just expects the script to read from standard input and to write to standard output.
Post Reply