Johann Baptist Allgaier was born in 1763 in the Duchy of Württemberg. His father, Georg Allgaier, worked at a monastery as a "Hofmeister", the person in charge of the education of the children of the rich and noble families. Johann's father wanted him to study theology. On a trip to Poland he learned to play chess. In 1798, he moved to Vienna and joined the army. He was able to improve his chess skills. In 1780, he won a game with a prize of 1500 florins and became Vienna's best player. He taught many people to play chess, including the sons and brothers of the Emperor Francis II. 