摘要
为实现程序自动打牌,必须首先正确显示四家手牌。针对正确显示手牌这一需求,设计了武汉麻将游戏,构造排序算法、皮子癞子获取算法和起牌算法等。即在起始阶段摇骰子以确定起牌的起始位置和庄家,然后有序显示各家手牌。通过对武汉麻将起牌规则的机器学习,将口语化的规则用计算机语言准确描述,以实现正确起牌。为了验证算法的有效性,使用QT框架构建了武汉麻将自动打牌软件进行相应的实验验证,实验结果表明:起牌算法可以正确起牌,并显示四家手牌,具有一定的实用性。
To achieve automatic card playing in the program,it is necessary to first display the four hands correctly.In view of the need to display the hand cards correctly,Wuhan Mahjong game is designed,and sorting algorithm,skin scab acquisition algorithm and starting card algorithm are constructed.At the beginning of the Mahjong game,it rolls the dice to determine the starting position and dealer of the cards,and then displays the cards of each player in an orderly manner.Through machine learning of the rules of starting card in Wuhan Mahjong,the spoken rules are accurately described in computer language to achieve correct starting of cards.In order to verify the effectiveness of the algorithm,a Wuhan Mahjong automatic card playing software is constructed using the QT framework for corresponding experimental verification.The experimental results show that the starting card algorithm can correctly play cards and display four hands,which has certain practicality.
作者
徐子怡
林富生
宋志峰
徐自立
余联庆
XU Ziyi;LIN Fusheng;SONG Zhifeng;XU Zili;YU Lianqing(School of Mechanical Engineering and Automation,Wuhan Textile University,Wuhan 430200,China;Hubei Provincial Engineering Research Center of 3D Textile,Wuhan 430200,China;Hubei Provincial Key Laboratory of Digital Textile Equipment,Wuhan 430200,China)
出处
《现代信息科技》
2023年第23期83-88,92,共7页
Modern Information Technology
关键词
武汉麻将
QT框架
起牌算法
Wuhan Mahjong
QT framework
starting card algorithm
作者简介
徐子怡(2000—),女,汉族,湖北仙桃人,硕士研究生在读,研究方向:人工智能;通讯作者:林富生(1965—),男,汉族,江苏台州人,教授,博士,研究方向:人工智能;宋志峰(1972—),男,汉族,湖北孝感人,副教授,硕士,研究方向:计算机集成制造系统;徐自立(1964—),男,汉族,湖北武汉人,教授,博士,研究方向:耐磨与抗磨材料;余联庆(1972—),男,汉族,湖北咸宁人,教授,博士,研究方向:机器人机构学。