ClassicAra Chess Engine..World Record Download!!

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Gabor Szots
Posts: 1468
Joined: Sat Jul 21, 2018 7:43 am
Location: Budapest, Hungary
Full name: Gabor Szots

Re: ClassicAra Chess Engine..World Record Download!!

Post by Gabor Szots »

Sylwy wrote: Thu May 20, 2021 6:21 pm NO ! Just I tested INT8 weights and.....work !

https://github.com/QueensGambit/CrazyAr ... in_MKL.zip

My new test (versus the same Ktulu 9 like marker) will be with hash=512 MB (for each engine) and INTEL8 weights enabled !
Silvian, I see you use Arena. Does it set threads to 1 correctly? Have you checked with task manager? Default threads is 2 and it seems Ara does not obey the instruction to use only 1. In fact I experience the same under the Cute Chess GUI.
Gabor Szots
CCRL testing group
Chessqueen
Posts: 5685
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: ClassicAra Chess Engine..World Record Download!!

Post by Chessqueen »

Gabor Szots wrote: Thu May 20, 2021 6:55 pm
Sylwy wrote: Thu May 20, 2021 6:21 pm NO ! Just I tested INT8 weights and.....work !

https://github.com/QueensGambit/CrazyAr ... in_MKL.zip

My new test (versus the same Ktulu 9 like marker) will be with hash=512 MB (for each engine) and INTEL8 weights enabled !
Silvian, I see you use Arena. Does it set threads to 1 correctly? Have you checked with task manager? Default threads is 2 and it seems Ara does not obey the instruction to use only 1. In fact I experience the same under the Cute Chess GUI.
Under Arena 3.5.1 click or select Engines ==> Manages==> Details select ClassicAra ==> Uci and where it say Common Max CPU cores setting =1 and click Apply. There must be a difference of at least 150 rating between the CPU version 0.9.0 and GPU 0.9.2 post1 According to TCEC
https://tcec-chess.com/
User avatar
Sylwy
Posts: 4886
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: ClassicAra Chess Engine..World Record Download!!

Post by Sylwy »

Gabor Szots wrote: Thu May 20, 2021 6:55 pm
Sylwy wrote: Thu May 20, 2021 6:21 pm NO ! Just I tested INT8 weights and.....work !

https://github.com/QueensGambit/CrazyAr ... in_MKL.zip

My new test (versus the same Ktulu 9 like marker) will be with hash=512 MB (for each engine) and INTEL8 weights enabled !
Silvian, I see you use Arena. Does it set threads to 1 correctly? Have you checked with task manager? Default threads is 2 and it seems Ara does not obey the instruction to use only 1. In fact I experience the same under the Cute Chess GUI.
Hi, Gabor !

1.-to built MCGS the engines uses by default (internally) 1 to 3 threads:

Image

2.-the RISEv3.3 net is a RL one+a new architecture. Much better.

Image

This engine is really worth studying. A very interesting architecture.
Chessqueen
Posts: 5685
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: ClassicAra Chess Engine..World Record Download!!

Post by Chessqueen »

Sylwy wrote: Thu May 20, 2021 9:00 pm
Gabor Szots wrote: Thu May 20, 2021 6:55 pm
Sylwy wrote: Thu May 20, 2021 6:21 pm NO ! Just I tested INT8 weights and.....work !

https://github.com/QueensGambit/CrazyAr ... in_MKL.zip

My new test (versus the same Ktulu 9 like marker) will be with hash=512 MB (for each engine) and INTEL8 weights enabled !
Silvian, I see you use Arena. Does it set threads to 1 correctly? Have you checked with task manager? Default threads is 2 and it seems Ara does not obey the instruction to use only 1. In fact I experience the same under the Cute Chess GUI.
Hi, Gabor !

1.-to built MCGS the engines uses by default (internally) 1 to 3 threads:

Image

2.-the RISEv3.3 net is a RL one+a new architecture. Much better.

Image

This engine is really worth studying. A very interesting architecture.
Here is the latest download for different platforms ==>
https://github.com/QueensGambit/CrazyAra#download
User avatar
Sylwy
Posts: 4886
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: ClassicAra Chess Engine..World Record Download!!

