checkers-bot-0.1.4
توضیحات
Checkers bot using min max alghoritm
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | checkers-bot-0.1.4 |
| نام | checkers-bot |
| نسخه کتابخانه | 0.1.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | lesikr |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/ruslan-ilesik/Checkers-bot |
| آدرس اینترنتی | https://pypi.org/project/checkers-bot/ |
| مجوز | MIT |
[GitHub:](https://github.com/ruslan-ilesik/tic-tac-toe-bot-pip-package)
Usage Example
```python
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.
```python
print(game.turn)
```
> white
```python
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]]]
```python
print(game.move(game.posible_moves[0])) #make move returns False, draw, white or black (who wins)
```
> False
```python
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.
```python
print(game.check_winer()) #returns False, draw, white or black (who wins)
```
> False
```python
print(bot.move(game,depth = 3)) #depth - int
```
> False
نحوه نصب
نصب پکیج whl checkers-bot-0.1.4:
pip install checkers-bot-0.1.4.whl
نصب پکیج tar.gz checkers-bot-0.1.4:
pip install checkers-bot-0.1.4.tar.gz