Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: Chess Players! - A New Chess Engine!

  1. #1
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Chess Players! - A New Chess Engine!

    Some of you may already know that the final round of the Computer Chess Championship is going on right now.
    As might be expected of computer players and unlike human tournaments, the event has been played practically non-stop 24hrs a day, 7 days a week for several months now, and probably still has about a week or two more to go.

    Stockfish, which is available in our openSUSE repos as a free download is the reigning champion and is currently leading the field, in fact was on something like a 140 game undefeated streak going into this final round and has been crushing foes one after another. Then, the unexpected. The engine who was faring last in this final round suddenly took Stockfish's scalp in a very unexpected win. Then, a few games later and only a couple hours ago, lc0 which is the actual subject of this post also beat Stockfish.

    This new engine, lc0 (Leela) is a new engine which in its current incarnation has been competing only very recently, and it grabbed my attention for a couple reasons... It doesn't work very much like any previous chess engine, and if one looks at its games, you'd be struck by how differently it values initiative and seems to evaluate positional sacrifices, one of the most difficult things to master where you give away material and arrive at an objective position that cannot be measured by traditional piece values... That's the magic of chess, that wooden pieces which are normally assigned static values can be imbued with extraordinary powers when conditions are right.... And, most players computer and human don't or can't recognize those situations.

    The other unique thing about lc0 which I still want to investigate is that supposedly this new incarnation doesn't require instruction how to play the game. Supposedly you just feed it thousands of games, and it teaches itself the rules of the game, and because of this the program doesn't just play world class chess. It also plays world class go and shojei without modifying the program. Wow. That's some kind of machine learning.

    Anyway...
    Any of you interested in trying out this lc0 chess engine on openSUSE?

    I've just created a Pull request for the lc0 project containing instructions for installing on openSUSE.
    Don't know how long it will take for approval, but anyone running openSUSE is welcome to install by accessing the guide from my github site

    https://github.com/putztzu/lc0/blob/...USE_install.md

    The main project site
    https://github.com/LeelaChessZero/lc0

    And,
    For any of you who also are interested in writing BASH install scripts, you might find the included lc0 install script interesting...
    It detects Tumbleweed vs LEAP and modifies the "Add Repo" install accordingly, installs a C++ build enviornment and executes the build that's already on the site.

    If anyone runs into problems or questions, the usual place to post would be in the Applications Technical Help forum...

    Enjoy...
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: Chess Players! - A New Chess Engine!

    Hi
    https://build.opensuse.org/package/s...is:TESTING/lc0

    Options enabled, gtest, openblas and OpenCL....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Re: Chess Players! - A New Chess Engine!

    Quote Originally Posted by malcolmlewis View Post
    Hi
    https://build.opensuse.org/package/s...is:TESTING/lc0

    Options enabled, gtest, openblas and OpenCL....
    Cool!

    Depending on how things go, I'll update the Project Info.
    Note that my script points to the lc0 Development branch,
    Your RPM may want to point to a Release branch instead... unless a Maintainer is willing to pay constant attention to re-building.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: Chess Players! - A New Chess Engine!

    Quote Originally Posted by tsu2 View Post
    Cool!

    Depending on how things go, I'll update the Project Info.
    Note that my script points to the lc0 Development branch,
    Your RPM may want to point to a Release branch instead... unless a Maintainer is willing to pay constant attention to re-building.

    TSU
    Hi
    It's all automated, changelog building etc, minimal user interaction with the following command
    Code:
    osc service remoterun [PROJECT PACKAGE]
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Re: Chess Players! - A New Chess Engine!

    Malcolm,
    Your the one-click install for your LEAP package fails because it thinks it doesn't have root permissions. Have tested 3x and never seen that error elsewhere, so I'm pretty sure it's something specific to the spec (Is it possible to hard code the root password credential?)

    The install proceeds up to where you enter the root password, but when it's entered correctly YaST continues and then displays the results and the reason for failure (says root permissions required).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: Chess Players! - A New Chess Engine!

    Hi
    Likely one-click and those mechanisms, I would download and install, it
    will ask about the repo key. You would need to add the repo or import
    manually.

    So it will work with OpenCL (AMD gpu) else blas and use the cpu.

    If wanting nvidia then would need to download the src rpm, ensure your
    system has the nvidia bits installed and rebuild the rpm (this also
    changes the license...).

    Just upgrading to the latest Tumbleweed, will reboot and try the one-click.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: Chess Players! - A New Chess Engine!

    Quote Originally Posted by malcolmlewis View Post
    Just upgrading to the latest Tumbleweed, will reboot and try the one-click.
    Hi
    Hmmm, worked fine here on Tumbleweed, selected not to remain subscribed, asked for root password and installed....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: Chess Players! - A New Chess Engine!

    Hi
    So doesn't pick up the discrete GPU to use if kicked off with DRI_PRIME=1 other apps are working fine switching

    Code:
    DRI_PRIME=1 glmark2
    =======================================================
        glmark2 2017.07
    =======================================================
        OpenGL Information
        GL_VENDOR:     X.Org
        GL_RENDERER:   AMD Radeon (TM) R7 M340 (ICELAND, DRM 3.27.0, 4.19.12-1-default, LLVM 7.0.0)
        GL_VERSION:    4.5 (Compatibility Profile) Mesa 18.3.1
    =======================================================
    
    glmark2
    =======================================================
        glmark2 2017.07
    =======================================================
        OpenGL Information
        GL_VENDOR:     X.Org
        GL_RENDERER:   AMD CARRIZO (DRM 3.27.0, 4.19.12-1-default, LLVM 7.0.0)
        GL_VERSION:    4.5 (Compatibility Profile) Mesa 18.3.1
    =======================================================
    Benchmark results for lc0;

    Code:
    lc0 benchmark --weights=.weights/weights
           _
    |   _ | |
    |_ |_ |_| v0.21.0-dev built Jan 10 2019
    Loading weights file from: .weights/weights
    Creating backend [opencl]...
    OpenCL, maximum batch size set to 16.
    Initializing OpenCL.
    Detected 1 OpenCL platforms.
    Platform version: OpenCL 1.1 Mesa 18.3.1
    Platform profile: FULL_PROFILE
    Platform name:    Clover
    Platform vendor:  Mesa
    Device ID:      0
    Device name:    AMD CARRIZO (DRM 3.27.0, 4.19.12-1-default, LLVM 7.0.0)
    Device type:    GPU
    Device vendor:  AMD
    Device driver:  18.3.1
    Device speed:   720 MHZ
    Device cores:   6 CU
    Device score:   1111
    Device ID:      1
    Device name:    AMD Radeon (TM) R7 M340 (ICELAND, DRM 3.27.0, 4.19.12-1-default, LLVM 7.0.0)
    Device type:    GPU
    Device vendor:  AMD
    Device driver:  18.3.1
    Device speed:   1021 MHZ
    Device cores:   5 CU
    Device score:   1111
    Selected platform: Clover
    Selected device: AMD CARRIZO (DRM 3.27.0, 4.19.12-1-default, LLVM 7.0.0)
    with OpenCL 1.1 capability.
    Started OpenCL SGEMM tuner with batch size 16.
    Will try 578 valid configurations.
    (1/578) KWG=32 KWI=2 MDIMA=8 MDIMC=8 MWG=16 NDIMB=8 NDIMC=8 NWG=16 SA=0 SB=0 STRM=0 STRN=0 VWM=1 VWN=1 20677.0 us (26.0 GFLOPS)
    ....
    (491/578) KWG=32 KWI=2 MDIMA=32 MDIMC=32 MWG=64 NDIMB=8 NDIMC=8 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 3778.9 us (142.1 GFLOPS)
    Wavefront/Warp size: 64
    
    Max workgroup size: 256
    Max workgroup dimensions: 256 256 256
    Benchmark time 490ms, 2 nodes, 4 nps, move e2e4
    ....
    Benchmark time 183506ms, 19764 nodes, 107 nps, move e2e4
    bestmove e2e4
    Benchmark final time 187.364s calculating 107.705 nodes per second.
    
    cat leelaz_opencl_tuning
    
    0;XgemmBatched;256;256;256;16; -DKWG=32 -DKWI=2 -DMDIMA=32 -DMDIMC=32 -DMWG=64 -DNDIMB=8 -DNDIMC=8 -DNWG=64 -DSA=1 -DSB=1 -DSTRM=0 -DSTRN=0 -DVWM=2 -DVWN=2;OpenCL: AMD AMD CARRIZO (DRM 3.27.0, 4.19.12-1-default, LLVM 7.0.0) @ 720MHz
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,488
    Blog Entries
    15

    Default Re: Chess Players! - A New Chess Engine!

    Hi
    Using the blas backend... way way slower

    Code:
    lc0 benchmark --weights=.weights/weights -b blas
           _
    |   _ | |
    |_ |_ |_| v0.21.0-dev built Jan 10 2019
    Loading weights file from: .weights/weights
    Creating backend [blas]...
    BLAS, maximum batch size set to 256
    BLAS vendor: OpenBlas.
    OpenBlas [OpenBLAS 0.3.4 DYNAMIC_ARCH NO_AFFINITY Excavator MAX_THREADS=64].
    OpenBlas found 4 Excavator core(s).
    OpenBLAS using 1 core(s) for this backend.
    BLAS max batch size is 256.
    Benchmark time 1787ms, 2 nodes, 1 nps, move e2e4
    ....
    Benchmark time 674791ms, 19729 nodes, 29 nps, move e2e4
    bestmove e2e4
    Benchmark final time 689.464s calculating 29.3054 nodes per second.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Re: Chess Players! - A New Chess Engine!

    Your scores regarding GPU vs CPU are expected...
    And, that's the other thing... AFAIK lc0 might be the only chess engine designed for GPU computing as its preferred configuration.

    Here are the World Computer Chess Championship rules and the hardware competitors are running on... The GPU configuration got a CPU (not GPU part) upgrade today so is even beefier...

    https://www.chess.com/news/view/anno...s-championship

    Believe the "Basic" package on the following page is the GPU hardware it's running on... And in addition to this, there are also 2 CPUs, about $3000 each...

    https://lambdalabs.com/servers/hyperplane/customize

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •