TTitcombe / AlphaDraughts

A PyTorch implementation of AlphaGo Zero applied to Draughts
MIT License
3 stars 2 forks source link

Fix takes not in valid moves #26

Closed TTitcombe closed 5 years ago

TTitcombe commented 5 years ago

This PR: Fixes bugs where taking moves were not included in valid moves. It also adds stalemates.

To test: Run a random bot against a random bot:

from alphadraughts import Game, RandomBot
game = Game(white=RandomBot(), black=RandomBot())
game.play()

One of the sides should win, as the random bot can now select taking moves which appear in valid moves

Fixes #23 Fixes #24