编写国际象棋引擎有哪些好资源?

时间:2021-03-21 03:04:44

I'm interested in writing a chess engine (mostly as a learning exercise) and would be interested in any resources that people know of that could be of interest or use, anything really: Papers, Books, Theory, Tutorials, anything that could be useful.

我有兴趣写一个国际象棋引擎(主要是作为一个学习练习),并且会对人们所知道的任何可能感兴趣或使用的资源感兴趣,任何真正的东西:论文,书籍,理论,教程,任何可能的东西有用。

8 个解决方案

#1


From my archives:

从我的档案:

#2


When creating my chess engine I spent months trying to collect good resources that describe some of the harder aspects of creating a chess game. Here is a list of the ones I found most useful:

在创建我的国际象棋引擎时,我花了几个月时间尝试收集描述创建国际象棋游戏的一些难点的好资源。这是我发现最有用的列表:

Chess Programming by François Dominic Laramée

FrançoisDominicLaramée的国际象棋程序设计

This is the article that got me into computer chess, It is a great overview of how computers play chess. It is extremely easy to read and it will introduce you to all the terms and keywords.

这篇文章让我进入了计算机国际象棋,这是对计算机如何下棋的一个很好的概述。它非常容易阅读,它将向您介绍所有术语和关键字。

http://www.gamedev.net/page/resources/_/technical/artificial-intelligence/chess-programming-part-i-getting-started-r1014

Computer chess wiki, this has really expanded over the last few months. It is an excellent resource for reference material.

计算机象棋维基,这在过去几个月里确实有所扩展。它是参考资料的绝佳资源。

http://chessprogramming.wikispaces.com/

Louis Kessler's Computer Chess Links

路易斯凯斯勒的电脑国际象棋链接

Once you go through the above resources the remainder can be found at the following links page.

完成上述资源后,可以在以下链接页面找到其余部分。

http://www.lkessler.com/cclinks.shtml

Last but not least I write a Computer Chess Blog that takes you through all the steps of writing a chess engine in C# from scratch, it includes a computer chess links section and a chess game starter kit.

最后但并非最不重要的是,我写了一个计算机国际象棋博客,带您完成从头开始在C#中编写国际象棋引擎的所有步骤,它包括计算机国际象棋链接部分和国际象棋游戏入门套件。

http://www.chessbin.com

Adam Berent

#3


Overview of many algorithms useful in chess - http://www.frayn.net/beowulf/theory.html - should be a good starting point to understanding the measure of the problem, and several ways to simplify the computational work.

许多在国际象棋中有用的算法概述 - http://www.frayn.net/beowulf/theory.html--应该是理解问题度量的一个很好的起点,以及简化计算工作的几种方法。

-Adam

#4


You could always take a peek at GNU Chess code.

您可以随时查看GNU Chess代码。

#5


Claude Shannon's 1949 paper (warning: PDF) on the subject is a good starting place

克劳德·香农1949年的论文(警告:PDF)就这个问题是一个很好的起点

#6


The best chess programming tutorial for beginners is at GameDev. It is very easy to understand while it goes very much into details.

适合初学者的最佳国际象棋编程教程是GameDev。它非常容易理解,同时它非常详细。

#7


This is basically in the field of Artificial Intelligence (AI).

这基本上属于人工智能(AI)领域。

The most common way to make a computer "think" in chess game is using the mini-max method where computer "think" by analyzing the results from making different moves ahead of time from the current state.

在国际象棋游戏中使计算机“思考”的最常用方法是使用mini-max方法,其中计算机通过分析从当前状态提前进行不同移动的结果来“思考”。

The "goodness" of results from different moves can be determine from many criteria such as score, number of enemies left, winning state, for example. For instance, if you move the player to the right and you win the game, that's a very good state. But if you move it to the left you get nothing. It is reasonable to move to the right. This function that define "goodness" is usually called Heuristic Function.

