In what dynasty did the story of Tian Ji's horse race take place?

In the fourth century B.C., China was in a state of vassalization, historically known as the "Warring States Period". Sun Bin, an official in the state of Wei, was persecuted by his colleague Pang Juan, and was rescued by Qi ambassadors and arrived at the capital of Qi.

Qi envoys introduced him to Tian Ji, the general of Qi, who asked Sun Bin to teach him the art of war, and Sun Bin spoke for three days and three nights, Tian Ji was especially impressed and treated Sun Bin as a honored guest, and Sun Bin was very grateful to Tian Ji, and often offered him advice and suggestions.

Horse racing was the most popular entertainment among the nobles of Qi at that time. From the king to the ministers, they used to race horses for fun and bet a lot of money on the winners and losers. Tian Ji bet with the king and other ministers many times, and lost again and again. One day he lost again and went home sulking. Sun Bin consoled him by saying, "Next time you have a chance, take me to the horse racecourse to have a look, maybe I can help you."

When it was time for another horse race, Sun Bin came to the racecourse with Tian Ji, and a full court of civil and military officials and civilians in the city came to see the fun. Sun Bin learned that everyone's horses are divided into upper, middle and lower class according to the speed of running, with different decorations for different classes, and each family's horse races according to the class, and the race is a three races and two wins system.

Sun Bin carefully observed and found that Tian Ji's horse and other people's horses are not far from each other, but the strategy is not used properly, so it fails. Sun Bin told Tian Ji: "Don't worry, General, I have a way to make you win." Tian Ji was so happy to hear this that he asked the king to race with him for a thousand dollars. The king had never lost in a horse race, so he gladly agreed to Tian Ji's invitation.

Before the race, Tian Ji followed Sun Bin's idea and decorated the inferior horse with a superior saddle, pretending to be a superior horse, and raced with the superior horse of the King of Qi. At the beginning of the race, the King of Qi's good horse rushed in front and Tian Ji's horse lagged far behind, and the King laughed heartily. In the second race, still according to Sun Bin's arrangement, Tian Ji used his own superior horse to race with the king's medium horse, and in the midst of the applause, he saw Tian Ji's horse rushed to the front of the king of Qi's horse and won the second race. In the critical third game, Tian Ji's medium horse raced with the king's inferior horse, and Tian Ji's horse once again rushed to the front of the king's horse, and the result was two to one, Tian Ji won the king.

The king, who had never lost a race before, was dumbfounded and wondered where Tian Ji got such a good horse. At this point, Tian Ji told the king of Qi that his victory was not because he found a better horse, but he used a ruse. He then told Sun Bin's ploy and the King of Qi came to a realization and immediately summoned Sun Bin to the palace. Sun Bin told the King of Qi that when both sides are on equal terms, the right countermeasures can defeat the other side, and when both sides are far apart, the right countermeasures can also minimize the loss. Later, the king appointed Sun Bin as a military advisor to command the whole country's army. From then on, Sun Bin assisted Tian Ji to improve the combat methods of Qi army, and the Qi army won many battles against other armies as a result.

After that, there is a new Tian Ji horse race:

Tian Ji was a general of Qi, one day, he and King Qi Wei were racing together, they divided the horses into 3 levels, into the upper class, middle class, and the lower class, and when they raced, they always used the upper class to the upper class, the middle class to the middle class, and the lower class to the lower class, because the good horses of the whole country were in the hands of the King of Qi, so all the three matches were lost by Tian Ji. Tian Ji lost all three matches. Although Tian Ji lost all the matches, Sun Bin realized that King Qi Wei's horse was not much faster than Tian Ji's in each match.

When Tian Ji who was downhearted just wanted to walk out of the racecourse, Sun Bin came up to him and said: "Don't be sad, because most of the good horses in the country are concentrated in the hands of King Qi Wei, it's normal for you to lose, but ......" Tian Ji impatiently interrupted his words and said: "I didn't expect you to lose. words and said, "I didn't expect you to be sarcastic too!" Sun Bin said "I think I can let you win against King Qi Wei." Tian Ji looked at Sun Bin suspiciously and asked, "How many other horses did you say you need to exchange?" "There's no need to change any of the horses." Sun Bin said with confidence. Tian Ji didn't have confidence and said, "Then it's still a loss!" Sun Bin then told Tian Ji what he was thinking and Tian Ji nodded his head. So they went back to challenge King Qi Wei, who accepted the request without hesitation.

With the sound of a gong, the game began again. In the first match, King Qi Wei sent his top horse as usual, but Tian Ji used his bottom horse against King Qi Wei's top horse according to Sun Bin's plan, and King Qi Wei won the first match. After watching the first match, King Qi Wei felt something is not right, the difference between the top horses in the first match was not big, how come the difference became so big all of a sudden? Uh-huh! There must be fraud, so King Qi Wei called over his horseman, in the horseman's ear whispered a few words, the horseman listened to hurriedly left ......

At this time, King Qi Wei proposed to take a break and then the game, not a moment to see the horseman back in King Qi Wei's ear whispered something, King Qi Wei listened to the constant nodding, contemplating a moment and then ordered the horseman to take a break. After a while, King Qi Wei did not move his head, and then ordered the horseman to say a few words. After a while, King Qi Wei did not move and announced that the race would continue. The second race started, King Qi Wei told Tian Ji to send out his horse first, Tian Ji then sent out his top class horse and wanted to fight with King Qi Wei's middle class horse, King Qi Wei gave a wink to the coachman and the coachman brought out King Qi Wei's lower class horse, Sun Bin was dumbfounded at the sight and said to Tian Ji, "It's over! The ploy has been discovered!" Of course Tian Ji won this game. In the last match, since Tian Ji only had a medium horse in his hand and King Qi Wei also had a medium horse, he didn't need to compete to know the result! Tian Ji and Sun Bin looked at each other and surrendered to King Qi Wei.

King Qi Wei pretended not to know anything and asked Tian Ji: "What is this all about?" Tian Ji had no choice but to tell that it was Sun Bin's ploy, King Qi Wei laughed at that, "I knew you guys used a ploy! Let Sun Bin come out to meet me." Sun Bin and King Qi Wei met and had a good conversation, and King Qi Wei was impressed by Sun Bin from then on! Later he also reused Tian Ji and Sun Bin grin.