The earliest is the late Paleolithic.
Tracing back to the history of human gambling, there was a habit of "taking chances" as early as the late Paleolithic period. In the prehistoric civilization of China, a large number of divination methods were used to judge bad luck, including major wars. Xu Shen's Shuowen in the Eastern Han Dynasty recorded "Ancient Cao Zuobo", which was a courtier. From this point of view, gambling appeared in the Xia Dynasty in China. Dice appeared in Iraq and India 5000 years ago, and its footprints spread all over Greece, Rome, the Middle East and ancient Mayan civilization.