Post by Sylwy »

Chessqueen wrote: Thu May 20, 2021 7:37 pm
Gabor Szots wrote: Thu May 20, 2021 6:55 pm
Sylwy wrote: Thu May 20, 2021 6:21 pm NO ! Just I tested INT8 weights and.....work !

https://github.com/QueensGambit/CrazyAr ... in_MKL.zip

My new test (versus the same Ktulu 9 like marker) will be with hash=512 MB (for each engine) and INTEL8 weights enabled !
Silvian, I see you use Arena. Does it set threads to 1 correctly? Have you checked with task manager? Default threads is 2 and it seems Ara does not obey the instruction to use only 1. In fact I experience the same under the Cute Chess GUI.
Under Arena 3.5.1 click or select Engines ==> Manages==> Details select ClassicAra ==> Uci and where it say Common Max CPU cores setting =1 and click Apply. There must be a difference of at least 150 rating between the CPU version 0.9.0 and GPU 0.9.2 post1 According to TCEC
https://tcec-chess.com/
The UCI settings on the Arena GUI cannot affect the internal architecture of this engine. If necessary it uses 1-2 or 3 threads.

Image
User avatar
Gabor Szots
Posts: 1468
Joined: Sat Jul 21, 2018 7:43 am
Location: Budapest, Hungary
Full name: Gabor Szots

Re: ClassicAra Chess Engine..World Record Download!!

Post by Gabor Szots »

Sylwy wrote: Thu May 20, 2021 9:17 pmThe UCI settings on the Arena GUI cannot affect the internal architecture of this engine. If necessary it uses 1-2 or 3 threads.
Too bad. Then it's not suitable for 1-CPU testing.
Gabor Szots
CCRL testing group
User avatar
Sylwy
Posts: 4886
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: ClassicAra Chess Engine..World Record Download!!

Post by Sylwy »

Chessqueen wrote: Thu May 20, 2021 9:16 pm Here is the latest download for different platforms ==>
https://github.com/QueensGambit/CrazyAra#download
:wink:

ChessAra 0.9.0 remains the only usable version ...........

Image
User avatar
Sylwy
Posts: 4886
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: ClassicAra Chess Engine..World Record Download!!

Post by Sylwy »

An incredible Caro-Kann mabe by ClassicAra 0.9.0 using RISEv3.3 model:

[pgn]
[Event "NN Test99"]
[Site "ISR 3"]
[Date "2021.05.20"]
[Round "3"]
[White "ClassicAra_0.9.0_x64"]
[Black "Ktulu 9 w32"]
[Result "1-0"]
[BlackElo "2200"]
[ECO "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d5xe6 Qd6xe6 h5-h6 Rf8-g8 Rg1xg8 Qe6xg8
d4xc5 Qg8-f7 Qc2-d2 Be7-f6 Qd2xa5 Qf7-d7 Kb1-a1 Qd7-c6 Rh1-h3 Qc6-d7
Rh3-h1) -10.75/14 7 Arena Adjudication} 1-0
[/pgn]
IQ_QI
Posts: 25
Joined: Wed Dec 05, 2018 8:51 pm
Full name: Johannes Czech

Re: ClassicAra Chess Engine..World Record Download!!

Post by IQ_QI »

Hello together,
I'm glad that some of you like the ClassicAra engine.
It seems that there is some confusion about the engine that I like to clarify.
Gabor Szots wrote: Thu May 20, 2021 9:32 pm
Sylwy wrote: Thu May 20, 2021 9:17 pmThe UCI settings on the Arena GUI cannot affect the internal architecture of this engine. If necessary it uses 1-2 or 3 threads.
Too bad. Then it's not suitable for 1-CPU testing.
The option Threads currently describes the number of search threads which allocate the mini-batches.
For multi-GPU builds, this option is treated as Threads per GPU but because the option Threads has become a standard, I renamed it back to Threads. The current TCEC version is using the GPU build (TensorRT-backend) with 3 threads per GPU.
The script update.sh is the script which was used to build ClassicAra on the TCEC multi-GPU Linux server: The TCEC version does indeed use the new RISE 3.3 architecture. The model RISE 3.3 was trained on the same dataset (Kingbase Lite 2019) and was not further optimized using reinforcement learning yet.

