Skip to main content

cli-othello

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

インストール

pnpm(推奨)

このパッケージは pnpm 前提です。npm と pnpm の両方に入れると同じコマンドが二重になるため、pnpm add -g だけを使ってください。

pnpm add -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.8

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

Built distribution (wheel)

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

Total release size: 23.7 kB

Release files / cli_othello-1.0.8.tar.gz

Download URL cli_othello-1.0.8.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
553c4d095f37bf667905b2d8c6dfe446ed6a23f56f4855f317270e0a7d85fd45
BLAKE2b-256 checksum
How to use checksums
db8984509169dac4282679b9305b50ed4c01b486874c3a49a817f030994bb1f9
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 Oct 10, 2026.

Transparency log

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

Download URL cli_othello-1.0.8-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0eb8072ca75760764ded6054159c105ad996c29abb46aaa0611dd8e5fe2556fc
BLAKE2b-256 checksum
How to use checksums
e83422df153ab943b433d48493d05c25d66d6806ebb781bdb9c83dbf0f006ccd
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 Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.7

2 release files

1.0.5

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