ChessPositionRanking
swi-mqtt-pack
ChessPositionRanking | swi-mqtt-pack | |
---|---|---|
29 | 2 | |
132 | 5 | |
- | - | |
2.5 | 2.2 | |
5 months ago | 11 months ago | |
Haskell | C | |
MIT 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.
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
swi-mqtt-pack
-
Ask HN: What are some interesting examples of Prolog?
Not a lot of code but a somewhat different use of Prolog than you're likely to see elsewhere. I used my fork of a MQTT library for Prolog (https://github.com/sprior/swi-mqtt-pack) to implement the central controller for my home automation system. The system responds to MQTT events and then coordinates the appropriate action by sending MQTT messages to other home services. Recent versions of SWI-Prolog also support redis and I've started using that to store device configuration and state between services. The MQTT version is actually a reimplementation of my previous version which used CORBA for inter-service communication.
I don't distribute the home automation code however it's pretty specific to my house. The MQTT library provides some building block examples.
-
Ask HN: Why are you programming your hobby projects in a niche language?
I forked an abandoned implementation of MQTT for SWI-Prolog by olsky, my fork is at https://github.com/sprior/swi-mqtt-pack
Look in the examples directory for some basic pub/sub code.
The Prolog code that runs in my house is pretty specific to my house so I figured the best way to open source things would be as a framework more than an implementation. You can contact me via issues on the github repo and prod me into adding some more advanced examples - I've learned a lot since my last commit on the repo.
I've started using the Redis functionality recently added to SWI-Prolog, so my code now responds to MQTT messages and uses state queried from Redis to help determine what actions (implemented by sent MQTT messages) to send out. The beauty is that since I don't do anything that blocks significantly in the Prolog code it is now single threaded - even the MQTT listening. It still responds quickly enough and is MUCH easier to deal with than multi-threaded.
An example of what I'm doing is I built a bunch of ESP8266/EESP32 display devices that control neopixels/OLED/LCD displays. When one of those devices boots it sends a MQTT message announcing its location and capabilities (display type, bit depth, dimensions). Prolog receives that message and then stores that info in Redis. So that device info is all dynamic.
So then later Prolog might get a notification that something is in the driveway. All by MQTT it requests an image from the appropriate camera, then sends the image off to Sighthound and deepstack image recognition servers. The Sighthound front end sends a message back to Prolog with a description of any vehicle spotted which Prolog then matches against known vehicles. If it determines for example that a Fedex truck is in the driveway then Prolog sends notifications around the house - it queries all the display devices from Redis and then based on the capabilities of each devices creates a JSON formatted MQTT message to send to each announcing the Fedex truck. It then also sends a MQTT message to some Java code that connects with Google and sends a push message to an Android app I wrote that displays the alert on my phone and watch.
Before I switched to MQTT I was using Prolog with CORBA as the message transport and back then I also had Visual Basic and MS Agent as part of the system. One night I got bored and a little while later had 3 Peedy the Parrot characters singing Row Your Boat in a round across three different computers coordinated by Prolog. It was actually only a page worth of custom Prolog code for that.
What are some alternatives?
kaldi-gstreamer-server - Real-time full-duplex speech recognition server, based on the Kaldi toolkit and the GStreamer framwork.
rhombus-prototype - Brainstorming and draft proposals for Rhombus
hackernews - Hacker News web site source code mirror.
gerbil - Gerbil Scheme
FUZIX - FuzixOS: Because Small Is Beautiful
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
mtpng - A parallelized PNG encoder in Rust
libredwg - Official mirror of libredwg. With CI hooks and nightly releases. PR's ok
Etar Calendar - Android open source calendar
brainfuck-pl - A brainf*ck interpreter in Prolog
syzygy-tables.info - User interface and public API for probing Syzygy endgame tablebases
the-constitution-of-japan