Answers.Body: <p>In Chessbase you can have Stockfish analyzing/playing in multiple boards. It's definitely possible to do this, but it slows Stockfish down since it's being overworked. So it'll take longer to search ahead in each game.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-02T07:51:02.410Z
Answers.Text: what are your thoughts on this :
  https://chess.stackexchange.com/q/26501/20128
Answers.UserDisplayName: AKA
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-21T22:40:12.610Z
Answers.LastActivityDate: 2019-09-21T22:40:12.610Z
Answers.UserDisplayName: Inertial Ignorance
Answers.Body: <p>I sometimes play engine matches in parallel (in Arena chess GUI). For that, and to make all this fast, I launch 6 instances of Arena, this is possible for me because I instruct each engine to use 1 processor core only (threads=1), and so my computer which has 6 cores is not significantly slowed down (set pondering to off and a low hastable nr.)</p>
  <p>This means: YES, it's possible to run Stockfish (or any engine) separately and in parallel.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-24T01:44:21.733Z
Answers.LastActivityDate: 2024-05-24T02:04:40.113Z
Answers.LastEditDate: 2024-05-24T02:04:40.113Z
Answers.UserDisplayName: MikeTrans
Answers.Body: <p>Stockfish is an application. As such, you can run it as many times as you want.</p>
  <blockquote>
  <p>...Stockfish was accepting different FEN strings through the terminal inbetween a game...</p>
  </blockquote>
  <p>The Stockfish instance used in the game has its own process ID (PID), and you started another process in your terminal (or however you ran it). (You can see the process IDs associated with all running Stockfish instances using <code>pgrep stockfish</code>.) If Stockfish is configured to use all of your processor cores and you run it more than once, it will experience resource contention and perform much worse, but it will still run.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-25T05:34:57.960Z
