Chess is a game of perfect information - by looking at the board it's possible to know exactly what an opponent is capable of. Minimax is a search algorithm that finds the next optimal move by minimizing the potential loss in a worst case scenario. I refactored the code from Go to Python to be able to prototype different rules faster.Īfter piece-square tables, one might look at pawn structure, mobility, center control, connectivity, trapped pieces, king safety, space, tempo, and other patterns (this list is taken from the Chess Programming Wiki's Evaluation page). Evaluation rules are easy to add and take away. The evaluation of a chess board is one of the things that's kept me interested in chess engines. He defines the end game as being either if:Įvery side which has a queen has additionally no other pieces or one minorpiece maximum. Here, the Python package python-chess is used for board representation and legal move generation.įor the king, Michniewski provides two tables - one for the middle game and one for the end game. Given unlimited resources, it actually doesn't take many lines of code to calculate every legal variation of chess. There are more possible chess games than the number of atoms in the universe. In Rage Against the Machines, Nate Silver quotes Diego Rasskin-Gutman, who said: After the third full turn, there are over 119 million.Ĭlaude Shannon calculated that there are around 10^120 possible games of chess in his seminal paper Programming a Computer for Playing Chess in 1950. After the first full turn, there are 400 variations possible. When a chess game starts, white can open in twenty different ways and black can respond in twenty different ways also. The first speed bump in its development was grasping the computational complexity of chess - how fast, and wide, the search tree grows. It has a slim UCI interface which means it can be hooked up to via lichess-bot - a bridge between the lichess API and chess bots. It can play a game of chess and solve simple chess puzzles like mate-in-two or mate-in-three. After skimming some introductory texts, I was convinced that building a simple chess engine - one that would put up a fair fight against a casual player - would take no more than a few days.īut I made it there in the end and created a toy chess engine ( healeycodes/andoma) that I am proud of. Taken together, our results suggest that there is substantial promise in designing artificial intelligence systems with human collaboration in mind by first accurately modeling granular human decision-making.I have been learning chess (again) and how to program a chess engine (for the first time) over the last month. For a dual task of predicting whether a human will make a large mistake on the next move, we develop a deep neural network that significantly outperforms competitive baselines. We develop and introduce Maia, a customized version of Alpha-Zero trained on human chess games, that predicts human moves at a much higher accuracy than existing engines, and can achieve maximum accuracy when predicting decisions made by players at a specific skill level in a tuneable way. Applying existing chess engines to this data, including an open-source implementation of AlphaZero, we find that they do not predict human moves well. The hundreds of millions of games played online by players at every skill level form a rich source of data in which these decisions, and their exact context, are recorded in minute detail. The aggregate performance of a chess player unfolds as they make decisions over the course of a game. We pursue this goal in a model system with a long history in artificial intelligence: chess. A crucial step in bridging this gap between human and artificial intelligence is modeling the granular actions that constitute human behavior, rather than simply matching aggregate human performance. However, the ways in which AI systems approach problems are often different from the ways people do, and thus may be uninterpretable and hard to learn from. The code for training Maia can be found on our Github Repo.Īs artificial intelligence becomes increasingly intelligent-in some cases, achieving superhuman performance-there is growing potential for humans to learn from and collaborate with algorithms. If you want to see some more examples of Maia's predictions we have a tool here to see where the different models disagree. If you want to be the first to know, you can sign up for our email list here. We are going to be releasing beta versions of learning tools, teaching aids, and experiments based on Maia (analyses of your games, personalized puzzles, Turing tests, etc.). You can read a blog post about Maia from the Computational Social Science Lab or Microsoft Research. Read the full research paper on Maia, which was published in the 2020 ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD 2020).
0 Comments
Leave a Reply. |