An example of a complete project written in Objective-C, Java, C/C++ or Python is found at SpecialKEval. Further links and reading can be found therein.
Monte carlo simulation is a common approach to get the odds calculation for poker hands. There are plenty of examples of implementing this kind of simulation for holdem on the net.
如果您有相当强的 C 能力,请查看 pokersource。 恐怕这并不简单,但您正在寻找的某些东西很复杂。 如果您能够获得正确的输入格式(也不容易),使用该库的 poker-eval 程序可能会完成您想要的大部分操作。 这个 或 this 也使用这个库 AFAIK。
不过,情况可能更糟,您可能想要计算一些棘手的事情,比如奥马哈高低……
Take a look at pokersource if you have reasonably strong C abilities. It's not simple, I'm afraid, but some of the things you're looking for are complex. The poker-eval program that uses the library will probably do much of what you want if you can get the input format correct (not easy either). Sites such as this one or this also use this library AFAIK.
Still, it could be worse, you could be wanting to calculate something tricky like Omaha Hi-lo...
Pokersource and the statistical articles are not bad suggestions. But this is really best done with a Monte Carlo simulation, a useful, simple, and powerful approach to this type of difficult problem.
It works equally well with Omaha Hi-lo as it does with Hold'em
We may also be able use combinatorics, calculating the odds with combinations and the number of ways each combination can appear. This way we don't have to iterate over all the possible hands.
发布评论
评论(7)
以下是一些文章链接,可以作为起点:C# 中的扑克逻辑 和 快速德州扑克手牌评估和分析
“此代码片段将让您使用 C# 和 .NET 以困难的方式计算扑克概率。”
理论基础知识在此 关于扑克概率的维基百科文章以及这篇优秀的统计教程。
使用 Objective-C、Java、C/C++ 或 Python 编写的完整项目示例可在 SpecialKEval< 中找到。 /a>. 可以在其中找到更多链接和阅读。
Here are some links to articles, which could help as starting points: Poker Logic in C# and Fast, Texas Holdem Hand Evaluation and Analysis
"This code snippet will let you calculate poker probabilities the hard way, using C# and .NET."
The theoretical fundamentals are given in this Wikipedia article about Poker Probabilities and in this excellent statistical tutorial.
An example of a complete project written in Objective-C, Java, C/C++ or Python is found at SpecialKEval. Further links and reading can be found therein.
蒙特卡罗模拟是计算扑克牌赔率的常用方法。 网上有很多实现这种德州扑克模拟的例子。
http://www.codeproject.com/KB/game/MoreTexasHoldemAnalysis1.aspx
Monte carlo simulation is a common approach to get the odds calculation for poker hands. There are plenty of examples of implementing this kind of simulation for holdem on the net.
http://www.codeproject.com/KB/game/MoreTexasHoldemAnalysis1.aspx
如果您有相当强的 C 能力,请查看 pokersource。 恐怕这并不简单,但您正在寻找的某些东西很复杂。 如果您能够获得正确的输入格式(也不容易),使用该库的 poker-eval 程序可能会完成您想要的大部分操作。 这个 或 this 也使用这个库 AFAIK。
不过,情况可能更糟,您可能想要计算一些棘手的事情,比如奥马哈高低……
Take a look at pokersource if you have reasonably strong C abilities. It's not simple, I'm afraid, but some of the things you're looking for are complex. The poker-eval program that uses the library will probably do much of what you want if you can get the input format correct (not easy either). Sites such as this one or this also use this library AFAIK.
Still, it could be worse, you could be wanting to calculate something tricky like Omaha Hi-lo...
Pokersource 和统计文章都是不错的建议。 但这实际上最好通过蒙特卡罗模拟来完成,这是解决此类难题的一种有用、简单且强大的方法。
它与 Omaha Hi-lo 和 Hold'em 一样有效
Pokersource and the statistical articles are not bad suggestions. But this is really best done with a Monte Carlo simulation, a useful, simple, and powerful approach to this type of difficult problem.
It works equally well with Omaha Hi-lo as it does with Hold'em
德州扑克游戏评估器的完整源代码可以在这里找到:
http://www.advancedmcode.org/poker-predictor.html Advancedmcode.org/poker-predictor.html
它是为 matlab 构建的,GUI id m 编码,但计算引擎是 c++。
它允许进行赔率和概率计算。 在我的 2.4Ghz 笔记本电脑上,它可以在 0.3 秒内完成 100000 名 10 名玩家的游戏计算。
准确的实时计算机:-)
Complete source code for Texas hold'em poker game evaluator can be found here:
http://www.advancedmcode.org/poker-predictor.html
It is built for matlab, the GUI id m-coded but the computational engine is c++.
It allows for odds and probability calculation. It can deal, on my 2.4Ghz laptop, with a 100000 10 players game computation in 0,3 seconds.
An accurate real time computer:-)
也看看这里:
http:// /specialk-coding.blogspot.com/2010/04/texas-holdem-7-card-evaluator_23.html
蒙特卡罗模拟通常比好的精确评估器慢。
Have a look here as well:
http://specialk-coding.blogspot.com/2010/04/texas-holdem-7-card-evaluator_23.html
Monte Carlo simulation is often slower than the good exact evaluators.
我们还可以使用组合学,计算组合的几率以及每种组合出现的方式数量。 这样我们就不必迭代所有可能的牌。
We may also be able use combinatorics, calculating the odds with combinations and the number of ways each combination can appear. This way we don't have to iterate over all the possible hands.