Crates.io | shogai |
lib.rs | shogai |
version | 2.0.0 |
source | src |
created_at | 2020-06-16 08:57:31.517487 |
updated_at | 2020-07-11 12:01:50.632419 |
description | A shogi helper |
homepage | |
repository | https://github.com/michaelb/shogai |
max_upload_size | |
id | 254477 |
size | 1,349,045 |
a rust interface for shogi engines (with simple shogi engine capabilities)
Should be used as a library, but the demo (code in main.rs) is playable, as you can see below (me vs a stupid bot)
an helper programm that can create, manage, display (on terminal), and modify a shogiban (the board of shogi)
What it means: You can create a board, ask for possible (legal) moves, play such a move, print a board on the CLI, get things like the value (good position?) and nice things.
Honestly, I don't really know. Do you want to implement a shogi engine? Maybe that's the right place... I mean, you can do a shogi engine in a few lines (see ai::greedy) with the help of shogai, but as long as performance is a concern, I cannot offer any garanties. It is still quite optimized, but code clarity was more important than pure speed here.
DISCLAIMER: I do not have a way to compare performance with other shogi engines, as implementing a shogi engine is a completely different story, tons of if/elses branches etc...
If you are interested in building your own "high-perf" shogi engine in rust, you can use this helper to fasten development. You may have to redo some parts yourself if performance is not up to your expectations. Advantages of using shogai ?:
Draw conditions are not managed.
add
shogai="*"
to your Cargo.toml
(or whatever it means for you) Depending on your goals, (i mean: performance goals), your usage can conform to examples as shown in documentation, or get quite optimized, but then, more complex.
The structure of your basic shogi program should look like this:
PR can be accepted, and contributors are welcome!