Skip to main content

cli-othello

ターミナルでオセロ(リバーシ)を楽しめるCLIパッケージです。 5段階の強さから選べるAIと対局できます。

インストール

npm(推奨)

npm i -g @lapius/cli-othello

othello コマンドが入ります(Node.js 18 以上と Python 3.9 以上が必要)。

pip

pip install cli-othello

Windows では curses を使うために windows-curses が必要です。pip で入れた場合は自動で入ります。npm で入れた場合は py -m pip install windows-curses で入れてください。

使い方

othello

起動すると対局前にAIの強さ(Lv.1〜Lv.5)を選ぶ画面が表示されます。 強さを指定して直接対局を始めることもできます。

othello --level 3

操作方法

キー 動作
↑ / ↓ / ← / → (または h/j/k/l) カーソル移動
Enter / Space カーソル位置に着手
q 終了

盤面では、自分が置ける場所が緑色の · でハイライトされます。

AIの強さ

レベル 特徴
Lv.1 入門 ランダム性が高く、ほぼ気の向くままに着手
Lv.2 初級 浅い探索+盤面の位置評価を考慮
Lv.3 中級 角・辺の重要度や着手可能数(機動力)も評価
Lv.4 上級 より深く先読みしつつ盤面を評価
Lv.5 最強 深い探索(最大6手先)で最も精度高く着手を選択

内部的にはミニマックス法とアルファベータ枝刈りを用い、レベルごとに探索の深さと評価関数の精度を変化させています。

必要環境

  • Python 3.9以上(npm で入れる場合は Node.js 18 以上も)
  • 端末は 57列 x 36行 以上

ライセンス

MIT

Metadata

Release files for cli-othello 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cli-othello 1.0.4
File Size Uploaded
cli_othello-1.0.4.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cli-othello 1.0.4
File Interpreter ABI Platform
cli_othello-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / cli_othello-1.0.4.tar.gz

Download URL cli_othello-1.0.4.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
04b5af561eafe03592be7fec8ff7935b444ad166812f7a1045cafdcd74b6e1a3
BLAKE2b-256 checksum
How to use checksums
85c3a6dc0a8954396a56f0197749a42743f493c209a17a325efddcf78ef68cf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / cli_othello-1.0.4-py3-none-any.whl

Download URL cli_othello-1.0.4-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26a04a5c2c252170e445d6ddb501f803b1b37cf1a214bc377f860f6e2a0697a5
BLAKE2b-256 checksum
How to use checksums
0475068d1f34796f091d28fa2c1b883c7d5d496df167fb503d2c905f322da98f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.5

2 release files

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page