需要在棋局评估函数帮助 [英] Need help on chess game evaluation function

查看:179
本文介绍了需要在棋局评估函数帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一盘棋,并在那一刻,我想实现一个极大极小算法。我没有这样做过,还小我知道如何以编程方式重新present并实施以下评价函数的特性(材料,流动性,一块方桌,中心控制,被困一块,王安全,节奏和典当结构)是不太清楚,我(我会很感激,如果有人能向我解释详细)。我已经能够赋值给每一个棋子,棋子的行动值和一张方桌,每件。在时此刻的问题是如何产生件攻击和防守将被添加或从得分减去值。这里的想法是,我要奖励AI剂保护其作品和惩罚它具有攻击碎片。感谢进步。

I am developing a chess game and at the moment I'm trying to implement a minimax algorithm. I haven't done this before, also the little i known about how to programmatically represent and implement the following evaluation function features(material, mobility, piece square table, centre control, trapped piece, king safety, tempo and pawn structure) is not quite clear to me (I will be grateful if someone can explain to me in detail). I have been able to assign values to each chess pieces, piece action values and a square table for each piece. The problem am having at the moment is how to generate Piece attacked and defended values which will be added or subtracted from the score. The idea here is that i want to reward the AI agent for protecting its pieces and penalize it for having the pieces attacked. thanks in advances.

推荐答案

每个评价的功能,你提到会占用计算时间。正如你可能已经知道,玩国际象棋引擎的力量来自两个方面:

Each of the evaluation features you mentioned will take up compute time. As you may already be aware, playing strength of a chess engine comes from two sources:

  • 搜索
  • 评估

和双方争夺同一个宝贵的资源,计算时间。 评估的往往是试探为主,所以有点模糊,而搜索的趋向产生更具体,更相关的结果。如果你开始建立一个引擎,那么我会建议重点搜索,同时保持评价的基本(但不是弱者!)。你将能够确切位置出事了告诉,从而避免可能的早期失望的方式。此外,流行的引擎,如鳕鱼干也开始了,首先建立一个强大的搜索算法。

And both contend for the same valuable resource, compute time. Evaluation tends to be heuristics based and hence a bit fuzzy, whereas search tends to yield more concrete and relevant results. If you are starting to build an engine then I would recommend focusing on search while keeping evaluation basic (but not weak!). That way you will be able to tell exactly where something went wrong and hence avoid possible early disappointments. Moreover, popular engines like Stockfish also started out by first building a strong search algorithm.

如果你已经足够的耐心读到此,请允许我向您指出了两个有用的资源评价:

If you've been patient enough to read this far, let me point you to two useful resources for evaluation:

  1. 国际象棋编程wiki的评价页面:这个网站可能是为国际象棋引擎的开发一般最好的在线资源
  2. 链接到一个基本的,但也不弱评价函数:这是C#code。不幸的是我无法找到我根据这个评估的原创文章。
  1. Chess Programming Wiki's evaluation page: This website is probably the best online resource for chess engine development in general.
  2. Link to a basic but not weak evaluation function: This is C# code. Unfortunately I can't find the original article that I based this evaluation on.

希望它可以帮助:)

这篇关于需要在棋局评估函数帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