gpt4 book ai didi

c++ - 二加二扑克手评估器 : How are the cards mapped to the integers?

转载 作者:太空狗 更新时间:2023-10-29 21:02:47 29 4
gpt4 key购买 nike

为了使用 C++ 创建最快的蒙特卡洛德州扑克牌局分析器,我目前正在研究牌局评估这一主题。

正如你们中的许多人所知,市面上有很多手牌评估器,而且是开源的。在考虑了一下之后,我选择了“二加二手评估器”(因为它是在二加二论坛上首次介绍而得名)。

这是已知最快的评估器之一,它使用数组查找来快速找到一手牌的值(value)。

现在,对于该函数,您需要传入一个包含您感兴趣的卡片的数组。示例:

int Cards[] = { 3, 5, 10, 17, 23, 24, 32 };
int hv = HandValue(Cards);

值介于 1 和 52 之间。现在,我的问题是:这些整数对应于哪些牌? 3 是黑桃 A 吗?红心三?我搜索了谷歌、2 + 2 论坛、展示手牌评估器的各种页面、构建数组的源文件。一切都是徒劳。所以我希望这里有人能给我指出正确的方向,让我知道在哪里可以找到这些信息,或者直接给我。

评估者的来源是这篇优秀的文章:http://www.codingthewheel.com/archives/poker-hand-evaluator-roundup#cactus_kev这分别解释了所有评估者。

最佳答案

我没有证实这一点,但它似乎是:

"2c": 1,
"2d": 2,
"2h": 3,
"2s": 4,
"3c": 5,
"3d": 6,
...
"kh": 47,
"ks": 48,
"ac": 49,
"ad": 50,
"ah": 51,
"as": 52

引用:https://github.com/chenosaurus/poker-evaluator/blob/master/lib/PokerEvaluator.js

关于c++ - 二加二扑克手评估器 : How are the cards mapped to the integers?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14842084/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com