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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cli_othello-1.0.2.tar.gz.
File metadata
- Download URL: cli_othello-1.0.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a15495aa78c3b993adde6fd582c3a3d6bf91e3a73c781a8f8fb5b2c32b91456
|
|
| MD5 |
d731b285ab577a54ce8f11a1b29f899e
|
|
| BLAKE2b-256 |
09417a7b6902ca37fcd3ea1f299536a35821be07738cf14db8971dc25a9c1b36
|
Provenance
The following attestation bundles were made for cli_othello-1.0.2.tar.gz:
Publisher:
publish.yml on Lapius7/cli-othello
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cli_othello-1.0.2.tar.gz -
Subject digest:
5a15495aa78c3b993adde6fd582c3a3d6bf91e3a73c781a8f8fb5b2c32b91456 - Sigstore transparency entry: 1852655924
- Sigstore integration time:
-
Permalink:
Lapius7/cli-othello@0e59e954cc335bb425b92915fcf4b8b2307a7440 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/Lapius7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0e59e954cc335bb425b92915fcf4b8b2307a7440 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cli_othello-1.0.2-py3-none-any.whl.
File metadata
- Download URL: cli_othello-1.0.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f330ceeff599cb0d25f46cad06fd0c6f4fcadcc24b6c888f6c20ef512bc43db6
|
|
| MD5 |
703a346507dfa26633b068b2d78be8ec
|
|
| BLAKE2b-256 |
e2994666222d9cb216250bdd629d52171369b4d9e7384cef3e5a8c3595a5bcff
|
Provenance
The following attestation bundles were made for cli_othello-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on Lapius7/cli-othello
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cli_othello-1.0.2-py3-none-any.whl -
Subject digest:
f330ceeff599cb0d25f46cad06fd0c6f4fcadcc24b6c888f6c20ef512bc43db6 - Sigstore transparency entry: 1852656243
- Sigstore integration time:
-
Permalink:
Lapius7/cli-othello@0e59e954cc335bb425b92915fcf4b8b2307a7440 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/Lapius7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0e59e954cc335bb425b92915fcf4b8b2307a7440 -
Trigger Event:
push
-
Statement type: