简体   繁体   English

C#算法博弈论API

[英]C# Algorithmic Game Theory API

I recently came accross Gambit - http://www.gambit-project.org/doc/index.html - a C++ algorithmic game theory API. 我最近来到了Gambit - http://www.gambit-project.org/doc/index.html--一个C ++算法游戏理论API。

Is anyone aware of a .NET Game Theory Library? 有人知道.NET游戏理论库吗?

I know this would take a small bit of time, but you could download the source for the C++ project you cited and compile it into a DLL that you could reference in your C# project. 我知道这需要一点时间,但您可以下载您引用的C ++项目的源代码并将其编译为可在C#项目中引用的DLL。 This link contains information about doing so. 此链接包含有关此操作的信息。

I don't know of any existing library. 我不知道任何现有的图书馆。

The minimax algorithm is pretty easy to implement if you are doing a 2 player game. 如果你正在进行2人游戏,那么minimax算法很容易实现。 The following pseudocode is plagiarised from the wiki page : 以下伪代码是从Wiki页面中抄袭的:

function integer minimax(node, depth)
    if node is a terminal node or depth <= 0:
        return the heuristic value of node
    α = -∞
    for child in node:   # evaluation is identical for both players 
        α = max(α, -minimax(child, depth-1))
    return α

If you are doing more than 2 players, then there is Sturtevant and Korf's MaxN algorithm . 如果你做的超过2个玩家,那么就有Sturtevant和KorfMaxN算法

I've implemented these before, and they are pretty easy. 我之前已经实现了这些,它们非常简单。 It should be very straightforward in .Net. 它应该在.Net中非常简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM