ترغب بنشر مسار تعليمي؟ اضغط هنا

A Fast Algorithm for Computing the Deficiency Number of a Mahjong Hand

81   0   0.0 ( 0 )
 نشر من قبل Sanjiang Li
 تاريخ النشر 2021
  مجال البحث الهندسة المعلوماتية
والبحث باللغة English




اسأل ChatGPT حول البحث

The tile-based multiplayer game Mahjong is widely played in Asia and has also become increasingly popular worldwide. Face-to-face or online, each player begins with a hand of 13 tiles and players draw and discard tiles in turn until they complete a winning hand. An important notion in Mahjong is the deficiency number (a.k.a. shanten number in Japanese Mahjong) of a hand, which estimates how many tile changes are necessary to complete the hand into a winning hand. The deficiency number plays an essential role in major decision-making tasks such as selecting a tile to discard. This paper proposes a fast algorithm for computing the deficiency number of a Mahjong hand. Compared with the baseline algorithm, the new algorithm is usually 100 times faster and, more importantly, respects the agents knowledge about available tiles. The algorithm can be used as a basic procedure in all Mahjong variants by both rule-based and machine learning-based Mahjong AI.

قيم البحث

اقرأ أيضاً

We present a new fast algorithm for computing the Boys function using nonlinear approximation of the integrand via exponentials. The resulting algorithms evaluate the Boys function with real and complex valued arguments and are competitive with previously developed algorithms for the same purpose.
The Fourier spectrum at a fractional period is often examined when extracting features from biological sequences and time series. It reflects the inner information structure of the sequences. A fractional period is not uncommon in time series. A typi cal example is the 3.6 period in protein sequences, which determines the $alpha$-helix secondary structure. Computing the spectrum of a fractional period offers a high-resolution insight into a time series. It has thus become an important approach in genomic analysis. However, computing Fourier spectra of fractional periods by the traditional Fourier transform is computationally expensive. In this paper, we present a novel, fast algorithm for directly computing the fractional period spectrum (FPS) of time series. The algorithm is based on the periodic distribution of signal strength at periodic positions of the time series. We provide theoretical analysis, deduction, and special techniques for reducing the computational costs of the algorithm. The analysis of the computational complexity of the algorithm shows that the algorithm is much faster than traditional Fourier transform. Our algorithm can be applied directly in computing fractional periods in time series from a broad of research fields. The computer programs of the FPS algorithm are available at https://github.com/cyinbox/FPS.
146 - David Coudert 2008
In this paper, we present a distributed algorithm to compute various parameters of a tree such as the process number, the edge search number or the node search number and so the pathwidth. This algorithm requires n steps, an overall computation time of O(n log(n)), and n messages of size log_3(n)+3. We then propose a distributed algorithm to update the process number (or the node search number, or the edge search number) of each component of a forest after adding or deleting an edge. This second algorithm requires O(D) steps, an overall computation time of O(D log(n)), and O(D) messages of size log_3(n)+3, where D is the diameter of the modified connected component. Finally, we show how to extend our algorithms to trees and forests of unknown size using messages of less than 2a+4+e bits, where a is the parameter to be determined and e=1 for updates algorithms.
We present a fast method for evaluating expressions of the form $$ u_j = sum_{i = 1,i ot = j}^n frac{alpha_i}{x_i - x_j}, quad text{for} quad j = 1,ldots,n, $$ where $alpha_i$ are real numbers, and $x_i$ are points in a compact interval of $mathbb{R }$. This expression can be viewed as representing the electrostatic potential generated by charges on a line in $mathbb{R}^3$. While fast algorithms for computing the electrostatic potential of general distributions of charges in $mathbb{R}^3$ exist, in a number of situations in computational physics it is useful to have a simple and extremely fast method for evaluating the potential of charges on a line; we present such a method in this paper, and report numerical results for several examples.
The growth in online goods delivery is causing a dramatic surge in urban vehicle traffic from last-mile deliveries. On the other hand, ride-sharing has been on the rise with the success of ride-sharing platforms and increased research on using autono mous vehicle technologies for routing and matching. The future of urban mobility for passengers and goods relies on leveraging new methods that minimize operational costs and environmental footprints of transportation systems. This paper considers combining passenger transportation with goods delivery to improve vehicle-based transportation. Even though the problem has been studied with a defined dynamics model of the transportation system environment, this paper considers a model-free approach that has been demonstrated to be adaptable to new or erratic environment dynamics. We propose FlexPool, a distributed model-free deep reinforcement learning algorithm that jointly serves passengers & goods workloads by learning optimal dispatch policies from its interaction with the environment. The proposed algorithm pools passengers for a ride-sharing service and delivers goods using a multi-hop transit method. These flexibilities decrease the fleets operational cost and environmental footprint while maintaining service levels for passengers and goods. Through simulations on a realistic multi-agent urban mobility platform, we demonstrate that FlexPool outperforms other model-free settings in serving the demands from passengers & goods. FlexPool achieves 30% higher fleet utilization and 35% higher fuel efficiency in comparison to (i) model-free approaches where vehicles transport a combination of passengers & goods without the use of multi-hop transit, and (ii) model-free approaches where vehicles exclusively transport either passengers or goods.

الأسئلة المقترحة

التعليقات
جاري جلب التعليقات جاري جلب التعليقات
سجل دخول لتتمكن من متابعة معايير البحث التي قمت باختيارها
mircosoft-partner

هل ترغب بارسال اشعارات عن اخر التحديثات في شمرا-اكاديميا