C#算法博弈论API

Jos*_*ben 15 c# game-theory

我最近来到了Gambit - http://www.gambit-project.org/doc/index.html--一个C++算法游戏理论API.

有人知道.NET游戏理论库吗?

she*_*tie 0

我不知道有任何现有的图书馆。

\n\n

如果您正在玩 2 人游戏,则极小极大算法非常容易实现。以下伪代码是从wiki 页面抄袭的:

\n\n
function integer minimax(node, depth)\n    if node is a terminal node or depth <= 0:\n        return the heuristic value of node\n    \xce\xb1 = -\xe2\x88\x9e\n    for child in node:   # evaluation is identical for both players \n        \xce\xb1 = max(\xce\xb1, -minimax(child, depth-1))\n    return \xce\xb1\n
Run Code Online (Sandbox Code Playgroud)\n\n

如果你做的玩家超过2人,那么就有Sturtevant和Korf的MaxN算法

\n\n

我之前已经实现过这些,而且它们非常简单。在.Net 中它应该非常简单。

\n