不同动作的结果的“好”可以根据许多标准来确定,例如得分,剩下的敌人数量,获胜状态等。例如,如果你将玩家向右移动并赢得游戏,那就是一个非常好的状态。但如果你把它移到左边,你什么也得不到。向右移动是合理的。定义“良好”的这个函数通常称为启发式函数。

This process is done recursively for many turns. The greater the number of turns, the more time you will need. And the greater the number of turns, the more intelligent your software is. Thinking ahead in only one turn may only result in greedy selection. Intelligent chess software has great heuristic function and think ahead in many turns.

该过程以递归方式完成多次转弯。转弯次数越多,您需要的时间就越多。转弯次数越多,您的软件就越智能。只在一个回合中提前思考可能只会导致贪婪的选择。智能象棋软件具有很强的启发功能,可以多次思考。

ps. There are some details of mini-max algorithm I didn't explain here but this should cover the basic idea.

PS。我在这里没有解释mini-max算法的一些细节,但这应该涵盖基本思想。

#8


I have joined the same league of Paul Wicks(above), I too want to write a chess engine for my own learning sake's, only constraint is my day job(which is to work on boring web services and stuff..) but its worth the pain.

我加入了Paul Wicks的同一联盟(上图),我也想为自己的学习着想写一个国际象棋引擎,唯一的约束是我的日常工作(这是为了解决无聊的网络服务和东西..)但它的价值疼痛。

I decided to build it using layer-by-layer approach. I'm almost through with the multi-player part i.e. (HUMAN vs HUMAN).

我决定使用逐层方法构建它。我几乎完成了多人游戏部分,即(人与人)。

Once I'm done with this, I would love to incorporate the AI layer to support (COMPUTER vs HUMAN) playing scheme.This is the part that I'm most worried about, I have found very nice help tips here in this thread, a big thanks to all of you.

一旦我完成了这个,我很乐意将AI层加入到支持(COMPUTER vs HUMAN)的游戏方案中。这是我最担心的部分,我在这个帖子中找到了非常好的帮助提示,非常感谢你们所有人。

Currently the language that I'm well versed with is Java, in case there's a performance hit then I might port it to C++.

目前我熟悉的语言是Java,如果性能受到影响,我可能会把它移植到C ++。

#1


From my archives:

从我的档案:

#2


When creating my chess engine I spent months trying to collect good resources that describe some of the harder aspects of creating a chess game. Here is a list of the ones I found most useful:

在创建我的国际象棋引擎时,我花了几个月时间尝试收集描述创建国际象棋游戏的一些难点的好资源。这是我发现最有用的列表:

Chess Programming by François Dominic Laramée

FrançoisDominicLaramée的国际象棋程序设计

This is the article that got me into computer chess, It is a great overview of how computers play chess. It is extremely easy to read and it will introduce you to all the terms and keywords.

这篇文章让我进入了计算机国际象棋,这是对计算机如何下棋的一个很好的概述。它非常容易阅读,它将向您介绍所有术语和关键字。

http://www.gamedev.net/page/resources/_/technical/artificial-intelligence/chess-programming-part-i-getting-started-r1014

Computer chess wiki, this has really expanded over the last few months. It is an excellent resource for reference material.

计算机象棋维基,这在过去几个月里确实有所扩展。它是参考资料的绝佳资源。

http://chessprogramming.wikispaces.com/

Louis Kessler's Computer Chess Links

路易斯凯斯勒的电脑国际象棋链接

Once you go through the above resources the remainder can be found at the following links page.

完成上述资源后,可以在以下链接页面找到其余部分。

http://www.lkessler.com/cclinks.shtml

Last but not least I write a Computer Chess Blog that takes you through all the steps of writing a chess engine in C# from scratch, it includes a computer chess links section and a chess game starter kit.

最后但并非最不重要的是,我写了一个计算机国际象棋博客,带您完成从头开始在C#中编写国际象棋引擎的所有步骤,它包括计算机国际象棋链接部分和国际象棋游戏入门套件。

