Answers.Body: <p>Solution: I downloaded stockfish through homebrew and was able to run it on the terminal with the command <code>stockfish</code>. All other commands are the same.</p>
  <p>Credit: @qwr in the comments</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-09T20:58:31.577Z
Answers.LastActivityDate: 2023-08-12T00:10:14.957Z
Answers.LastEditDate: 2023-08-12T00:10:14.957Z
Answers.UserDisplayName: wdk23
Body: <p>I just got a Macbook and I'm attempting to build a chess engine, so I want to run the perft function on Stockfish to compare my perft results. When I was on PC, I was able to download the engine from the website and run the perft function fine, but I can't figure out how to do it on mac. I tried downloading Stockfish with Homebrew which apparently worked but when I tried the <code>./stockfish</code> command to run t it outputted this error: <code>zsh: no such file or directory: ./stockfish</code>. Can anyone provide complete steps to do this? Or if there's any alternative that has a feature equivalent to what Stockfish's perft does that would be good too.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-07T23:40:32.867Z
Comments.Text: what is the executable called? this question is more suited for unix or apple stack exchange.
Comments.UserDisplayName: qwr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-08T01:03:29.083Z
Comments.Text: @qwr I wasn't sure where to post this but I decided to put it here because I figured that more people would know how to solve this in case it was a Stockfish-related problem and not purely a Unix problem. The executable in the src folder is called stockfish if that's what you're asking. I tried opening Stockfish by clicking on the executable icon and I got a `zsh: illegal hardware instruction` error in the terminal window that opened
Comments.UserDisplayName: wdk23
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-08T01:24:34.797Z
Comments.Text: which MacBook are you using? You need to get a binary that matches your hardware. If it's designed for M1 chip then you need to get that binary version.
Comments.UserDisplayName: qwr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-08T01:44:34.507Z
Comments.Text: @qwr I'm on a 2023 14 inch pro with an m2 chip. So do I need a different version of Stockfish?
Comments.UserDisplayName: wdk23
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-08T01:53:25.753Z
Comments.Text: you installed through homebrew? that means it should be in your PATH right? what happens if you try `stockfish` without ./
Comments.UserDisplayName: qwr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-08T01:53:47.543Z
Comments.Text: I don't use homebrew but it should've picked the right version for your hardware and OS.
Comments.UserDisplayName: qwr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-08T03:52:28.650Z
Comments.Text: @qwr Yeah just doing `stockfish` did the trick, thanks. Apologies for the off-topic question
Comments.UserDisplayName: wdk23
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-09T06:49:36.587Z
Comments.Text: @wdk23 shouldn't you mark the question as solved?
Comments.UserDisplayName: emdio
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-09T20:20:12.660Z
Comments.Text: @emdio I'm new to stack exchange, so correct me if I'm wrong, but as far as my knowledge of this site goes I can't because the responses were comments and not answers
Comments.UserDisplayName: wdk23
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-09T20:33:52.857Z
Comments.Text: @wdk23 I wasn't aware of that. In any case it seems you can answer your own question: https://stackoverflow.com/help/self-answer So why not just do it -with proper credit- and mark it as answered?
Comments.UserDisplayName: emdio
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-09T20:56:27.813Z
Comments.Text: @emdio sounds good, I'll do that
Comments.UserDisplayName: wdk23
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-11T23:25:03.063Z
Comments.Text: "with proper credit"
Comments.UserDisplayName: qwr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-12T00:11:14.807Z
Comments.Text: @qwr sorry about that, how do I tag you in the answer?
Comments.UserDisplayName: wdk23
Tags: <engines><software><stockfish><programming>
Title: How to run perft with Stockfish in the terminal on a macbook?
ThreadText: # How to run perft with Stockfish in the terminal on a macbook?
  
  (Asked by: username_0 on 2023-08-07)
  
  I just got a Macbook and I'm attempting to build a chess engine, so I want to run the perft function on Stockfish to compare my perft results. When I was on PC, I was able to download the engine from the website and run the perft function fine, but I can't figure out how to do it on mac. I tried downloading Stockfish with Homebrew which apparently worked but when I tried the `./stockfish` command to run t it outputted this error: `zsh: no such file or directory: ./stockfish`. Can anyone provide complete steps to do this? Or if there's any alternative that has a feature equivalent to what Stockfish's perft does that would be good too.
  
  **Tags:** engines, software, stockfish, programming
  
  > **Comments:**
  > **username_1**: what is the executable called? this question is more suited for unix or apple stack exchange.  
  > **username_0**: @username_1 I wasn't sure where to post this but I decided to put it here because I figured that more people would know how to solve this in case it was a Stockfish-related problem and not purely a Unix problem. The executable in the src folder is called stockfish if that's what you're asking. I tried opening Stockfish by clicking on the executable icon and I got a `zsh: illegal hardware instruction` error in the terminal window that opened  
  > **username_1**: which MacBook are you using? You need to get a binary that matches your hardware. If it's designed for M1 chip then you need to get that binary version.  
  > **username_0**: @username_1 I'm on a 2023 14 inch pro with an m2 chip. So do I need a different version of Stockfish?  
  > **username_1**: you installed through homebrew? that means it should be in your PATH right? what happens if you try `stockfish` without ./  
  > **username_1**: I don't use homebrew but it should've picked the right version for your hardware and OS.  
  > **username_0**: @username_1 Yeah just doing `stockfish` did the trick, thanks. Apologies for the off-topic question  
  > **username_2**: @username_0 shouldn't you mark the question as solved?  
  > **username_0**: @username_2 I'm new to stack exchange, so correct me if I'm wrong, but as far as my knowledge of this site goes I can't because the responses were comments and not answers  
  > **username_2**: @username_0 I wasn't aware of that. In any case it seems you can answer your own question: https://stackoverflow.com/help/self-answer So why not just do it -with proper credit- and mark it as answered?  
  > **username_0**: @username_2 sounds good, I'll do that  
  > **username_1**: "with proper credit"  
  > **username_0**: @username_1 sorry about that, how do I tag you in the answer?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-08-09. Score: 0 | Accepted answer
  
  Solution: I downloaded stockfish through homebrew and was able to run it on the terminal with the command `stockfish`. All other commands are the same.
  
  Credit: @username_1 in the comments
  
  
  ---
  
  