npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

taik

v0.1.0

Published

Taik is a simple AI for the board game [Tak](https://en.wikipedia.org/wiki/Tak_(game)). The project can be used as an analysis tool, or connect as a bot to the playtak.com server.

Downloads

1

Readme

Taik

Taik is a simple AI for the board game Tak. The project can be used as an analysis tool, or connect as a bot to the playtak.com server.

The core engine is built using Monte Carlo Tree Search, but without full simulation rollouts. This is similar to the implementation in AlphaZero or Leela Zero.

It prunes the search tree very aggressively while searching, and will quickly reach depths of 10+ moves in the longest lines. On the other hand, it may also miss 2-move winning sequences, even with significant thinking time.

Overview

The project consists of 5 different binaries, that use the core engine in various ways:

  • main Various commands, mostly for debugging and experimentation.
  • playtak Connect to the playtak.com server, and seek games as a bot.
  • tei Run the engine through Tak Engine Interface, a uci-like text interface.
  • tune Automatically tune the engine's parameters.
  • bootstrap Engine worker for running on AWS Lambda.

The first 3 binaries will be built by default, while tune and bootstrap require specific commands, see their sections.

Usage

main

Three experimental commands entered through stdin:

  • play: Play against the engine through the command line.
  • aimatch: Watch the engine play against a very simple minmax implementation.
  • analyze: Analyze a given position, provided from a simple move list.

playtak

Connect to the playtak.com server, and seek games as a bot. If no username/password is provided, the bot will login as guest.

Example usage:

playtak -u <username> -p <password>

tei

Run the engine through Tak Engine Interface, a uci-like text interface.

Only a small subset of uci works. To analyze a position for 1 second, run the tei binary and enter:

position startpos moves e1 a1
go movetime 1000

tune

To build and run this binary:

cargo build --release --features "constant-tuning" --bin tune
cargo run --release --features "constant-tuning" --bin tune

Automatically tune the engine's parameters through several subcommands.

The engine's static evaluation (value parameters) and move evaluation (policy parameters) are tuned from a .ptn file, using gradient descent. The search exploration parameters are tuned using SPSA.

This is otherwise not well documented, try tune --help for more.

bootstrap

To build this binary:

cargo build --release --target x86_64-unknown-linux-musl --bin bootstrap --features aws-lambda

This is otherwise undocumented.

Build

Building the project from source requires the Rust compiler and Cargo (Rust's package manager) installed, both included in the Rust downloads.

To build and run:

cargo build --release
cargo run --release

This command will automatically fetch and build dependencies. The resulting binaries are written to taik/target/release.

To build and run a specific command, run cargo run --release --bin playtak or similar.

Tests

Use cargo test to run tests, cargo test --release to run without debugging checks (recommended).

License

This project is licensed under the GPLv3 (or any later version at your option). See the LICENSE file for the full license text.

[reference]: https://en.wikipedia.org/wiki/Universal_Chess_Interface)[uci] -like