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.4.tar.gz
(5.2 kB
view details)
File details
Details for the file checkers_bot-0.1.4.tar.gz.
File metadata
- Download URL: checkers_bot-0.1.4.tar.gz
- Upload date:
- Size: 5.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c4093afa163a5bb94ee8fe0c807627705663ee186690d764b2868fd2a091f35
|
|
| MD5 |
a9ba2f5d4ff76342aa38f900ed47eea3
|
|
| BLAKE2b-256 |
28024c747569346a437214139f2066f6803864ec930cf9063047d33facfd8f33
|