http://www.chessbin.com

Adam Berent

#3


Overview of many algorithms useful in chess - http://www.frayn.net/beowulf/theory.html - should be a good starting point to understanding the measure of the problem, and several ways to simplify the computational work.

许多在国际象棋中有用的算法概述 - http://www.frayn.net/beowulf/theory.html--应该是理解问题度量的一个很好的起点,以及简化计算工作的几种方法。

-Adam

#4


You could always take a peek at GNU Chess code.

您可以随时查看GNU Chess代码。

#5


Claude Shannon's 1949 paper (warning: PDF) on the subject is a good starting place

克劳德·香农1949年的论文(警告:PDF)就这个问题是一个很好的起点

#6


The best chess programming tutorial for beginners is at GameDev. It is very easy to understand while it goes very much into details.

适合初学者的最佳国际象棋编程教程是GameDev。它非常容易理解,同时它非常详细。

#7


This is basically in the field of Artificial Intelligence (AI).

这基本上属于人工智能(AI)领域。

The most common way to make a computer "think" in chess game is using the mini-max method where computer "think" by analyzing the results from making different moves ahead of time from the current state.

在国际象棋游戏中使计算机“思考”的最常用方法是使用mini-max方法,其中计算机通过分析从当前状态提前进行不同移动的结果来“思考”。

The "goodness" of results from different moves can be determine from many criteria such as score, number of enemies left, winning state, for example. For instance, if you move the player to the right and you win the game, that's a very good state. But if you move it to the left you get nothing. It is reasonable to move to the right. This function that define "goodness" is usually called Heuristic Function.

不同动作的结果的“好”可以根据许多标准来确定,例如得分,剩下的敌人数量,获胜状态等。例如,如果你将玩家向右移动并赢得游戏,那就是一个非常好的状态。但如果你把它移到左边,你什么也得不到。向右移动是合理的。定义“良好”的这个函数通常称为启发式函数。

This process is done recursively for many turns. The greater the number of turns, the more time you will need. And the greater the number of turns, the more intelligent your software is. Thinking ahead in only one turn may only result in greedy selection. Intelligent chess software has great heuristic function and think ahead in many turns.

该过程以递归方式完成多次转弯。转弯次数越多,您需要的时间就越多。转弯次数越多,您的软件就越智能。只在一个回合中提前思考可能只会导致贪婪的选择。智能象棋软件具有很强的启发功能,可以多次思考。

ps. There are some details of mini-max algorithm I didn't explain here but this should cover the basic idea.

PS。我在这里没有解释mini-max算法的一些细节,但这应该涵盖基本思想。

#8


I have joined the same league of Paul Wicks(above), I too want to write a chess engine for my own learning sake's, only constraint is my day job(which is to work on boring web services and stuff..) but its worth the pain.

我加入了Paul Wicks的同一联盟(上图),我也想为自己的学习着想写一个国际象棋引擎,唯一的约束是我的日常工作(这是为了解决无聊的网络服务和东西..)但它的价值疼痛。

I decided to build it using layer-by-layer approach. I'm almost through with the multi-player part i.e. (HUMAN vs HUMAN).

我决定使用逐层方法构建它。我几乎完成了多人游戏部分,即(人与人)。

Once I'm done with this, I would love to incorporate the AI layer to support (COMPUTER vs HUMAN) playing scheme.This is the part that I'm most worried about, I have found very nice help tips here in this thread, a big thanks to all of you.

一旦我完成了这个,我很乐意将AI层加入到支持(COMPUTER vs HUMAN)的游戏方案中。这是我最担心的部分,我在这个帖子中找到了非常好的帮助提示,非常感谢你们所有人。

Currently the language that I'm well versed with is Java, in case there's a performance hit then I might port it to C++.

目前我熟悉的语言是Java,如果性能受到影响,我可能会把它移植到C ++。