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
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 checkers_bot-0.1.1.tar.gz.
File metadata
- Download URL: checkers_bot-0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9308458e39bff16bdaea4005c757d73e01422c98790655dedaef7f49ea762b9f
|
|
| MD5 |
f130a5980594d35c195be84cf9617172
|
|
| BLAKE2b-256 |
dd569f7139c87ca963880b86f47da52c87c3d9c0b4f9c432130d7e39550716ad
|
File details
Details for the file checkers_bot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: checkers_bot-0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a741d2d41b1344c7678d8a69ce5c8e69c3b94645a46a73e9c979a3d4a356e20b
|
|
| MD5 |
8ba697f962e2509c85ecbd7df3d85f7e
|
|
| BLAKE2b-256 |
5f085f41cd409b607664206833b62f2192590c252cc22e18ded50468824ccb7b
|