Giter VIP home page Giter VIP logo

foxsee's Introduction

Logo

UCI chess engine written in Rust!

Release Version License

Latest Rankings

CCRL Standard
CCRL Blitz
BRUCE Bullet

Play with me on lichess

Lichess Profile

Features

  • Negamax Search with Alpha-Beta Pruning
  • Principal Variance Search
  • Quiescence Search
  • Iterative Deepening
  • Internal Iterative Deepening
  • Kindergarten Bitboards
  • Zobrist Hashing
  • Transposition Table
  • Static Exchange Evalution (SEE)
  • Null-Move Pruning
  • Delta Pruning
  • Futility Pruning
  • Time Pruning (wiki)
  • Multi-Cut Pruning
  • Razoring
  • Check Extensions
  • Singular Extensions
  • Mate-Threat Extensions
  • Late-Move Reductions
  • Killer Heuristic
  • Relative History Heuristic
  • Counter-Move Heuristic

How to build

Install Rust

Run cargo build --release

How to use

This program complies with the UCI protocol, you can use it with any of the UCI-compatible GUIs (with a few limitations as mentioned in the Limitations section).

Limitations

  • Search x nodes is NOT supported
  • Search mate in x moves is NOT supported
  • Search specific moves under a given position is NOT supported
  • ponder is currently NOT supported
  • Big-endian systems are NOT supported

Credits

The logo shown on this page is created by @PabloDenial0. Many thanks.

References

Chess Programming by François Dominic Laramée
Mediocre Chess Guides
Chess Programming Wiki
Xorshiro128**
Stockfish Evaluation Guide

foxsee's People

Contributors

redsalmon91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

foxsee's Issues

Logo proposal

I have designed a logo for FoxSee, and I would like to propose it as the official logo of the engine, the images used are copyright free.
FoxSee_logo
FoxSee_logo_100x50
In Arena

Engine always panics when using sudden-death time control

Just wanted to let you know that it looks like the engine always panics when using sudden-death time control. I first tried with release version 1.2.3, then tried with v1.3.1 from the master branch. Below is the output when running the debug target with RUST_BACKTRACE=1 and entering the UCI commands by hand.

uci
id name FoxSEE 1.3.1
id author Zixiao Han
uciok
isready
readyok
ucinewgame
position startpos moves e2e4
go wtime 58000 btime 60000
thread 'main' panicked at 'index out of bounds: the len is 5 but the index is 5', /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/slice/mod.rs:2796:10
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:61
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1028
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:65
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:50
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:188
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:205
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:464
  11: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:373
  12: rust_begin_unwind
             at src/libstd/panicking.rs:302
  13: core::panicking::panic_fmt
             at src/libcore/panicking.rs:139
  14: core::panicking::panic_bounds_check
             at src/libcore/panicking.rs:96
  15: <usize as core::slice::SliceIndex<[T]>>::index
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/slice/mod.rs:2796
  16: core::slice::<impl core::ops::index::Index<I> for [T]>::index
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/slice/mod.rs:2647
  17: <alloc::vec::Vec<T> as core::ops::index::Index<I>>::index
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/liballoc/vec.rs:1861
  18: foxsee::uci::process_time_control
             at src/uci.rs:112
  19: foxsee::uci::process_go_cmd
             at src/uci.rs:83
  20: foxsee::uci::process_uci_cmd
             at src/uci.rs:68
  21: foxsee::main
             at src/main.rs:28
  22: std::rt::lang_start::{{closure}}
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
  23: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:48
  24: std::panicking::try::do_call
             at src/libstd/panicking.rs:287
  25: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:78
  26: std::panicking::try
             at src/libstd/panicking.rs:265
  27: std::panic::catch_unwind
             at src/libstd/panic.rs:396
  28: std::rt::lang_start_internal
             at src/libstd/rt.rs:47
  29: std::rt::lang_start
             at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
  30: main
  31: __libc_start_main
  32: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Thanks.

do_cas_mov does not clear castling rights bit mask properly

Thank you. Overall it's a pretty good, stable engine. I've been running games with it through the night to see if it would be a good engine to test my own engine against. I did find just one other issue in that testing. In the following game, FoxSEE tries to castle queen-side after already having castled king-side.

