As there are a few people who seem to be interested in Rustic, I'm posting a short progress report. The cataract operation went as planned, and recovery also seems to be as planned an on schedule, so I have (slowly) picked up Rustic's development again. In the last few days, I've been able to do the following:
- Code cleanup and reorganization where necessary.
- Create a generic way to plug in communication modules. In time, Rustic will be able to support UCI, XBoard, and its own Console text-based user interface, in modular fashion. The Console text interface already accepts moves, and it runs in its own thread. (UCI and XBoard will as well, obviously.)
- Integrated the CLAP command line parser. Rustic can now do FEN setups and run Perft from the command line without recompiling the program. (Finally.)
- Feature-gated two functions. They won't be in a normal engine build, but they can be included by building with the '--features = "extra" Cargo flag.
* "--wizardry / -w": generates magic numbers for LSB-based magic bit boards. (So people can actually see and study where the magics in magics.rs come from.)
* "--epdtest or -e": runs the full EPD test suite that floats around the net, with many additions posted on Talkchess. This can be used to run 172 perft tests to make sure changes to the move generator are working.
- Because putting the Console text UI into its own thread was quite easy after some jacking around, I decided to also add multi-threading to perft. It works. On an almost 5 year old i7-6700K, running 8 threads (including the logical cores), Rustic now runs perft between 140 and 170 million leaves per second depending on the position.
Code: Select all
$ ./target/release/rustic.exe --fen "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1" --perft 6 --threads 8
Program: Rustic Alpha 1
Author: Marcel Vanthoor <mail@marcelvanthoor.nl>
Description: Chess Engine written in Rust
FEN: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
Benchmarking perft 1-6 on 8 threads
8 r . . . k . . r
7 i . i i q i b .
6 b n . . i n i .
5 . . . I N . . .
4 . i . . I . . .
3 . . N . . Q . i
2 I I I B B I I I
1 R . . . K . . R
A B C D E F G H
Zobrist key: fb86acbc2034870e
Active Color: White
Castling: KQkq
En Passant: -
Half-move clock: 0
Full-move number: 1
Perft 1: 48 (0 ms, inf leaves/sec)
Perft 2: 2039 (0 ms, inf leaves/sec)
Perft 3: 97862 (1 ms, 97862000 leaves/sec)
Perft 4: 4085603 (27 ms, 151318629 leaves/sec)
Perft 5: 193690690 (1135 ms, 170652590 leaves/sec)
Perft 6: 8031647685 (49235 ms, 163128824 leaves/sec)
Total time spent: 50398 ms
Execution speed: 163290684 leaves/second
- Add alpha-beta
- Add quiescence search
- Add PSQT on top of material counting
- Add UCI interface
At that point, Rustic 1 will be done. Then I'll start writing the book with regard to its development, which will be at rustic-chess.org. (It will basically be a "The basics of chess programming" book, using Rust.)
After that, I'll start improving the engine with a transposition table, new search functions such as null move, killers, etc..., multi-threaded search (Lazy SMP), better evaluations... which will hopefully lead to a "More advanced topics of chess programming" book.
I think I'll be busy for the next few... years.