Answers.Body: <p>DiamondKnife (<a href="https://github.com/DiamondJM/DiamondKnife" rel="nofollow noreferrer">https://github.com/DiamondJM/DiamondKnife</a>) is claimed to have a 1700 rapid FICS rating, which is of course abysmal by computer chess standards, but might be good enough for your purposes (depends strongly on the quality of the code base, I suppose... which I haven't checked).</p>
  <p>If I wanted to create a <em>strong</em> engine in MATLAB, I would (apart from thinking about porting standard algorithms to MATLAB, which will always be slow, but should still be able to play well compared to most humans if it is done well) think about whether it is possible to convert one of the LC0 neural networks to a format that MATLAB understands, like ONNX. If that is successfully done, it would allow implementation of a very good, extremely selective search policy on top of a very good evaluation function and would put GM-level play firmly into reach for a MATLAB based program.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-22T10:32:07.347Z
Answers.LastActivityDate: 2023-05-22T10:32:07.347Z
Answers.UserDisplayName: Polytropos
Body: <p>I finished a university project working extensively with matlab, so I decided to create a chess engine on matlab too. Has anyone had any experience creating/using a chess engine on matlab. I understand it is significantly less efficient than a lower level language like c or c++. It is currently working but it is slow/bad (maybe like 900 rating)</p>
  <p>Are there any other open source Matlab engines I can learn from?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-18T15:31:36.737Z
Comments.Text: Please clarify your question. Are you just looking for chess engines written in Matlab, or something further?
Comments.UserDisplayName: qwr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-18T18:06:07.390Z
Comments.Text: [Julia](https://julialang.org/) may be worth exploring if you're looking for a high-level language that's easy to code with but with [superspeed capabilities](https://julialang.org/benchmarks/).
Comments.UserDisplayName: SecretAgentMan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-21T01:01:46.570Z
Comments.Text: You can compile your code from Matlab to C using MEX. It’s a lot faster that way.
Comments.UserDisplayName: Mattt
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-21T09:53:18.373Z
Comments.Text: @Mattt Isn't Mex the opposite thing, taking C or Fortran code and setting it up so that it is callable from Matlab? Maybe you are thinking about Matlab Coder and Compiler.
Comments.UserDisplayName: Federico Poloni
Tags: <engines>
Title: Chess Engine on Matlab
ThreadText: # Chess Engine on Matlab
  
  (Asked by: username_0 on 2023-05-18)
  
  I finished a university project working extensively with matlab, so I decided to create a chess engine on matlab too. Has anyone had any experience creating/using a chess engine on matlab. I understand it is significantly less efficient than a lower level language like c or c++. It is currently working but it is slow/bad (maybe like 900 rating)
  
  Are there any other open source Matlab engines I can learn from?
  
  **Tags:** engines
  
  > **Comments:**
  > **username_1**: Please clarify your question. Are you just looking for chess engines written in Matlab, or something further?  
  > **username_2**: [Julia](https://julialang.org/) may be worth exploring if you're looking for a high-level language that's easy to code with but with [superspeed capabilities](https://julialang.org/benchmarks/).  
  > **username_3**: You can compile your code from Matlab to C using MEX. It’s a lot faster that way.  
  > **username_4**: @username_3 Isn't Mex the opposite thing, taking C or Fortran code and setting it up so that it is callable from Matlab? Maybe you are thinking about Matlab Coder and Compiler.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_5 on 2023-05-22. Score: 1
  
  DiamondKnife (<https://github.com/DiamondJM/DiamondKnife>) is claimed to have a 1700 rapid FICS rating, which is of course abysmal by computer chess standards, but might be good enough for your purposes (depends strongly on the quality of the code base, I suppose... which I haven't checked).
  
  If I wanted to create a *strong* engine in MATLAB, I would (apart from thinking about porting standard algorithms to MATLAB, which will always be slow, but should still be able to play well compared to most humans if it is done well) think about whether it is possible to convert one of the LC0 neural networks to a format that MATLAB understands, like ONNX. If that is successfully done, it would allow implementation of a very good, extremely selective search policy on top of a very good evaluation function and would put GM-level play firmly into reach for a MATLAB based program.
  
  
  ---
  
  