npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ceruleanjs

v0.1.1

Published

JavaScript Chess Engine

Downloads

3

Readme

CeruleanJS by Joey Robert

JavaScript Chess Engine

                             ___
                            /\_ \
  ___     __   _ __   __  __\//\ \      __     __      ___
 /'___\ /'__`\/\`'__\/\ \/\ \ \ \ \   /'__`\ /'__`\  /' _ `\
/\ \__//\  __/\ \ \/ \ \ \_\ \ \_\ \_/\  __//\ \L\.\_/\ \/\ \
\ \____\ \____\\ \_\  \ \____/ /\____\ \____\ \__/.\_\ \_\ \_\
 \/____/\/____/ \/_/   \/___/  \/____/\/____/\/__/\/_/\/_/\/_/

Official Website: http://ceruleanjs.joeyrobert.org/

Build Status

Introduction

CeruleanJS is an XBoard chess engine for NodeJS, written by Joey Robert.

The goals of CeruleanJS are threefold:

  • Correctness
  • Performance
  • Ease of programming

CeruleanJS aims to be ranked on the CCRL.

Requirements

  • Node >= 4.0

Setup

To install the binary into your $PATH, install the ceruleanjs package globally:

npm install -g ceruleanjs

Run the engine with the command:

ceruleanjs

If you're installing from sources, check out this git repository and run:

npm install

To run:

npm start

To run mocha tests:

npm test

To generate a Windows binary executable using nexe, run:

npm run build-windows

This requires Microsoft Visual Studio 2015 to be installed. It will generate ceruleanjs.exe and book.bok in dist.

To generate a web build, run:

npm run build-web

This will generate a babelify'd ES5 version of CeruleanJS that is compatible with most modern day web browsers that support Web Workers. This build is used in the CeruleanJS Player.

Interface

CeruleanJS supports the XBoard/winboard/CECP format for communicating with interfaces or other chess engines. It's also usable directly through STDIN/OUT. Here's the list of commands:

Commands

display                     Draws the board
perft [INT]                 Perfts the current board to specified depth
perfthash [INT]             Sets perft hashtable exponent (size 2^exponent)
divide [INT]                Divides the current board to specified depth
moves                       Lists valid moves for this position
e2e4                        Moves from the current position and thinks
go                          Forces the engine to think
undo                        Subtracts the previous move
new                         Sets up the default board position
setboard [FEN]              Sets the board using Forsyth-Edwards Notation
evaluate                    Performs a static evaluation of the board
result                      Displays game result (checkmate or stalemate)
book [on|off]               Toggles whether engine uses opening book
white                       Sets the active colour to WHITE
black                       Sets the active colour to BLACK
time [INT]                  Sets engine's time (in centiseconds)
otim [INT]                  Sets opponent's time (in centiseconds)
sd [INT]                    Sets maximum depth
st [INT]                    Sets maximum time
level [MPT] [BASE] [INC]    Sets Winboard level timing
sts                         Run Strategic Test Suite (1s per move)
version                     Outputs the version number
exit                        Exits the menu
quit                        See exit
help                        Gets you this magical menu

Interface GIF

CeruleanJS Usage GIF

Technical

For a more technical breakdown of how CeruleanJS is implemented, see docs/TECHNICAL.md

License

CeruleanJS is licensed under the GNU GPL v3.

Changelog

  • v0.1.1 (Blizzard) - 2016-01-20

    • Fixed Polyglot castling bug
  • v0.1.0 (Blizzard) - 2016-01-20

    • Vastly improved move generation performance (10x)
    • Polyglot opening book (removes Mersenne Twister dependency)
      • Changed piece representation to Polyglot format
      • Implemented Polyglot Zobrist key support
      • Changed turn value (BLACK = 0, WHITE = 1)
    • Improved time management (supporting winboard level)
    • Implemented Strategic Test Suite (STS)
    • Support for Standard Algebraic Notation through moves command
    • Implemented Static Exchange Evaluation (SEE) -- not used at the moment
    • Implemented MVV/LVA move ordering
    • Improved evaluation function
    • Denser move structure
    • Added ANSI colors function (removes colors dependency)
    • Switched to Node's readline (removes stdio dependency)
    • Web support through CeruleanJS Player
    • Fixed Windows EXE generation bug
    • Improved unit test coverage
    • Changed LICENSE from GPLv2 to GPLv3
    • Rating roughly ~1300 ELO
  • v0.0.1 (Azure) - 2015-12-13

    • 15x12 board representation
    • Black and White piece lists
    • Move generation passing 100% perft test suite
    • FEN board getter and setter
    • 53-bit zobrist hash
    • Hash table
    • PVS Search with quiescence
    • Iterative deepening with basic move ordering
    • Simplified evaluation function (material + piece square tables)
    • Windows EXE generation
    • XBoard support