Skip to content

Instantly share code, notes, and snippets.

@tomohxx
tomohxx / kokushi.cpp
Last active March 30, 2023 07:54
国士無双の聴牌確率(巡目別牌種数別)
#include <array>
#include <iomanip>
#include <iostream>
int main()
{
constexpr int T_MAX = 18;
constexpr int T_MIN = 1;
constexpr int S = 123; // 四麻
// constexpr int S = 95; // 三麻
@tomohxx
tomohxx / chitoi.cpp
Created February 15, 2023 14:06
七対子の聴牌確率(巡目別対子数別)
#include <iostream>
#include <iomanip>
#include <iostream>
int main()
{
constexpr int T_MAX = 18;
constexpr int T_MIN = 1;
constexpr int S = 123; // 四麻
// constexpr int S = 95; // 三麻

向聴数・不要牌・有効牌テーブル

概要

向聴数・不要牌・有効牌を同時に計算するツールで使われる数牌用のテーブル(index_dw_s.txt)を, 01-BFSにより高速に作成するためのプログラム. 字牌用のテーブルも同様にして作成できる.

ソースコード

C++20 で記述.

@tomohxx
tomohxx / shanten.md
Last active July 13, 2022 16:14
配牌時向聴数

配牌時向聴数(完全版)

概要

配牌時向聴数を求めるプログラムに01-BFSによる距離テーブルを作成する機能を追加し, 1つのファイルで完結するようにした完全版.

ソースコード

C++17で記述.

@tomohxx
tomohxx / mahjong-rnn.ipynb
Last active January 11, 2021 09:04
牌の危険度推定(多変量RNN)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.