Code Monkey home page Code Monkey logo

protochess's Introduction

protochess

A simple chess engine (works quick up to a depth of 5 ply, slows down after that depth) (with qSearch implemented, it is slow at 4 ply, but plays at a higher elo) simple evaluation, negaMax with alpha-beta pruning + small opening book. This engine is not really intended to be a good chess player, just a learning experience. There are lots of improvements to be made: for example, you could add better quiescence search, transposition tables, negaScout, better evaluation function, and much more

use pip install python-chess to install dependencies

Pypy3 is recommended, as it runs about 4-6x faster on pypy3 (50,000-60,000 nodes/s on pypy vs 10,000-15,000 nodes/s on python3)

Usage

to initialize, type from protochess import *
to play against the computer as white, type play()
to watch the computers play eachother, type play_itself()
to analyze a position type analyze()

Elojavascript:void(0);

after testing with lichess it performs at a rough lichess level of 1500 on depth 4 (probably a rough elo of 1300-1350). Depth 5 performs at a +191 elo from depth 4 (tested with 50 self-play games). Extrapolation of this presents a rough elo of 1500 for depth 5

protochess's People

Contributors

bctboi23 avatar

Watchers

 avatar  avatar  avatar

protochess's Issues

ZeroDivisionError

when the elapsed time is tiny, sometimes the program yields a zero error

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.