English 中文(简体)
Negamax是否总是应该恢复积极的价值?
原标题:Is Negamax always supposed to return a positive value?
function negamax(node, depth, α, β, color)
    if node is a terminal node or depth = 0
        return color * the heuristic value of node
    else
        foreach child of node
            val := -negamax(child, depth-1, -β, -α, -color)
            {the following if statement constitutes alpha-beta pruning}
            if val≥β
                return val
            if val≥α
                α:=val
        return α

因此,如果以上是我的“最高法典”(由“主人”组成),则其名称如下:

negamax(origin, depth, -inf, +inf, 1)

然后,无论我们称之为这一职能的深度如何,这一职能将永远恢复积极的价值。 假设这种冷漠的价值本身总是是积极的。

最佳回答

是的,如果评价点是正面的,那么肯定的数值将按顶点重新计算。 考虑到彩色价值造成的重复,它确保总是存在反面的否定,以扭转最后的否定,如果存在奇数的宽恕之子的话。 这是因为,有奇数的休养电话,肤色总是等于1。 如果甚至有数目的回馈呼吁,所有取消的反面和彩色都将是1,使回馈价值不受影响。

请注意,如果你重新用彩色打上 ne子=-1(另一方转而移动),你必须取消这一呼吁,以获得正确价值。 也就是说:

-negamax(origin, depth, -inf, +inf, -1)
问题回答

暂无回答




相关问题
Recursive same-table query in SQL Server 2008

I have the following table in a SQL Server 2008 database: Id Name ParentFolder -- ---- ------------ 1 Europe NULL 2 Asia NULL 3 Germany 1 4 UK 1 5 China ...

Finding a class within list

I have a class (Node) which has a property of SubNodes which is a List of the Node class I have a list of Nodes (of which each Node may or may not have a list of SubNodes within itself) I need to be ...

Selecting records during recursive stored procedure

I ve got a content management system that contains a hierarchical structure of categories, with sub-categories subject to different ordering options at each level. Currently, that s retrieved by a (...

热门标签