Giter VIP home page Giter VIP logo

random-uci's Introduction

random-uci

Overview

An open source simple UCI engine that moves randomly.

UCI Options

In addition to moving randomly there are UCI options that alter its behavior. They are:

Deterministic

If set to true then the random move is a function of the board state, so the same move will always be made in the same situation.

Filter

A subset of the moves may be chosen. If the filter fails to find a valid move then it reverts to randomly choosing from all possible moves. Valid values are:

  • none
    • Apply no filter so that all moves are considered. This is the default.
  • first
    • Play the first move after sorting the move alphabetically. This is "a2a3" for the first move.
  • last
    • Play the last move after sorting the move alphabetically. This is "h2h4" for the first move.
  • mirror
    • Mirror the opponent's move across the boundary between the fourth and fifth row. Move "e2e4" becomes "e7e5", for example.
  • rotate
    • Rotate the opponent's move 180° around the vertical axis. Move "e2e4" becomes "d7d5", for example.
  • syzygy
    • Use the specified syzygy tablespace to pick the best move when in the tablespace.

Promotion

The action to take when a pawn is promoted. Valid values are:

  • random
    • Promote to a random piece. This is the default.
  • knight
    • Promote to a knight.
  • bishop
    • Promote to a bishop.
  • rook
    • Promote to a rook.
  • queen
    • Promote to a queen.

Seed

When Deterministic is set to true this allows an alternate set of random moves to be played. All strings are valid values. All values result in a complete different set of random moves.

SyzygyPath

Path to a syzygy tablespace. "/mnt/data/chess/syzygy/3-4-5", for example.

Installation

The following dependencies are required:

  • Python 3
  • python-chess

python-chess can be installed via pip:

pip install chess

Once the dependencies have been satisfied the ZIP file can be expanded to a directory of your choice. For example, if you downloaded the ZIP file to ~/Downloads, but you wish to install it to /opt then:

sudo unzip -d /opt ~/Downloads/random-uci-0.9.2.zip

Or use the GUI interface on your operating system to expand the ZIP file wherever you want.

If your chess GUI supports UCI then you only have to refer to the full path to random-uci.py, which in the above example is /opt/random-uci-0.9.2/bin/random-uci.py. Some chess GUIs, such as Xboard and WinBoard, require Polyglot to translate from the Xboard protocol to UCI. In that case see the included polyglot/random-uci.ini for an example configuration file.

License

GPL version 2.0 or later as per the included LICENSE file.

random-uci's People

Contributors

selliott512 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.