Blackjack is a well-known gambling game and is the most widely played casino game in the world. Numerous researches about this game had been carried out, including machine learning of optimal actions for playing the game (see reinforcement learning for solving Blackjack).

I got particularly interested in machine learning during graduate school. Thus, I made this simple Blackjack game program in order to construct a game environment for reinforcement learning of game agents for future work.

The game process is a single round of Blackjack, starting from player 0 being dealt 2 cards from the dealer. The player can either choose to “hit”, “stand” or “split” according to his cards. After the “stand” action is chosen or if he goes busted, The next player follows on.

I wrote this game using C language, which runs on a command prompt. While being simple, It can provide useful insights to game agents which can further learn on its own for achieving optimal behavior.