很多遊戲都可透過智慧運算計算出最佳的選擇以及結果。撲克牌的二十一點遊戲是其中一種簡單且最普遍的。二十一點遊戲在不同地區常會有不同規則。玩家如何執行最佳策略以及它對應的期望值在過去七十年有太多書籍與文章界研究它。若期望值大於零表示玩家玩的次數很大時,玩家會贏;反之亦然。玩家最在乎的是在執行最佳策略後之期望值是否會如書本與電影所說的會大於零呢? 有兩種方法可得到最佳策略與期望值。第一種是運用電腦模擬,第二種是建立數學模型。顯而易見的是遊戲的排列方式太多。採用電腦模擬的次數必須非常大,對每一種遊戲規則下,模擬時間很久。況且學術上我們希望最佳策略與期望值的正確解析值。很多文章以數學與統計為出發點,但它們都建立在某些估算值而得到近似解析值,且含有偏差,而非真正的正確解析值。 本論文以撲克牌序列當作輸入訊號。我們假設在遊戲前撲克牌洗得很乾淨,因此輸入訊號可當作隨機訊號。一般而言,遊戲使用非常多副牌組,為避免玩家猜出接下來未出現的牌的機率,在玩完幾次遊戲後就會重新洗牌,因此可假設撲克牌組數為無窮多。本論文將提出隨機訊號處理演算法求出玩家之最佳補牌策略與對應之期望值。首先運用樹狀結構演算法,窮舉出莊家所有可能排列方式,藉此計算莊家最終點數的機率分布,並進一步運用遞迴的演算法,在瞬間就能得出玩家在各種遊戲規則下無誤差或偏差情況之最佳策略與期望值。並回答在何種遊戲規則下期望值會大於零。 最後我將以電腦模擬驗證我得到的解析結果。當模擬次數趨於數億次時,這兩種法之期望值偏差漸漸趨近於零,說明了我們得到之解析值的正確性。 ;The best choices and results of many games can obtain through intelligent computation. The blackjack game is a simple and most common one. Blackjack games often have different rules in different regions. How the player can execute the best strategy and obtain its corresponding expectation value have been discussed by many books and articles it in the past seventy years. As the expectation value is greater than zero, the player will win the game in a long term, and vice versa. What a player really concerns is whether the expectation value is positive if he already executes the best strategy? There are two approaches to obtain the best strategy and expectation values. The first approach is to perform computer simulations, and the second approach is to build mathematical models. It is obvious that there are too many permutations in the game. However, under each game rule, the number of simulations must be very large, and the simulation time is too long to be accepted. Moreover, academically we wish the best strategy and the exact analytical expectation value can be obtained. Many articles built mathematical and statistical models to obtain approximate analytical value based on some estimations that will introduce some bias in the result. This thesis uses the sequence of the poker cards as the input signal. Assume that the cards are shuffled cleanly before the game so that the input signal can be treated as a random signal. Generally speaking, the game uses many decks and the cards will be shuffled after just playing few games to prevent that player can guess the probability of subsequent cards based on the previous appeared cards. Consequently, it can be assumed that the number of poker decks is infinite. This thesis will propose a random signal processing algorithm to determine the best strategy and its corresponding expectation value for the player. First, I apply a tree-based structure algorithm to exhaustive list all the permutations of the dealer’s card, calculate the probability distribution of dealer’s final points and use the recursive algorithm, the best strategy and expectation values without error or deviation under various game rules can be obtained within a second. Next, I will answer whether the expectation value is positive under each game rule. Finally, the accuracy of the proposed analytical result is confirmed through computer simulations. I found that the expectation values based on these two approaches are asymptotically identical as the number of simulations approaches several billion that shows the correctness of the analytical values.