Giter VIP home page Giter VIP logo

nibble-chess's Introduction

nibble-chess

A tribute to chess programming community based on ideas taken from micro-Max by H.G. Muller

nibble-chess

Overview

A large chess programming community helped me a lot over last three years, now I want to give
it something back. Nibble chess is a simple console based chess program which can be extended
to UCI chess engine. It's not intended to be used by end users, but by beginner programmers
who looks for some sort of resources to get started with. I wish I could have such program
when just started to learn chess programming. The source is mostly based on H.G. Muller's ideas, as
they are implemented in his micro-Max engine.

Release

Win32 ASCII version of nibble-chess https://github.com/maksimKorzh/nibble-chess/releases

Features

  • single source file of about 300 lines of C code
  • 0x88 board representation
  • three nested loops pseudo-legal move generator
  • material evaluation + positional scores(stored in right part of 0x88 board)
  • tricky move ordering technique: scoring move during move generation
  • very basic alpha-beta search
  • quiescence search
  • user move validation
  • console-based interface

Limitations

  • no 3 fold repetition detection
  • no 50 move rule detection

known bugs

  • doesn't find the closest mating line

Additional resources

There are various code snippets available in res/ folder:

    - pretty fast move generator/perft tester with piece lists
    - reimplementation of micro-Max's move generator in NASM assembly
    - FEN parser for nibble chess
    - very basic and raw implementation of UCI loop for nibble-chess
    - single file chess project template of my own design

Compile

on linux:
    gcc -Ofast nibble-chess.c -o nibble-chess

on windows:
    gcc.exe -std=c99 -Ofast nibble-chess.c -o nibble-chess.exe

If you're on windows please compile nibble-chess(ASCII).c file due to I shamely
don't know how to print unicode chars under windows, sorry about that.

Contributions

Any forks and contributions are appriciated. Feel free to contact me on any questions
via talkchess.com forum, opening issues on github or by email <[email protected]>

Contributors

Roland Chastain - kindly pointed out windows compilation details and reported unicode chars output issue,
                  provided native windows 32-bit binary executable

Useful resources

http://home.hccnet.nl/h.g.muller/max-src2.html - H. G. Muller's micro-Max tutorial

https://www.chessprogramming.org/Main_Page - chess programming wiki

http://talkchess.com/forum3/index.php - chess programming forum

nibble-chess's People

Contributors

maksimkorzh 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.