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.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-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: checkers_bot-0.1.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.tar.gz
Algorithm Hash digest
SHA256 d7bc1d97d776544fed2d2d897ce816c586ddd45fb88ce0c9ffa3693a86c2f714
MD5 f402fd081804694633e698c784dbe38c
BLAKE2b-256 97053da532a5b0cb39ac0476335fbcee4a8f2923cb35d6fce4f4e460115b6d0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: checkers_bot-0.1-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-py3-none-any.whl
Algorithm Hash digest
SHA256 896ac2e99b7bba0680a0247863f4878b8476fc6349126f6ec1e47a5f2080bcc0
MD5 dee12ba93f2ef8568617746ff1b42c18
BLAKE2b-256 4a34dce86c0bd17e489be620bcc447319cec1a8f55f2db839de2a8f385deceed

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