cl-permutation
ChessPositionRanking
Our great sponsors
cl-permutation | ChessPositionRanking | |
---|---|---|
4 | 29 | |
47 | 132 | |
- | - | |
3.5 | 2.5 | |
10 months ago | 5 months ago | |
Common Lisp | Haskell | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cl-permutation
-
Permutation Iteration and Random Access
Here is Lisp code [1] that maps all sorts of combinatorial objects—permutations, bit sets, base-B integers, multi-set permutations, etc.—perfectly into the smallest set of integers [0, n-1] and back. (In a sense, it's a perfect hash.) This is used to efficiently solve combinatorial puzzles.
[1] https://github.com/stylewarning/cl-permutation/blob/master/s...
-
Can a Rubik's Cube be brute-forced?
Note that in the unlikely event anyone wants to run the code in the post, the algorithm presented is still in an open PR, APIs change until merged, etc.
- Favorite Lisp project? Shameless plugs welcome & encouraged!
-
Is Fisher-Yates Shuffle (aka Knuth Shuffle) implemented in some vetted CL library?
CL-PERMUTATION has random-perm to produce a random permutation of even, odd, or any parity.
ChessPositionRanking
- Chess Position Ranking
-
How to Store a Chess Game in 26 Bytes Using Bit-Level Magic
3. There's extra nuanced things you might want to handle in the coding, like that pawns can't be on their own back row. That is significantly harder.
It looks to me like https://github.com/tromp/ChessPositionRanking has resolved these sorts of issues, but I haven't dug into exactly how.
-
Permutation Iteration and Random Access
Multinomial rankings can be combined with a dozen others to rank a subset of all chess positions including all legal ones. This allows one to sample millions of random such positions, determine how many are legal, and thus obtain an accurate estimate of 4.8&10^44 legal chess positions [2].
[1] https://github.com/tromp/ChessPositionRanking/blob/main/src/...
[2] https://github.com/tromp/ChessPositionRanking
-
The number of legal Chess diagrams is less than 4 × 10^37 which is an improvement on the previous upper bound of 2 × 10^40 by Steinerberger.
The key words being "without promotion". Both bounds, this one and Steinerberger's, only consider positions reachable without promotion. Allowing promotions, one estimate suggests that the number is close to 4.82 × 10^44.
-
eli5 With billions and billions of people over time, how can fingerprints be unique to each person. With the small amount of space, wouldn’t they eventually have to repeat the pattern?
source
- Accurately estimating the number of legal chess positions
-
"Chess too simple for my big brain, not like mobile strategy game"
This one as well as Shannon number wiki seem to say that possible sensible moves are about 10^40 while and 10^120 while taking any moves (maybe including some illogical / illegal ones) .
-
How to build a Chess Engine, an interactive guide
Shannon's estimate was based on very primitive methods; by generating random positions and using fairly advanced methods to see whether they are legal or not (ie., can you construct a proof game for it, or prove that it could never happen), you will get much closer. A group of people have been working on this, and their current best estimate is (4.822 +- 0.028) * 10^44, or a bit over 148 bits. (Amazingly enough, Shannon wasn't all that far off on this account! His estimated number of legal games seems much more dodgy, though.)
http://talkchess.com/forum3/viewtopic.php?f=7&t=77685&sid=e3...
Practically speaking, https://github.com/tromp/ChessPositionRanking gives a number between 0 and approx. 8.7 * 10^45 for any legal position, so it's only a couple of bits away from optimality.
-
Ask HN: Teach Me Something New
The number of chess positions has now been estimated with 2 digits of accuracy as ~ 4.8 x 10^44: https://github.com/tromp/ChessPositionRanking
What are some alternatives?
sly - Sylvester the Cat's Common Lisp IDE
kaldi-gstreamer-server - Real-time full-duplex speech recognition server, based on the Kaldi toolkit and the GStreamer framwork.
ultralisp - The software behind a Ultralisp.org Common Lisp repository
hackernews - Hacker News web site source code mirror.
shan - A declarative wrapper around your favourite system-wide package manager
FUZIX - FuzixOS: Because Small Is Beautiful
phel-lang - Phel is a functional programming language that transpiles to PHP. A Lisp dialect inspired by Clojure and Janet.
mtpng - A parallelized PNG encoder in Rust
doc - Flexible documentation generator for Common Lisp projects.
swi-mqtt-pack - MQTT pack for SWI-Prolog
weblocks - This fork was created to experiment with some refactorings. They are collected in branch "reblocks".
Etar Calendar - Android open source calendar