There are also some threads running by default.
  • A main thread which handles user input commands over stdin.
  • A thread manager which logs the current best move to the console every 1s, stops the search threads when the stop command is given and handles the time management.
  • A garbage collector thread which asynchronously frees the memory from the previous search during the current search.
It is possible to use only a single thread for CPU based neural network inference.
For this you need to set define an environment variable OMP_NUM_THREADS and set it to 1. During neural network inference, the search thread will be idle and wait for the neural network inference result.
Hopefully, there will be a more user friendly way for defining this in the future.
My new test (versus the same Ktulu 9 like marker) will be with hash=512 MB (for each engine) and INTEL8 weights enabled !
When I tried using int8 precision for ClassicAra 0.9.0 on Windows and Mac for the CPU version, it crashed.
For the Linux version, however, I managed to build a newer MXNet CPU back-end and it was running.
The crash could maybe also depend on the CPU or a system library.
So if the CPU only binary for Windows using int8 precision does not crash on start-up and runs faster than float32 precision, then it seems to be working.

I wish to have published new binaries by now. However, the integration of a fully asynchronous garbage collection made the engine no longer 100% stable. I added a hotfix to make it 99.9% stable before TCEC submission but I'm not satisfied with the current solution yet.
After I have found a better solution for this problem, I will provide new binaries.
User avatar
AdminX
Posts: 6363
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: ClassicAra Chess Engine..World Record Download!!

Post by AdminX »

IQ_QI wrote: Thu May 20, 2021 11:11 pm Hello together,
I'm glad that some of you like the ClassicAra engine.
It seems that there is some confusion about the engine that I like to clarify.
Gabor Szots wrote: Thu May 20, 2021 9:32 pm
Sylwy wrote: Thu May 20, 2021 9:17 pmThe UCI settings on the Arena GUI cannot affect the internal architecture of this engine. If necessary it uses 1-2 or 3 threads.
Too bad. Then it's not suitable for 1-CPU testing.
The option Threads currently describes the number of search threads which allocate the mini-batches.
For multi-GPU builds, this option is treated as Threads per GPU but because the option Threads has become a standard, I renamed it back to Threads. The current TCEC version is using the GPU build (TensorRT-backend) with 3 threads per GPU.
The script update.sh is the script which was used to build ClassicAra on the TCEC multi-GPU Linux server: The TCEC version does indeed use the new RISE 3.3 architecture. The model RISE 3.3 was trained on the same dataset (Kingbase Lite 2019) and was not further optimized using reinforcement learning yet.

There are also some threads running by default.
  • A main thread which handles user input commands over stdin.
  • A thread manager which logs the current best move to the console every 1s, stops the search threads when the stop command is given and handles the time management.
  • A garbage collector thread which asynchronously frees the memory from the previous search during the current search.
It is possible to use only a single thread for CPU based neural network inference.
For this you need to set define an environment variable OMP_NUM_THREADS and set it to 1. During neural network inference, the search thread will be idle and wait for the neural network inference result.
Hopefully, there will be a more user friendly way for defining this in the future.
My new test (versus the same Ktulu 9 like marker) will be with hash=512 MB (for each engine) and INTEL8 weights enabled !
When I tried using int8 precision for ClassicAra 0.9.0 on Windows and Mac for the CPU version, it crashed.
For the Linux version, however, I managed to build a newer MXNet CPU back-end and it was running.
The crash could maybe also depend on the CPU or a system library.
So if the CPU only binary for Windows using int8 precision does not crash on start-up and runs faster than float32 precision, then it seems to be working.

I wish to have published new binaries by now. However, the integration of a fully asynchronous garbage collection made the engine no longer 100% stable. I added a hotfix to make it 99.9% stable before TCEC submission but I'm not satisfied with the current solution yet.
After I have found a better solution for this problem, I will provide new binaries.
Thank you for such an interesting engine! :D
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers