C# Algorithmic Game Theory API
I recently came accross Gambit - http://www.gambit-project.org/doc/index.html 开发者_Go百科- a C++ algorithmic game theory API.
Is anyone aware of a .NET Game Theory Library?
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. 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. The following pseudocode is plagiarised from the wiki page:
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.
I've implemented these before, and they are pretty easy. It should be very straightforward in .Net.
精彩评论