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.5

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.5
File Size Uploaded
cli_othello-1.0.5.tar.gz 11.7 kB Details

Built distribution (wheel)

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

Total release size: 23.9 kB

Release files / cli_othello-1.0.5.tar.gz

Download URL cli_othello-1.0.5.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7e5cc469f6517624f4341e69ce4cbac2333a9fce2d915964fbf49c23211c3910
BLAKE2b-256 checksum
How to use checksums
9ce5b404c97e31bbb68151f3e015135309494ac7eb5c87f4b6afe0ea46fa2660
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.5-py3-none-any.whl

Download URL cli_othello-1.0.5-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
389a8e25a0d67fee3fc3203250d2c7f5d947496d13980d3e8a0c345463f81a07
BLAKE2b-256 checksum
How to use checksums
a0084e2b837313794903b629a4a50ce3de4833439fe3c3c6b47172d42a176525
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

This release

1.0.5 This release

2 release files

1.0.4

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