Giter VIP home page Giter VIP logo

kotbc's Introduction

kotbc - king of the bell curve

Simplest AI

This folder contains the simplest possible implementation of an Ai trained to output the most optimal move given as an input the board state.

Preliminar setup

This project uses conda with Python 3.11.3.

If you want to install the PyTorch CUDA drivers for faster workflow, refer to this documentation: [https://pytorch.org/get-started/locally/]

To create, activate and setup the needed environment:

conda create -n kotbc python=3.11.3
conda activate kotbc
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia

How to train the models

In order to train you will need a collection of .pgn files of relatively good chess games.

A recommended resource is the following: [https://database.nikonoel.fr/], Credits go to https://lichess.org/@/nikonoel.

Once you found your .pgn files, collect them into a folder and store it inside of simplest-ai/.

The name of the folder is now the data_folder variale you will specify later.

Navigate to the simplest-ai folder

cd simplest-ai/

To train, specify the arguments in the command line:

python3 simplest_train.py <data_folder> <epochs> <batch_size> <learning_rate>

A good set of values to start with is the following:

python3 simplest_train.py <data_folder> 200 64 0.001

The trained model will be stored at simplest-ai/models/, with the name in the following descriptive formatting: simplest-ai*DATA{data_folder}\_E{epochs}\_BS{batch_size}\_LR{learning_rate}*{now}.pth

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.