AI Unlocks Secrets of Ancient Hammurabi’s Code

Written on 07/10/2025
Nisha Zahid

A new AI system has accurately translated an ancient Babylonian tablet, revealing part of Hammurabi’s Code with 98% precision. Credit: Rafael Borges / CC BY NC 2.0

A new artificial intelligence (AI) system has successfully translated an ancient Babylonian Hammurabi’s code tablet, reaching an accuracy rate of 98%. This achievement marks a major advance in efforts to interpret some of the oldest known written laws.

The tablet, which dates back more than 3,700 years, contains the opening line of the Code of Hammurabi—one of the earliest legal texts in human history. This development was revealed in a study published May 7, 2025, on the public research platform arXiv.

Developed by a research team at the University of Dubai, the AI tool was trained to recognize the wedge-shaped marks of cuneiform, an ancient writing system used in Mesopotamia. The project could lead to faster and more accurate reading of thousands of ancient tablets currently stored in museums around the world.

Understanding the code of Hammurabi with AI

The Code of Hammurabi is a stone monument covered in 282 laws that were issued by Babylonian King Hammurabi around 1754 BCE. The text is one of the best-preserved legal documents from ancient times. These laws addressed daily life, covering areas such as trade, property disputes, family issues, and crime.

Written in the Akkadian language, the code followed a strict principle of justice that is often summarized as “an eye for an eye.” The document not only shaped the society of its time but continues to offer historians a glimpse into the culture and values of early civilizations.

However, reading these texts is not easy. Tablets are small, often no larger than a person’s hand, and the writing is complex. Fewer and fewer people today can read cuneiform. Traditionally, each tablet must be copied and studied by hand—a time-consuming process that slows down research.

AI helps decode the past

To speed up this work, researchers Shahad Elshehaby, Alavikunhu Panthakkan, Hussain Al-Ahmad, and Mina Al-Saad developed a machine-learning system that can read cuneiform signs. Using more than 14,000 images representing 235 different symbols, the AI learned to recognize the patterns pressed into clay thousands of years ago.

When tested, the system made only two errors for every hundred characters it translated. In some trials, it was nearly flawless—misreading just one symbol out of 10,000. Another version of the AI model had slightly lower accuracy at 89%.

This technology could significantly benefit museums and universities that hold large collections of ancient tablets from regions like Syria, Mesopotamia, and Anatolia. It may allow researchers to digitize texts quickly, making them easier to study and more accessible to the public.

New scripts and deeper research

Beyond reading the words, the system could also help researchers understand how symbols evolved over time. By comparing symbols from different places and periods, historians may be able to more accurately determine when and where a tablet was created.

The team now plans to enhance the system’s ability to read damaged or burned tablets. They also hope to apply similar techniques to other ancient writing systems, including Egyptian hieroglyphs, once enough images are available to train the system.

As AI tools continue to improve, researchers say this technology could open the door to discovering stories, laws, and cultural details that have been locked in clay for thousands of years.