[Event "Computer Chess Game"]
[Site "-"]
[Date "2020.02.10"]
[Round "24"]
[White "FoxSEE 1.3.1"]
[Black "Tinman v0.1.2"]
[Result "0-1"]

1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. d3 Nf6 5. c3 d6 6. b4 Bb6 7. a4 a6 8. a5 Ba7
9. Ng5 O-O 10. O-O Bg4 11. Qb3 Bh5 12. Nd2 h6 13. Ngf3 Ng4 14. h3 Nxf2 15. Rxf2
Bxf2+ 16. Kxf2 Qd7 17. Bb2 Rad8 18. Ke1 g5 0-1
{polyglot: resign (illegal engine move by white: e1c1)}

Thanks.

Originally posted by @mikeleany in #1 (comment)

v8.0.0 loses on time

i successfully compiled your v8.0.0 source into a Linux binary, but it loses on time in CuteChess : see my settings .. it happens with other engines also : just before the time control (40th move) the engine uses too much time and loses the game.
[ i'm on Xubuntu 21.10 and CuteChess v1.2.0 =newest ]


FoxSEE_v8-0-0_lost_on_time_1


FoxSEE_v8-0-0_lost_on_time_2

It can't play black under Fritz 17

I have just encountered a problem. FoxSEE does not move under Fritz 17 when playing black. This was in a tournament, it played the first game with white without problems but it did not move in the second game playing black. I tried versions 4.0.1, 4.0.0 and 3.3.3.
There is no problem under Arena or Shredder.

Nps shown in uci output is wrong

Hi,

I noticed that the nps shown in uci output is wrong, probably since ever?

https://github.com/redsalmon91/FoxSEE/blob/master/src/search.rs#L212
let nps = self.node_count as u128 / (iter_time_taken_millis / 1000).max(1);

Instead of iter_taken_time_millis, which seems to be a variable used for time management,
it should be total_time_taken for calculating the correct nps.

Below output is from an old slow quadcore with current source compilation and fixed compilation.

uci
id name FoxSEE 7.36.0
id author Zixiao Han
option name Hash type spin default 128 min 1 max 512
uciok
go depth 15
info score cp 104 depth 1 seldepth 1 nodes 47 nps 47 hashfull 0 time 0 pv e2e4
info score cp 18 depth 2 seldepth 4 nodes 189 nps 189 hashfull 0 time 0 pv d2d4 d7d5
info score cp 63 depth 3 seldepth 5 nodes 592 nps 592 hashfull 0 time 1 pv b1c3 d7d5 e2e4 d5e4 c3e4
info score cp 20 depth 4 seldepth 8 nodes 1749 nps 1749 hashfull 0 time 4 pv b1c3 d7d5 e2e4 g8f6 e4d5 f6d5
info score cp 48 depth 5 seldepth 12 nodes 4497 nps 4497 hashfull 0 time 11 pv b1c3 d7d5 d2d4 g8f6 g1f3
info score cp 13 depth 6 seldepth 13 nodes 11874 nps 11874 hashfull 0 time 28 pv b1c3 d7d5 g1f3 g8f6 d2d4 b8c6
info score cp 38 depth 7 seldepth 14 nodes 23332 nps 23332 hashfull 1 time 55 pv b1c3 d7d5 d2d4 g8f6 g1f3 b8c6 c1f4
info score cp 17 depth 8 seldepth 16 nodes 68296 nps 68296 hashfull 3 time 162 pv b1c3 d7d5 e2e4 g8f6 e4d5 e7e6 d2d4 e6d5
info score cp 48 depth 9 seldepth 21 nodes 190296 nps 190296 hashfull 9 time 421 pv e2e4 d7d5 e4d5 e7e6 d2d4 e6d5 b1c3 g8f6 g1f3
info score cp 15 depth 10 seldepth 22 nodes 456387 nps 456387 hashfull 21 time 979 pv d2d4 d7d5 c1f4 g8f6 e2e3 b8c6 b1c3 c8f5 h2h3 e7e6
info score cp 20 depth 11 seldepth 22 nodes 953780 nps 953780 hashfull 46 time 2072 pv e2e4 d7d5 d2d3 d5e4 d3e4 d8d1 e1d1 e7e5 b1c3 b8c6 c3d5 e8d8
info score cp 23 depth 12 seldepth 26 nodes 2691820 nps 897273 hashfull 122 time 5832 pv e2e4 e7e5 b1c3 g8f6 d2d4 e5d4 d1d4 b8c6 d4c4 c6e5 c4b5 f6g4
info score cp 40 depth 13 seldepth 26 nodes 3851416 nps 1925708 hashfull 172 time 8497 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 d7d6 e5f3 b8c6 d2d3 b4c3 b2c3 c8e6
info score cp 45 depth 14 seldepth 26 nodes 6126516 nps 1225303 hashfull 257 time 13541 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 d7d6 e5f3 b8c6 d2d3 b4c3 b2c3 c8e6
info score cp 39 depth 15 seldepth 32 nodes 12389297 nps 953022 hashfull 442 time 27294 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 d7d6 e5f3 b8c6 d2d3 b4c3 b2c3 c8e6 a1b1 b7b6
bestmove e2e4

fixed should be this

uci
id name FoxSEE 7.36.x
id author Zixiao Han
option name Hash type spin default 128 min 1 max 512
uciok
go depth 15
info score cp 104 depth 1 seldepth 1 nodes 47 nps 47 hashfull 0 time 0 pv e2e4
info score cp 18 depth 2 seldepth 4 nodes 189 nps 189 hashfull 0 time 0 pv d2d4 d7d5
info score cp 63 depth 3 seldepth 5 nodes 592 nps 592 hashfull 0 time 1 pv b1c3 d7d5 e2e4 d5e4 c3e4
info score cp 20 depth 4 seldepth 8 nodes 1749 nps 1749 hashfull 0 time 4 pv b1c3 d7d5 e2e4 g8f6 e4d5 f6d5
info score cp 48 depth 5 seldepth 12 nodes 4497 nps 4497 hashfull 0 time 11 pv b1c3 d7d5 d2d4 g8f6 g1f3
info score cp 13 depth 6 seldepth 13 nodes 11874 nps 11874 hashfull 0 time 28 pv b1c3 d7d5 g1f3 g8f6 d2d4 b8c6
info score cp 38 depth 7 seldepth 14 nodes 23332 nps 23332 hashfull 1 time 55 pv b1c3 d7d5 d2d4 g8f6 g1f3 b8c6 c1f4
info score cp 17 depth 8 seldepth 16 nodes 68296 nps 68296 hashfull 3 time 163 pv b1c3 d7d5 e2e4 g8f6 e4d5 e7e6 d2d4 e6d5
info score cp 48 depth 9 seldepth 21 nodes 190296 nps 190296 hashfull 9 time 427 pv e2e4 d7d5 e4d5 e7e6 d2d4 e6d5 b1c3 g8f6 g1f3
info score cp 15 depth 10 seldepth 22 nodes 456387 nps 456387 hashfull 21 time 983 pv d2d4 d7d5 c1f4 g8f6 e2e3 b8c6 b1c3 c8f5 h2h3 e7e6
info score cp 20 depth 11 seldepth 22 nodes 953780 nps 476890 hashfull 46 time 2067 pv e2e4 d7d5 d2d3 d5e4 d3e4 d8d1 e1d1 e7e5 b1c3 b8c6 c3d5 e8d8
info score cp 23 depth 12 seldepth 26 nodes 2691820 nps 538364 hashfull 122 time 5794 pv e2e4 e7e5 b1c3 g8f6 d2d4 e5d4 d1d4 b8c6 d4c4 c6e5 c4b5 f6g4
info score cp 40 depth 13 seldepth 26 nodes 3851416 nps 481427 hashfull 172 time 8427 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 d7d6 e5f3 b8c6 d2d3 b4c3 b2c3 c8e6
info score cp 45 depth 14 seldepth 26 nodes 6126516 nps 471270 hashfull 257 time 13419 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 d7d6 e5f3 b8c6 d2d3 b4c3 b2c3 c8e6
info score cp 39 depth 15 seldepth 32 nodes 12389297 nps 458862 hashfull 442 time 27119 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8b4 f3e5 d7d6 e5f3 b8c6 d2d3 b4c3 b2c3 c8e6 a1b1 b7b6
bestmove e2e4

Version numbering

In the release notes you call the latest version 7.35 butthe engine displays 7.35.0. Which one do you prefer to appear on our rating list?

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.