marcusbuffett / command-line-chess

A python program to play chess against an AI in the terminal.
MIT License
500 stars 162 forks source link

Faster AI possible? #32

Open ClasherKasten opened 2 years ago

ClasherKasten commented 2 years ago

For the information how the AI works right now, please look at this article.

It would be kinda interesting to research if there are other (faster, more efficient) ways. And if there are such ways, then we could implement them.

For question or answers to this task, just leave a comment or create a new issue. If there are any other questions or so, please open an issue.

marcusbuffett commented 2 years ago

I think there could be significant gains by changing how the chessboard is stored. I remember trying to improve the performance of this, and most of the time is spent on making and undoing moves as you go through the tree. I think performant implementations of this use bitboards ( https://www.chessprogramming.org/Bitboards ). Maybe something to look into.

marcusbuffett commented 2 years ago

Oh also definitely some sort of pruning, maybe alpha-beta: https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning . Right now there's no pruning at all, which breaks down hard past 3 or 4 moves deep.

ClasherKasten commented 2 years ago

@marcusbuffett Cool that you already have done so much research about this. These are definitely some really valuable informations.