Skip to main content

Play Othello (Reversi) in your terminal against a 5-level AI

Project description

cli-othello

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

インストール

pip install cli-othello

使い方

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以上
  • Windowsの場合は windows-curses が自動的に依存関係としてインストールされます

ライセンス

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli_othello-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cli_othello-0.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file cli_othello-0.1.0.tar.gz.

File metadata

  • Download URL: cli_othello-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cli_othello-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cfc8dd39389bb8038d918f9357dc4e96db1ed93cb0b55595675a10061385d6aa
MD5 7526545586613806bd8f077b42b525eb
BLAKE2b-256 fa9c492869dbfa002bb564e1a58854305169f325b7458572d235ab94a4f7651c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cli_othello-0.1.0.tar.gz:

Publisher: publish.yml on Lapius7/cli-othello

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cli_othello-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cli_othello-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cli_othello-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcc09d3caea487aa327aeffb4d1898bcac221259251195b183c59b82071b82ba
MD5 77f2e25af3665ee85e2aaba1f5224015
BLAKE2b-256 8b825f61e8d03bf1493b510354ab3a50e73353b2f2a2b3ffcc04655465fdbc46

See more details on using hashes here.

Provenance

The following attestation bundles were made for cli_othello-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Lapius7/cli-othello

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page