Skip to main content

Omok

Project description

Omok (오목)

Omok은 오목 인공지능 개발을 위한 오픈소스 파이썬 라이브러리입니다.

Install

$ pip install omok

Usage

Play

$ python -m omok

Environment

import omok

env = omok.Omok()
for move in [112, 111, 96, 97, 128, 113, 80, 127, 144]:
    env(move)
env.show_state()

"""
Result
+-------------------------------+
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - O - - - - - - - - - |
| - - - - - - O X - - - - - - - |
| - - - - - - X O X - - - - - - |
| - - - - - - - X O - - - - - - |
| - - - - - - - - - O - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
| - - - - - - - - - - - - - - - |
+-------------------------------+
| Player 2  Winner 1  Moves   9 |
+-------------------------------+
"""

Agent

import omok

agent = omok.OmokAgent(model_index=1)
env = omok.Omok()
while True:
    state = env.get_state()
    player = env.get_player()
    action = agent(state, player)
    result = env(action)
    env.show_state()
    if result:
        break

License

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

omok-0.0.11-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file omok-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: omok-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for omok-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 6636c56fbba2c985eeb1dcfe6385cc5b2787453fafe0c13930b476abd3e43e26
MD5 18fc54997cf052891ace27b065784709
BLAKE2b-256 0d37d002810b013d73c33164129b1e6e08005152a20057392f5d93cdfa7061e3

See more details on using hashes here.

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