Giter Club home page Giter Club logo

chess-data's Introduction

Chess Data

License: MIT Contributors

MySQL chess database CLI tools and machine learning with Rubix ML.

Documentation

Read the latest docs here.

License

Chess Data is open-sourced software licensed under the MIT license.

Contributions

We encourage you to contribute to Chess Data! Please follow the Contributing Guidelines.

Made with contrib.rocks.

chess-data's People

Contributors

jeffersonsimaogoncalves avatar programarivm avatar smashedfrenzy16 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chess-data's Issues

Create a new file called data/eco/openings.csv

A new file called data/eco/openings.csv should be created and populated with chess opening names, ECO (Encyclopaedia of Chess Openings) codes and movetexts.

This file is intended to feed the database's eco table.

See:

Keep it up, and happy coding and learning.

Rename the default script that prepares data for further training

The default script should be renamed to cli/data-prepare/training/classification/start.php. This one is intended to play games from the start position rather than from a FEN position.

There will be two scripts preparing data for further training:

  • cli/data-prepare/training/classification/start.php
  • cli/data-prepare/training/classification/fen.php

See #1

Create a new table called inbox

A new table called inbox needs to be created by the cli/db-create.php script.

Field Type Description
hash string The unique hash of the game
variant string 960
capablanca
capablanca-fischer
classical
settings JSON Optional settings: Initial FEN string
fen string The current FEN
movetext string The sequence of PGN moves played
createdAt datetime The creation date of the record

The MySQL inbox table is intended to store the information required by the correspondence chess functionality and will eventually replace the SleekDB database in the chess server.

Example:

{
  "hash": "cace2a000275f8ee8558a3b69b77efa2",
  "variant": "960",
  "settings": {
    "fen": "qnbbrnkr\/pppppppp\/8\/8\/4P3\/8\/PPPP1PPP\/QNBBRNKR b KQkq e3"
  },
  "fen": "qnbbrnkr\/pppppppp\/8\/8\/4P3\/8\/PPPP1PPP\/QNBBRNKR b KQkq -",
  "movetext": "",
  "createdAt": "2024-01-21 11:31:22",
  "createdBy": 1662,
  "_id": 4
}

Happy coding!

Create a new table called openings

A new table called openings should be created and populated with chess opening names, ECO (Encyclopaedia of Chess Openings) codes and movetexts.

Field Type Description
eco char(3) ECO code
name varchar Opening name
movetext varchar Movetext

See:

Keep it up, and happy learning and coding!

Add a new script to prepare data from FEN positions

At the present moment, there's only this script to prepare data for further training. It can play entire games from the start position, however, a new script should be added specifically for the purpose to play games from FEN strings.

The new script will allow to prepare data from rook endgames for example. More specifically, the next step in this machine learning project is to teach the computer how to deliver checkmate with a king and a rook only, and it is for this reason that the data/endgames folder has been created today.

The new script that prepares data from FEN positions should be named cli/data-prepare/training/classification/fen.php

Keep it up, and happy learning and coding.

Create sample data to deliver checkmate with a king, a bishop and knight against a lone king

Let's teach the computer to play chess by example!

This issue is intended to create the necessary data that will be used to teach the computer to deliver checkmate with a king, a bishop and knight against a lone king.

As described in Add a new script to prepare data from FEN positions #1, a new script which will prepare games loaded from FEN positions is about to be created. However, despite this data preparation script not being added to the codebase yet, the data for further training can be created at this moment.

Thus, a few endgames that will force a checkmate should be played at this stage of the development, for example:

Today, ten examples of King and Rook vs. King have been added in the data/endgames folder, and the exact same thing should be done for the endgames listed above.

Keep it up, and happy learning and coding.

Remove duplicate names of chess players

The demo database available at https://chesslablab.com contains more than 500,000 games available for study for free.

However, names of chess players may be duplicated and are sometimes unclear.

figure-01
Figure 1. Viswanathan Anand?

figure-02
Figure 2. Zsuzsa Polgár?

figure-03
Figure 3. Gary Kasparov?

Find out a way to be more specific about searching games by player name and remove duplicates so that searching data will be easier.

Keep it up, and happy coding and learning!

Create sample data to deliver checkmate with a king and two bishops against a lone king

Let's teach the computer to play chess by example!

This issue is intended to create the necessary data that will be used to teach the computer to deliver checkmate with a king and two bishops against a lone king.

As described in Add a new script to prepare data from FEN positions #1, a new script which will prepare games loaded from FEN positions is about to be created. However, despite this data preparation script not being added to the codebase yet, the data for further training can be created at this moment.

Thus, a few endgames that will force a checkmate should be played at this stage of the development, for example:

Today, ten examples of King and Rook vs. King have been added in the data/endgames folder, and the exact same thing should be done for the endgames listed above.

Keep it up, and happy learning and coding.

Create sample data to deliver checkmate with a king and queen against a lone king

Let's teach the computer to play chess by example!

This issue is intended to create the necessary data that will be used to teach the computer to deliver checkmate with a king and queen against a lone king.

As described in Add a new script to prepare data from FEN positions #1, a new script which will prepare games loaded from FEN positions is about to be created. However, despite this data preparation script not being added to the codebase yet, the data for further training can be created at this moment.

Thus, a few endgames that will force a checkmate should be played at this stage of the development, for example:

Today, ten examples of King and Rook vs. King have been added in the data/endgames folder, and the exact same thing should be done for the endgames listed above.

Keep it up, and happy learning and coding.

Fix the loading of certain TWIC games

Find out why the following TWIC games won't be loaded into the database.

$ docker exec -itu 1000:1000 chess_data_php_fpm php cli/seed/players.php data/twic/twic1460.pgn
✗ Whoops! It seems as if no valid games were found in this file.
$ docker exec -itu 1000:1000 chess_data_php_fpm php cli/seed/players.php data/twic/twic1461.pgn
✗ Whoops! It seems as if no valid games were found in this file.
$ docker exec -itu 1000:1000 chess_data_php_fpm php cli/seed/players.php data/twic/twic1465.pgn
✗ Whoops! It seems as if no valid games were found in this file.
$ docker exec -itu 1000:1000 chess_data_php_fpm php cli/seed/players.php data/twic/twic1480.pgn
✗ Whoops! It seems as if no valid games were found in this file.

Keep it up, and happy learning!

Create a chess database on pchess.net

At this moment, a chess server is running on pchess.net — a micro instance on AWS EC2 — which is the sandbox environment for development and testing, however, this instance can be used to host a chess database as well.

Two services should be running on this machine:

  • A chess server (WebSocket, port 8443)
  • A chess database (MySQL, port 3336)

This issue is about creating and populating a database with the grandmasters games in chess-data/data/players/ as per the docs.

Keep it up, and happy learning!

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.