Answers.Text: actually i was talking about a single instance of Stockfish, whether it can be used for multiple games at once. like hosting an instance of it on one machine and can access it for multiple games using api or something, and what all things do i have to keep in mind before implementing such architecture
Answers.UserDisplayName: AKA
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-25T14:00:35.597Z
Answers.Text: Ah, excellent question! Stockfish uses UCI (Universal Chess Interface). I think you would need to feed it a FEN (or a set of moves or PGN or whatever) for game 1, let it decide on a move, then feed it game 2's FEN and let it decide on a move. If you're trying to get one instance of the application to consider two positions at the same time, I don't think that's going to work.
Answers.UserDisplayName: lmat - Reinstate Monica
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-26T04:30:51.997Z
Answers.Text: yeah, we can give any FEN to it, my next question is, if we let a single instance work on a single game, will the results be more accurate and fast and is it efficient on physical resources as well or it doesn't matter at all?
Answers.UserDisplayName: AKA
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-27T13:50:38.140Z
Answers.Text: The longer stockfish is able to analyze a position, the stronger it will play (or analyze). When I say "longer", I'm not talking about time, but effective computing time. That is computed like so: `threads*seconds`. So, if you have one instance of stockfish working with 1 thread for 30 seconds on game 1 and another instance working with one thread for 30 seconds on game 2 at the same time, that will be much weaker than having 10 threads for 10 seconds on game 1, then (not at the same time) 10 threads for 10 seconds on game 2. Does that make sense?
Answers.UserDisplayName: lmat - Reinstate Monica
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-23T18:42:03.367Z
Answers.LastActivityDate: 2024-05-23T18:42:03.367Z
Answers.UserDisplayName: lmat - Reinstate Monica
Body: <p>I am asking this because Stockfish was accepting different FEN strings through the terminal inbetween a game, of which it is giving best moves. I have compiled Stockfish in the Ubuntu 19.04 terminal.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-28T23:25:42.840Z
Comments.Text: How do you know it was giving best moves btw?
Comments.UserDisplayName: Inertial Ignorance
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-30T12:45:01.420Z
Comments.Text: bcoz that what it does. hahaha, for that, you need to understand how these chess engines thinks, hopefully after studying this, all your doubts will be cleared.
Comments.UserDisplayName: AKA
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-01T04:31:55.020Z
Comments.Text: Chess engines are extremely strong but they don't come close to always giving the best moves.
Comments.UserDisplayName: Inertial Ignorance
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-02T07:36:00.020Z
Comments.Text: i'm not sure about it
Comments.UserDisplayName: AKA
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-02T09:55:23.297Z
Comments.Text: Maybe this can help : http://web.ist.utl.pt/diogo.ferreira/papers/ferreira13impact.pdf
Comments.UserDisplayName: AKA
Tags: <stockfish>
Title: Is it possible to play multiple games with Stockfish simultaneously?
ThreadText: # Is it possible to play multiple games with Stockfish simultaneously?
  
  (Asked by: username_0 on 2019-09-21)
  
  I am asking this because Stockfish was accepting different FEN strings through the terminal inbetween a game, of which it is giving best moves. I have compiled Stockfish in the Ubuntu 19.04 terminal.
  
  **Tags:** stockfish
  
  > **Comments:**
  > **username_1**: How do you know it was giving best moves btw?  
  > **username_0**: bcoz that what it does. hahaha, for that, you need to understand how these chess engines thinks, hopefully after studying this, all your doubts will be cleared.  
  > **username_1**: Chess engines are extremely strong but they don't come close to always giving the best moves.  
  > **username_0**: i'm not sure about it  
  > **username_0**: Maybe this can help : http://web.ist.utl.pt/diogo.ferreira/papers/ferreira13impact.pdf  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2019-09-21. Score: 1
  
  In Chessbase you can have Stockfish analyzing/playing in multiple boards. It's definitely possible to do this, but it slows Stockfish down since it's being overworked. So it'll take longer to search ahead in each game.
  
  > **Comments:**
  > **username_0**: what are your thoughts on this : https://chess.stackexchange.com/q/26501/20128  
  
  ---
  
  ### Answer by username_2 on 2024-05-24. Score: 1
  
  I sometimes play engine matches in parallel (in Arena chess GUI). For that, and to make all this fast, I launch 6 instances of Arena, this is possible for me because I instruct each engine to use 1 processor core only (threads=1), and so my computer which has 6 cores is not significantly slowed down (set pondering to off and a low hastable nr.)
  
  This means: YES, it's possible to run Stockfish (or any engine) separately and in parallel.
  
  
  ---
  
  ### Answer by username_3 on 2024-05-23. Score: 0
  
  Stockfish is an application. As such, you can run it as many times as you want.
  
  > ...Stockfish was accepting different FEN strings through the terminal inbetween a game...
  
  The Stockfish instance used in the game has its own process ID (PID), and you started another process in your terminal (or however you ran it). (You can see the process IDs associated with all running Stockfish instances using `pgrep stockfish`.) If Stockfish is configured to use all of your processor cores and you run it more than once, it will experience resource contention and perform much worse, but it will still run.
  
  > **Comments:**
  > **username_0**: actually i was talking about a single instance of Stockfish, whether it can be used for multiple games at once. like hosting an instance of it on one machine and can access it for multiple games using api or something, and what all things do i have to keep in mind before implementing such architecture  
  > **username_3**: Ah, excellent question! Stockfish uses UCI (Universal Chess Interface). I think you would need to feed it a FEN (or a set of moves or PGN or whatever) for game 1, let it decide on a move, then feed it game 2's FEN and let it decide on a move. If you're trying to get one instance of the application to consider two positions at the same time, I don't think that's going to work.  
  > **username_0**: yeah, we can give any FEN to it, my next question is, if we let a single instance work on a single game, will the results be more accurate and fast and is it efficient on physical resources as well or it doesn't matter at all?  
  > **username_3**: The longer stockfish is able to analyze a position, the stronger it will play (or analyze). When I say "longer", I'm not talking about time, but effective computing time. That is computed like so: `threads*seconds`. So, if you have one instance of stockfish working with 1 thread for 30 seconds on game 1 and another instance working with one thread for 30 seconds on game 2 at the same time, that will be much weaker than having 10 threads for 10 seconds on game 1, then (not at the same time) 10 threads for 10 seconds on game 2. Does that make sense?  
  
  ---
  
  