Please answer the following question: Given the following passage  "Scholars and historians are divided as to what event signals the end of the Hellenistic era. The Hellenistic period may be seen to end either with the final conquest of the Greek heartlands by Rome in 146 BC following the Achean War, with the final defeat of the Ptolemaic Kingdom at the Battle of Actium in 31 BC, or even the move by Roman emperor Constantine the Great of the capital of the Roman Empire to Constantinople in 330 AD. "Hellenistic" is distinguished from "Hellenic" in that the first encompasses the entire sphere of direct ancient Greek influence, while the latter refers to Greece itself.",  answer the following question. Note that the answer is present within the text.  Question: Who was on the losing side in 31 BC?
A:
Ptolemaic Kingdom