Fetch the repository succeeded.
This action will force synchronization from Gitee 极速下载/qipai, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
棋牌的胡牌算法,特殊牌型判断算法
腾讯课堂视频讲解:https://ke.qq.com/course/360581?tuin=104cb0e2
1、跑胡子算法
实现:
有C++版(基于递归,回溯)。
lua版(基于查表)。
2、高效的麻将胡牌算法,能处理任意张赖子:
速度:1S左右处理100万次每次四个赖子的麻将判胡;5秒处理1亿次八个赖子判胡(golang虚拟机上实测)。
实现:
基于花色切分,然后查表。
有多种语言版本:lua、c++、c#、golang、js、java、python。
3、无敌的拆牌判胡算法,不占用额外内存,速度、简洁度超过查表法。支持任意赖子数量。
4、特殊牌型判断:一条龙、掐张、七对、碰碰胡、十三幺、单吊、大吊车、清一色、缺门、门清。
Sign in for post a comment
Comments ( 0 )