Skip to content

Commit

Permalink
cinder is born
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocodutra committed Jan 1, 2025
1 parent b72eefb commit f4f5cc4
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ jobs:
- run: sudo apt install -y musl-tools
if: runner.os == 'Linux'
- run: cargo install --force cargo-make
- run: cargo make dist
- run: cargo make cinder
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Guidelines

* All code submitted to Chessboard via pull requests is
assumed to be [licensed under the GPL-3.0][LICENSE].
* All contributions to Cinder via pull requests are assumed to be [licensed under the GPL-3.0][LICENSE].
* Every code change must be covered by unit tests, use [cargo-llvm-cov] to generate the code coverage report:
+ `cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info`
* Besides `cargo test`, make sure [Clippy] and [rustfmt] checks also pass before submitting a pull request:
Expand All @@ -10,7 +9,7 @@ assumed to be [licensed under the GPL-3.0][LICENSE].
* Follow [rustsec.org] advisories when introducing new dependencies, use [cargo-audit] to verify:
+ `cargo audit -D`

[LICENSE]: https://github.com/brunocodutra/chessboard/blob/master/LICENSE
[LICENSE]: https://github.com/brunocodutra/cinder/blob/master/LICENSE
[rustsec.org]: https://rustsec.org/advisories/

[Clippy]: https://github.com/rust-lang/rust-clippy#usage
Expand Down
38 changes: 19 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "chessboard"
name = "cinder"
version = "0.1.0"
authors = ["Bruno Dutra <[email protected]>"]
edition = "2021"
description = "A chess engine"
repository = "https://github.com/brunocodutra/chessboard.git"
repository = "https://github.com/brunocodutra/cinder.git"
license = "GPL-3.0"
readme = "README.md"
keywords = ["chess"]
Expand Down Expand Up @@ -66,7 +66,7 @@ path = "lib/lib.rs"
bench = false

[[bin]]
name = "cli"
name = "cinder"
path = "bin/main.rs"
bench = false

Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[tasks.dist]
[tasks.cinder]
command = "cargo"
args = [
"build",
Expand Down
55 changes: 45 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,56 @@
# Chessboard [![codecov.badge]][codecov.home]

A sandbox for experimenting with chess engines.
<div align="center">
<img src="logo.svg" width="250px" alt="Cinder"/>
<h1>• C I N D E R •</h1>
<br>
</div>

## Overview

Cinder is an independent chess engine written in Rust from scratch.
With a playing strength that is far superior to what humans are capable of,
Cinder is primarily developed to play against other engines. It is regularly tested
at the extremely short time control of 3s+25ms per game. The shorter the time control,
the stronger Cinder tends to play.

## Usage

Cinder implements the UCI protocol and should be compatible with most current
chess graphical user interfaces (GUI). Users who are familiar with the UCI protocol
may also interact with Cinder directly on a terminal via its command line interface (CLI).
In addition to the standard UCI commands, Cinder also implements a custom command `eval`
that prints Cinder's evaluation of the current position in its own internal units.

### Example

```
uci
id name Cinder
id author Bruno Dutra
option name Hash type spin default 16 min 0 max 33554432
option name Threads type spin default 1 min 1 max 65536
uciok
go depth 15
info score cp +17 pv d2d4 g8f6 c2c4 e7e6 g1f3 d7d5 b1c3 f8b4 c4d5 e6d5 c1g5 b4c3 b2c3 h7h6 g5f6
bestmove d2d4
```

## Contribution

Chessboard is an open source project and you're very welcome to contribute to this project by
Cinder is an open source project and you're very welcome to contribute to this project by
opening [issues] and/or [pull requests][pulls], see [CONTRIBUTING] for general guidelines.

Building Cinder from source currently requires the nightly Rust compiler and [cargo-make].
To compile binaries optimized for your CPU architecture, simply run `cargo make cinder`.

## License

Chessboard is distributed under the terms of the GPL-3.0 license, see [LICENSE] for details.
Cinder is distributed under the terms of the GPL-3.0 license, see [LICENSE] for details.

[codecov.home]: https://codecov.io/gh/brunocodutra/chessboard
[codecov.badge]: https://codecov.io/gh/brunocodutra/chessboard/branch/master/graph/badge.svg
[issues]: https://github.com/brunocodutra/cinder/issues
[pulls]: https://github.com/brunocodutra/cinder/pulls

[issues]: https://github.com/brunocodutra/chessboard/issues
[pulls]: https://github.com/brunocodutra/chessboard/pulls
[cargo-make]: https://github.com/sagiegurari/cargo-make

[LICENSE]: https://github.com/brunocodutra/chessboard/blob/master/LICENSE
[CONTRIBUTING]: https://github.com/brunocodutra/chessboard/blob/master/CONTRIBUTING.md
[LICENSE]: https://github.com/brunocodutra/cinder/blob/master/LICENSE
[CONTRIBUTING]: https://github.com/brunocodutra/cinder/blob/master/CONTRIBUTING.md
4 changes: 2 additions & 2 deletions lib/uci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ impl<I: FusedStream<Item = String> + Unpin, O: Sink<String> + Unpin> Uci<I, O> {
}

["uci"] => {
let name = format!("id name {}", env!("CARGO_PKG_NAME"));
let author = format!("id author {}", env!("CARGO_PKG_AUTHORS"));
let name = "id name Cinder".to_string();
let author = "id author Bruno Dutra".to_string();

let hash = format!(
"option name Hash type spin default {} min {} max {}",
Expand Down
45 changes: 45 additions & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f4f5cc4

Please sign in to comment.