Chanakya was a 4th century BC Indian philosopher, economist and royal advisor. He served as the chief advisor to Chandragupta Maurya and was instrumental in founding the Maurya Empire. According to legends, Chanakya swore revenge against the Nanda kings after being humiliated at their court. He then trained Chandragupta and helped him build an army to defeat the Nandas. As prime minister, Chanakya authored the ancient Indian text Arthashastra, which covered politics, economics and military strategies. He is considered one of the earliest thinkers on realpolitik.