Skip to main content

Checkers bot using min max alghoritm

Project description

GitHub: Usage Example

from checkers import Field,Bot
game = Field(turn = 'white') #could be white and black
bot = Bot() #init bot
print(game)

.b.b.b.b b.b.b.b. .b.b.b.b ........ ........ w.w.w.w. .w.w.w.w w.w.w.w.

print(game.turn)

white

print(game.posible_moves)

[[[5, 0], [4, 1]], [[5, 2], [4, 1]], [[5, 2], [4, 3]], [[5, 4], [4, 3]], [[5, 4], [4, 5]], [[5, 6], [4, 5]], [[5, 6], [4, 7]]]

print(game.move(game.posible_moves[0])) #make move returns False, draw, white or black  (who wins)

False

print(game)

.b.b.b.b b.b.b.b. .b.b.b.b ........ .w...... ..w.w.w. .w.w.w.w w.w.w.w.

print(game.check_winer()) #returns False, draw, white or black  (who wins)

False

print(bot.move(game,depth = 3)) #depth - int

False

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

checkers_bot-0.1.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

checkers_bot-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file checkers_bot-0.1.2.tar.gz.

File metadata

  • Download URL: checkers_bot-0.1.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5

File hashes

Hashes for checkers_bot-0.1.2.tar.gz
Algorithm Hash digest
SHA256 79073731e65e9d6f760a2947cb664d9afd364d1ec9db1e9ec528e97e051bb14b
MD5 e159c9c800755daec4805dcdcaaef226
BLAKE2b-256 9fba7189045894b492236c6090043554d7b56d9a0068b32bac95f85f168a85ef

See more details on using hashes here.

File details

Details for the file checkers_bot-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: checkers_bot-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5

File hashes

Hashes for checkers_bot-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a11faae3f59faa1bb243b53d17fa5f9343ffb6482470043ac7c72abbbce9f53
MD5 8a69613b8ee7c598676e15c85b7d589d
BLAKE2b-256 aaa090001cc3834c292cae1b466a6ca9c0055ca4df42dcac682d0540f8d6521c

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